summaryrefslogtreecommitdiff
path: root/lib/gitlab/git/remote_repository.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab/git/remote_repository.rb')
-rw-r--r--lib/gitlab/git/remote_repository.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/gitlab/git/remote_repository.rb b/lib/gitlab/git/remote_repository.rb
index 3685aa20669..6bd6e58feeb 100644
--- a/lib/gitlab/git/remote_repository.rb
+++ b/lib/gitlab/git/remote_repository.rb
@@ -24,10 +24,12 @@ module Gitlab
@path = repository.path
end
- def empty_repo?
+ def empty?
# We will override this implementation in gitaly-ruby because we cannot
# use '@repository' there.
- @repository.empty_repo?
+ #
+ # Caches and memoization used on the Rails side
+ !@repository.exists? || @repository.empty?
end
def commit_id(revision)