Minor refactoring on Gitlab::Git
This commit is contained in:
parent
42e0e35784
commit
be3399868c
|
|
@ -1,8 +1,9 @@
|
|||
module Gitlab
|
||||
module Git
|
||||
BLANK_SHA = '0' * 40
|
||||
TAG_REF_PREFIX = "refs/tags/"
|
||||
BRANCH_REF_PREFIX = "refs/heads/"
|
||||
# '0' * 40 -- this was easyer to freeze
|
||||
BLANK_SHA = "0000000000000000000000000000000000000000".freeze
|
||||
TAG_REF_PREFIX = "refs/tags/".freeze
|
||||
BRANCH_REF_PREFIX = "refs/heads/".freeze
|
||||
|
||||
class << self
|
||||
def ref_name(ref)
|
||||
|
|
|
|||
|
|
@ -0,0 +1,9 @@
|
|||
require 'spec_helper'
|
||||
|
||||
describe Gitlab::Git do
|
||||
describe "BLANK_SHA" do
|
||||
it "is a string of 40 zero's" do
|
||||
expect(Gitlab::Git::BLANK_SHA).to eq('0' * 40)
|
||||
end
|
||||
end
|
||||
end
|
||||
Loading…
Reference in New Issue