Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
iv
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
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
3 deletions
+13
-3
lib/gitlab/git.rb
lib/gitlab/git.rb
+4
-3
spec/lib/gitlab/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