Minor refactoring on Gitlab::Git

This commit is contained in:
Zeger-Jan van de Weg
2016-02-05 08:39:44 +01:00
parent 42e0e35784
commit be3399868c
2 changed files with 13 additions and 3 deletions
+4 -3
View File
@@ -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)
+9
View File
@@ -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