Skip to content

Commit b2ce534

Browse files
committed
Fix empty commits now showing in repo overview
1 parent be9d67f commit b2ce534

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

modules/git/commit_info.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,9 @@ func (tes Entries) GetCommitsInfo(commit *Commit, treePath string, cache LastCom
6868
// get it for free during the tree traversal and it's used for listing
6969
// pages to display information about newest commit for a given path.
7070
var treeCommit *Commit
71-
if rev, ok := revs[""]; ok {
71+
if treePath == "" {
72+
treeCommit = commit
73+
} else if rev, ok := revs[""]; ok {
7274
treeCommit = convertCommit(rev)
7375
}
7476
return commitsInfo, treeCommit, nil

0 commit comments

Comments
 (0)