Commit 44bc5fe5 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Improve commits data loading on Tree page

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent 376e004c
......@@ -223,7 +223,9 @@ class Repository
end
def last_commit_for_path(sha, path)
commits(sha, path, 1).last
args = %W(git rev-list --max-count 1 #{sha} -- #{path})
sha = Gitlab::Popen.popen(args, path_to_repo).first.strip
commit(sha)
end
# Remove archives older than 2 hours
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment