BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
be339986
Commit
be339986
authored
Nov 02, 2015
by
Zeger-Jan van de Weg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor refactoring on Gitlab::Git
parent
42e0e357
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
3 deletions
+13
-3
git.rb
lib/gitlab/git.rb
+4
-3
git_spec.rb
spec/lib/gitlab/git_spec.rb
+9
-0
No files found.
lib/gitlab/git.rb
View file @
be339986
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
)
...
...
spec/lib/gitlab/git_spec.rb
0 → 100644
View file @
be339986
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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment