Fix empty commits now showing in repo overview (#7521)
* Fix empty commits now showing in repo overview * add test * make fmt
This commit is contained in:
parent
b0cd3b8ab9
commit
fe7689a6b2
7 changed files with 24 additions and 13 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue