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>2020-01-29 18:08:59 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-01-29 18:08:59 +0300
commit23288f62da73fb0e30d8e7ce306665e8fda1b932 (patch)
tree2baf1339e4d7c7c35d6b8a52cfb90597a5d4cdf1 /lib/gitlab/database
parent7cc6872401eb487ed20dbb9d455f8bb9c97d9e39 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/database')
-rw-r--r--lib/gitlab/database/sha_attribute.rb9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/gitlab/database/sha_attribute.rb b/lib/gitlab/database/sha_attribute.rb
index 776e80701f1..bad6d3e2a9b 100644
--- a/lib/gitlab/database/sha_attribute.rb
+++ b/lib/gitlab/database/sha_attribute.rb
@@ -24,7 +24,14 @@ module Gitlab
def serialize(value)
arg = value ? [value].pack(PACK_FORMAT) : nil
- super(arg)
+ BINARY_TYPE.new.serialize(arg)
+ end
+
+ # Casts a SHA1 in hexadecimal to the proper binary format.
+ def self.serialize(value)
+ arg = value ? [value].pack(PACK_FORMAT) : nil
+
+ BINARY_TYPE.new.serialize(arg)
end
end
end