diff options
author | zeripath <art27@cantab.net> | 2022-02-06 07:11:35 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-06 15:11:35 +0800 |
commit | 9419dd2b62ab4399e4e7711a3ec4b81858883923 (patch) | |
tree | 8c64e07a926b3fc683bf21a28f3c4d37c16b95a8 /modules/git/notes_gogit.go | |
parent | 3b33507c73cbc376fc078b87155978cc62564323 (diff) | |
download | gitea-9419dd2b62ab4399e4e7711a3ec4b81858883923.tar.gz gitea-9419dd2b62ab4399e4e7711a3ec4b81858883923.zip |
Stop logging an error when notes are not found (#18626)
This is an unnecessary logging event.
Fix #18616
Signed-off-by: Andrew Thornton <art27@cantab.net>
Diffstat (limited to 'modules/git/notes_gogit.go')
-rw-r--r-- | modules/git/notes_gogit.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/modules/git/notes_gogit.go b/modules/git/notes_gogit.go index 6cb719ce92..b1e5e453e4 100644 --- a/modules/git/notes_gogit.go +++ b/modules/git/notes_gogit.go @@ -22,6 +22,9 @@ func GetNote(ctx context.Context, repo *Repository, commitID string, note *Note) 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 } |