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
19a30595
Commit
19a30595
authored
Sep 25, 2017
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unnecessary comments
parent
91b40b3b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
4 deletions
+2
-4
commit.rb
app/models/commit.rb
+0
-2
diff_refs.rb
lib/gitlab/diff/diff_refs.rb
+2
-2
No files found.
app/models/commit.rb
View file @
19a30595
...
...
@@ -25,7 +25,6 @@ class Commit
DIFF_HARD_LIMIT_FILES
=
1000
DIFF_HARD_LIMIT_LINES
=
50000
# The SHA can be between 7 and 40 hex characters.
MIN_SHA_LENGTH
=
7
COMMIT_SHA_PATTERN
=
/\h{
#{
MIN_SHA_LENGTH
}
,40}/
.
freeze
...
...
@@ -217,7 +216,6 @@ class Commit
@raw
.
respond_to?
(
method
,
include_private
)
||
super
end
# Truncate sha to 7 characters
def
short_id
@raw
.
short_id
(
MIN_SHA_LENGTH
)
end
...
...
lib/gitlab/diff/diff_refs.rb
View file @
19a30595
...
...
@@ -57,8 +57,8 @@ module Gitlab
length
=
[
sha1
.
length
,
sha2
.
length
].
min
# If either of the shas is below
7 characters in
length, we cannot be sure
#
if
they actually refer to the same commit because of hash collision.
# If either of the shas is below
the minimum
length, we cannot be sure
#
that
they actually refer to the same commit because of hash collision.
return
false
if
length
<
Commit
::
MIN_SHA_LENGTH
sha1
[
0
,
length
]
==
sha2
[
0
,
length
]
...
...
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