Fix #15558
Signed-off-by: Andrew Thornton <art27@cantab.net>
import (
"io/ioutil"
+ "strings"
)
// GetNote retrieves the git-notes data for a given commit.
}
note.Message = d
- lastCommits, err := GetLastCommitForPaths(notes, "", []string{path})
+ treePath := ""
+ if idx := strings.LastIndex(path, "/"); idx > -1 {
+ treePath = path[:idx]
+ path = path[idx+1:]
+ }
+
+ lastCommits, err := GetLastCommitForPaths(notes, treePath, []string{path})
if err != nil {
return err
}