Skip to content

Commit d15f47c

Browse files
committed
fix
1 parent 5971376 commit d15f47c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

modules/git/notes_gogit.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,12 @@ func GetNote(ctx context.Context, repo *Repository, commitID string, note *Note)
3131
remainingCommitID := commitID
3232
path := ""
3333
tree := NewTree(repo, notes.TreeID)
34-
currentTree, err := tree.getGogitTree()
35-
if err != nil {
34+
if err := tree.loadTreeObject(); err != nil {
3635
log.Error("Unable to get git tree for notes commit %q. Error: %v", notes.ID, err)
3736
return err
3837
}
38+
currentTree := tree.gogitTree
39+
3940
log.Trace("Found tree with ID %q while searching for git note corresponding to the commit %q", currentTree.Entries[0].Name, commitID)
4041
var file *object.File
4142
for len(remainingCommitID) > 2 {

0 commit comments

Comments
 (0)