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

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-11-14 06:06:25 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-11-14 06:06:25 +0300
commit29c01c6c91558358c37ba45b03f240632bfb918d (patch)
treec6475afaf98ce740e8ba5fe227e7bd4a95b692cd /lib/gitlab/git
parenteed996ac33a60d5fd8315a62fec8beaa8e907e69 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/git')
-rw-r--r--lib/gitlab/git/repository.rb11
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/gitlab/git/repository.rb b/lib/gitlab/git/repository.rb
index b2c22898079..4971a18e270 100644
--- a/lib/gitlab/git/repository.rb
+++ b/lib/gitlab/git/repository.rb
@@ -25,9 +25,18 @@ module Gitlab
InvalidRef = Class.new(StandardError)
GitError = Class.new(StandardError)
DeleteBranchError = Class.new(StandardError)
- CreateTreeError = Class.new(StandardError)
TagExistsError = Class.new(StandardError)
ChecksumError = Class.new(StandardError)
+ class CreateTreeError < StandardError
+ attr_reader :error_code
+
+ def initialize(error_code)
+ super(self.class.name)
+
+ # The value coming from Gitaly is an uppercase String (e.g., "EMPTY")
+ @error_code = error_code.downcase.to_sym
+ end
+ end
# Directory name of repo
attr_reader :name