summaryrefslogtreecommitdiff
path: root/app/controllers/projects/tree_controller.rb
diff options
context:
space:
mode:
authorDouwe Maan <douwe@selenight.nl>2017-05-17 09:23:00 -0500
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2017-05-17 20:59:26 +0300
commitd3b24a7638de71ee1286200978e0b6d0b33d0753 (patch)
tree498c4ed238cae6026acc38cb087a3152ee20dfa3 /app/controllers/projects/tree_controller.rb
parentfb67ea491ba86cb012e58d0e338039acd61400dd (diff)
downloadgitlab-ce-d3b24a7638de71ee1286200978e0b6d0b33d0753.tar.gz
Show last commit for current tree on tree page
Diffstat (limited to 'app/controllers/projects/tree_controller.rb')
-rw-r--r--app/controllers/projects/tree_controller.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/controllers/projects/tree_controller.rb b/app/controllers/projects/tree_controller.rb
index 3ce65b29b3c..f8eb8e00a5d 100644
--- a/app/controllers/projects/tree_controller.rb
+++ b/app/controllers/projects/tree_controller.rb
@@ -24,6 +24,8 @@ class Projects::TreeController < Projects::ApplicationController
end
end
+ @last_commit = @repository.last_commit_for_path(@commit.id, @tree.path) || @commit
+
respond_to do |format|
format.html
# Disable cache so browser history works