diff options
author | Jarka Kadlecova <jarka@gitlab.com> | 2017-11-22 14:20:35 +0100 |
---|---|---|
committer | Jarka Kadlecova <jarka@gitlab.com> | 2017-11-23 12:59:14 +0100 |
commit | e826c5d0917a7fe2225fb6ba0862bc56c1ef3fc2 (patch) | |
tree | e3e140a141541109d6cd23d8a36899ea57a20298 /app/models/commit.rb | |
parent | 6369db0196ec7b6e288b16382c95243424a59b62 (diff) | |
download | gitlab-ce-e826c5d0917a7fe2225fb6ba0862bc56c1ef3fc2.tar.gz |
Fix link text from group context
Diffstat (limited to 'app/models/commit.rb')
-rw-r--r-- | app/models/commit.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/app/models/commit.rb b/app/models/commit.rb index 8401d99a08f..6b28d290f99 100644 --- a/app/models/commit.rb +++ b/app/models/commit.rb @@ -109,12 +109,12 @@ class Commit @link_reference_pattern ||= super("commit", /(?<commit>#{COMMIT_SHA_PATTERN})/) end - def to_reference(from_project = nil, full: false) - commit_reference(from_project, id, full: full) + def to_reference(from = nil, full: false) + commit_reference(from, id, full: full) end - def reference_link_text(from_project = nil, full: false) - commit_reference(from_project, short_id, full: full) + def reference_link_text(from = nil, full: false) + commit_reference(from, short_id, full: full) end def diff_line_count @@ -381,8 +381,8 @@ class Commit private - def commit_reference(from_project, referable_commit_id, full: false) - reference = project.to_reference(from_project, full: full) + def commit_reference(from, referable_commit_id, full: false) + reference = project.to_reference(from, full: full) if reference.present? "#{reference}#{self.class.reference_prefix}#{referable_commit_id}" |