diff options
author | Douwe Maan <douwe@selenight.nl> | 2017-09-25 10:23:43 +0200 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2017-09-25 10:23:43 +0200 |
commit | 19a30595d90d771ffd6ae0be8ada0842b151e3f6 (patch) | |
tree | 0d8182be4ff61205bf6f9c04e03fa7058c6f01d3 | |
parent | 91b40b3bab63b1b9dae4f3efa54f259b09c6eab3 (diff) | |
download | gitlab-ce-19a30595d90d771ffd6ae0be8ada0842b151e3f6.tar.gz |
Remove unnecessary comments
-rw-r--r-- | app/models/commit.rb | 2 | ||||
-rw-r--r-- | lib/gitlab/diff/diff_refs.rb | 4 |
2 files changed, 2 insertions, 4 deletions
diff --git a/app/models/commit.rb b/app/models/commit.rb index c85b5b93607..6dba154a6ea 100644 --- a/app/models/commit.rb +++ b/app/models/commit.rb @@ -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 diff --git a/lib/gitlab/diff/diff_refs.rb b/lib/gitlab/diff/diff_refs.rb index 1c4c1deb7a9..c98eefbce25 100644 --- a/lib/gitlab/diff/diff_refs.rb +++ b/lib/gitlab/diff/diff_refs.rb @@ -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] |