This is an unnecessary logging event.
Fix #18616
Signed-off-by: Andrew Thornton <art27@cantab.net>
log.Trace("Searching for git note corresponding to the commit %q in the repository %q", commitID, repo.Path)
notes, err := repo.GetCommit(NotesRef)
if err != nil {
+ if IsErrNotExist(err) {
+ return err
+ }
log.Error("Unable to get commit from ref %q. Error: %v", NotesRef, err)
return err
}
log.Trace("Searching for git note corresponding to the commit %q in the repository %q", commitID, repo.Path)
notes, err := repo.GetCommit(NotesRef)
if err != nil {
+ if IsErrNotExist(err) {
+ return err
+ }
log.Error("Unable to get commit from ref %q. Error: %v", NotesRef, err)
return err
}