Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Vosmaer (GitLab) <jacob@gitlab.com>2018-04-25 18:45:33 +0300
committerJacob Vosmaer (GitLab) <jacob@gitlab.com>2018-04-25 18:45:33 +0300
commit221364d0506d9bad9705dcb10c34deb9a7e69c79 (patch)
tree0773b18b7c07129eba99d12a22b493751fdc762d
parent0474b28120870d7ea0a734c9a75a3ada6ead29eb (diff)
parentb5710da3885882a9031421d4db11e7abd2386a05 (diff)
Merge branch 'zj-exists-duplication' into 'master'
Copy Gitlab::Git::Repsitory#exists implementation See merge request gitlab-org/gitaly!694
-rw-r--r--CHANGELOG.md2
-rw-r--r--ruby/lib/gitlab/git/repository.rb4
2 files changed, 6 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index d80677c1a..a980fed2c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,8 @@
UNRELEASED
+- Copy Gitlab::Git::Repository#exists? implementation for internal method calls
+ https://gitlab.com/gitlab-org/gitaly/merge_requests/693
- Upgrade Licensee gem to match the CE gem
https://gitlab.com/gitlab-org/gitaly/merge_requests/693
- Vendor gitlab_git at 8b41c40674273d6ee
diff --git a/ruby/lib/gitlab/git/repository.rb b/ruby/lib/gitlab/git/repository.rb
index 26fb20344..f82bed70e 100644
--- a/ruby/lib/gitlab/git/repository.rb
+++ b/ruby/lib/gitlab/git/repository.rb
@@ -50,6 +50,10 @@ module Gitlab
msg, status = run_git(%W[--git-dir=#{path} fsck], nice: true)
raise GitError.new("Could not fsck repository: #{msg}") unless status.zero?
end
+
+ def exists?
+ File.exist?(File.join(path, 'refs'))
+ end
end
end
end