Skip to content

Commit 89af3ab

Browse files
committed
Fix listing commit info for a directory that was created in one commit and never modified after.
Signed-off-by: Filip Navara <[email protected]>
1 parent eb1cb66 commit 89af3ab

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

modules/git/commit_info.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,9 @@ func getLastCommitForPaths(c *object.Commit, treePath string, paths []string) ([
105105
parentTree, err = parentTree.Tree(treePath)
106106
// the whole tree doesn't exist
107107
if err != nil {
108+
if resultTree == nil {
109+
resultTree = current
110+
}
108111
return nil
109112
}
110113
}

0 commit comments

Comments
 (0)