diff options
Diffstat (limited to 'modules/git/notes.go')
-rw-r--r-- | modules/git/notes.go | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/modules/git/notes.go b/modules/git/notes.go index 7aa5d89a79..a62c558787 100644 --- a/modules/git/notes.go +++ b/modules/git/notes.go @@ -50,7 +50,17 @@ func GetNote(repo *Repository, commitID string, note *Note) error { return err } - lastCommits, err := getLastCommitForPaths(commit, "", []string{commitID}) + commitNodeIndex, commitGraphFile := repo.CommitNodeIndex() + if commitGraphFile != nil { + defer commitGraphFile.Close() + } + + commitNode, err := commitNodeIndex.Get(commit.Hash) + if err != nil { + return nil + } + + lastCommits, err := getLastCommitForPaths(commitNode, "", []string{commitID}) if err != nil { return err } |