mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-27 04:43:59 +01:00
Only log non ErrNotExist errors in git.GetNote (#19884)
* 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>
This commit is contained in:
parent
23dd0f3456
commit
dbe415fb91
1 changed files with 4 additions and 1 deletions
|
@ -46,7 +46,10 @@ func GetNote(ctx context.Context, repo *Repository, commitID string, note *Note)
|
|||
commitID = commitID[2:]
|
||||
}
|
||||
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)
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue