summaryrefslogtreecommitdiffstats
path: root/modules/git/commit_info.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/git/commit_info.go')
-rw-r--r--modules/git/commit_info.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/git/commit_info.go b/modules/git/commit_info.go
index 8417226f8b..3fa80457ac 100644
--- a/modules/git/commit_info.go
+++ b/modules/git/commit_info.go
@@ -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