Skip to content

Commit

Permalink
Fix empty commits now showing in repo overview
Browse files Browse the repository at this point in the history
  • Loading branch information
silverwind committed Jul 21, 2019
1 parent be9d67f commit b2ce534
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion modules/git/commit_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@ func (tes Entries) GetCommitsInfo(commit *Commit, treePath string, cache LastCom
// get it for free during the tree traversal and it's used for listing
// pages to display information about newest commit for a given path.
var treeCommit *Commit
if rev, ok := revs[""]; ok {
if treePath == "" {
treeCommit = commit
} else if rev, ok := revs[""]; ok {
treeCommit = convertCommit(rev)
}
return commitsInfo, treeCommit, nil
Expand Down

0 comments on commit b2ce534

Please sign in to comment.