summaryrefslogtreecommitdiff
path: root/app/models/commit_range.rb
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2015-04-25 14:59:47 -0400
committerRobert Speicher <rspeicher@gmail.com>2015-04-25 14:59:47 -0400
commit682ec038ac686cd8e0e7161a4a576dc764b61b11 (patch)
tree4168e42d3d7a6273d35e0a23094c5f970a71e5c4 /app/models/commit_range.rb
parent165cacce163366fa3b362bb5005ed9ede346a8e1 (diff)
downloadgitlab-ce-682ec038ac686cd8e0e7161a4a576dc764b61b11.tar.gz
Rename `CommitRange#sha_from_as_param` to `#suffixed_sha_from`rs-refactor-reference-extractor
Diffstat (limited to 'app/models/commit_range.rb')
-rw-r--r--app/models/commit_range.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/app/models/commit_range.rb b/app/models/commit_range.rb
index 67ea4155aec..e6456198264 100644
--- a/app/models/commit_range.rb
+++ b/app/models/commit_range.rb
@@ -61,14 +61,14 @@ class CommitRange
# Returns a String for use in a link's title attribute
def reference_title
- "Commits #{sha_from_as_param} through #{sha_to}"
+ "Commits #{suffixed_sha_from} through #{sha_to}"
end
# Return a Hash of parameters for passing to a URL helper
#
# See `namespace_project_compare_url`
def to_param
- { from: sha_from_as_param, to: sha_to }
+ { from: suffixed_sha_from, to: sha_to }
end
def exclude_start?
@@ -91,7 +91,7 @@ class CommitRange
end
def commit_from
- @commit_from ||= project.repository.commit(sha_from_as_param)
+ @commit_from ||= project.repository.commit(suffixed_sha_from)
end
def commit_to
@@ -100,7 +100,7 @@ class CommitRange
private
- def sha_from_as_param
+ def suffixed_sha_from
sha_from + (exclude_start? ? '^' : '')
end
end