mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 16:40:24 +08:00 
			
		
		
		
	* Fix GetNote * Only log errors if the error is not ErrNotExist Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: Andrew Thornton <art27@cantab.net> Co-authored-by: Andrew Thornton <art27@cantab.net>
This commit is contained in:
		@@ -47,7 +47,10 @@ func GetNote(ctx context.Context, repo *Repository, commitID string, note *Note)
 | 
				
			|||||||
			commitID = commitID[2:]
 | 
								commitID = commitID[2:]
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		if err != nil {
 | 
							if err != nil {
 | 
				
			||||||
 | 
								// Err may have been updated by the SubTree we need to recheck if it's again an ErrNotExist
 | 
				
			||||||
 | 
								if !IsErrNotExist(err) {
 | 
				
			||||||
				log.Error("Unable to find git note corresponding to the commit %q. Error: %v", originalCommitID, err)
 | 
									log.Error("Unable to find git note corresponding to the commit %q. Error: %v", originalCommitID, err)
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
			return err
 | 
								return err
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user