Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2015-05-13 00:58:29 +0300
committerRobert Speicher <rspeicher@gmail.com>2015-05-26 22:48:31 +0300
commit136ab73803850c10588b369862b1e5524849d31c (patch)
tree202968fc761b306920f04976fed18b80d2701dfa /app/models/commit_range.rb
parent9d032cddf5575e2233c81142a3ebc609cd43a47e (diff)
Update CommitRange#to_reference to use full SHAs
We only want them shortened by the filter, which calls to_s
Diffstat (limited to 'app/models/commit_range.rb')
-rw-r--r--app/models/commit_range.rb9
1 files changed, 6 insertions, 3 deletions
diff --git a/app/models/commit_range.rb b/app/models/commit_range.rb
index b98f939a115..fb1f6d09be6 100644
--- a/app/models/commit_range.rb
+++ b/app/models/commit_range.rb
@@ -61,11 +61,14 @@ class CommitRange
end
def to_reference(from_project = nil)
+ # Not using to_s because we want the full SHAs
+ reference = sha_from + notation + sha_to
+
if cross_project_reference?(from_project)
- "#{project.to_reference}@#{to_s}"
- else
- to_s
+ reference = project.to_reference + '@' + reference
end
+
+ reference
end
# Returns a String for use in a link's title attribute