mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-09 12:46:07 +10:00
Merge branch 'faster-rev-list' into 'master'
Faster rev list Since rugged does not support path filtering yet it affects GitLab performance. So we use `git rev-list` as temporary but fast and reliable solution for looking last commit of tree Fixes #1622 See merge request !1127
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user