Skip to content

Commit b22035d

Browse files
committed
Merge remote-tracking branch 'origin/main' into wip-stats
2 parents 874795e + 9419dd2 commit b22035d

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

modules/git/notes_gogit.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ func GetNote(ctx context.Context, repo *Repository, commitID string, note *Note)
2222
log.Trace("Searching for git note corresponding to the commit %q in the repository %q", commitID, repo.Path)
2323
notes, err := repo.GetCommit(NotesRef)
2424
if err != nil {
25+
if IsErrNotExist(err) {
26+
return err
27+
}
2528
log.Error("Unable to get commit from ref %q. Error: %v", NotesRef, err)
2629
return err
2730
}

modules/git/notes_nogogit.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ func GetNote(ctx context.Context, repo *Repository, commitID string, note *Note)
2121
log.Trace("Searching for git note corresponding to the commit %q in the repository %q", commitID, repo.Path)
2222
notes, err := repo.GetCommit(NotesRef)
2323
if err != nil {
24+
if IsErrNotExist(err) {
25+
return err
26+
}
2427
log.Error("Unable to get commit from ref %q. Error: %v", NotesRef, err)
2528
return err
2629
}

0 commit comments

Comments
 (0)