diff options
Diffstat (limited to 'lib/gitlab/git.rb')
-rw-r--r-- | lib/gitlab/git.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/gitlab/git.rb b/lib/gitlab/git.rb index 8cbd1a4ce72..894811ecd3c 100644 --- a/lib/gitlab/git.rb +++ b/lib/gitlab/git.rb @@ -7,7 +7,8 @@ module Gitlab # The ID of empty tree. # https://github.com/git/git/blob/3ad8b5bf26362ac67c9020bf8c30eee54a84f56d/cache.h#L1011-L1012 EMPTY_TREE_ID = '4b825dc642cb6eb9a060e54bf8d69288fbee4904' - BLANK_SHA = ('0' * 40).freeze + SHA1_BLANK_SHA = ('0' * 40).freeze + SHA256_BLANK_SHA = ('0' * 64).freeze COMMIT_ID = /\A#{Gitlab::Git::Commit::RAW_FULL_SHA_PATTERN}\z/ TAG_REF_PREFIX = "refs/tags/" BRANCH_REF_PREFIX = "refs/heads/" @@ -79,7 +80,7 @@ module Gitlab end def blank_ref?(ref) - ref == BLANK_SHA + ref == SHA1_BLANK_SHA end def commit_id?(ref) |