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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
5ffec2c9
Commit
5ffec2c9
authored
Nov 03, 2015
by
Zeger-Jan van de Weg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Freeze the expression instead of the literal
Also remove the spec for it
parent
be339986
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
11 deletions
+1
-11
lib/gitlab/git.rb
lib/gitlab/git.rb
+1
-2
spec/lib/gitlab/git_spec.rb
spec/lib/gitlab/git_spec.rb
+0
-9
No files found.
lib/gitlab/git.rb
View file @
5ffec2c9
module
Gitlab
module
Gitlab
module
Git
module
Git
# '0' * 40 -- this was easyer to freeze
BLANK_SHA
=
(
'0'
*
40
).
freeze
BLANK_SHA
=
"0000000000000000000000000000000000000000"
.
freeze
TAG_REF_PREFIX
=
"refs/tags/"
.
freeze
TAG_REF_PREFIX
=
"refs/tags/"
.
freeze
BRANCH_REF_PREFIX
=
"refs/heads/"
.
freeze
BRANCH_REF_PREFIX
=
"refs/heads/"
.
freeze
...
...
spec/lib/gitlab/git_spec.rb
deleted
100644 → 0
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