Skip to content
Snippets Groups Projects
Commit afecb250 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

Dont show compare link if only one commit in push

parent e0d0c1b2
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -18,9 +18,10 @@
- few_commits.each do |commit|
= render "events/commit", commit: commit, project: project
 
%li.commits-stat
- if event.commits_count > 2
%span ... and #{event.commits_count - 2} more commits.
= link_to project_compare_path(event.project, from: event.parent_commit.id, to: event.last_commit.id) do
%strong Compare → #{event.parent_commit.id[0..7]}...#{event.last_commit.id[0..7]}
- if event.commits_count > 1
%li.commits-stat
- if event.commits_count > 2
%span ... and #{event.commits_count - 2} more commits.
= link_to project_compare_path(event.project, from: event.parent_commit.id, to: event.last_commit.id) do
%strong Compare → #{event.parent_commit.id[0..7]}...#{event.last_commit.id[0..7]}
.clearfix
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