Skip to content
Snippets Groups Projects
Commit 682ec038 authored by Robert Speicher's avatar Robert Speicher
Browse files

Rename `CommitRange#sha_from_as_param` to `#suffixed_sha_from`

parent 165cacce
No related branches found
No related tags found
2 merge requests!9212Project deletion performance fix,!9211Log location documentation fix
Loading
Loading
@@ -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?
Loading
Loading
@@ -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
Loading
Loading
@@ -100,7 +100,7 @@ class CommitRange
 
private
 
def sha_from_as_param
def suffixed_sha_from
sha_from + (exclude_start? ? '^' : '')
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment