Commit 2b555306a11abdd5836f506f42109014dd7f3654
1 parent
c2f74de4
Exists in
master
and in
4 other branches
Prevent 500 error if cant detect branches for commit
Showing
2 changed files
with
12 additions
and
12 deletions
Show diff stats
app/views/projects/commit/_commit_box.html.haml
@@ -39,17 +39,18 @@ | @@ -39,17 +39,18 @@ | ||
39 | - @commit.parents.each do |parent| | 39 | - @commit.parents.each do |parent| |
40 | = link_to parent.id[0...10], project_commit_path(@project, parent) | 40 | = link_to parent.id[0...10], project_commit_path(@project, parent) |
41 | 41 | ||
42 | -.commit-info-row | ||
43 | - %span.cgray | ||
44 | - Exists in | ||
45 | - %span | ||
46 | - - branch = commit_default_branch(@project, @branches) | ||
47 | - = link_to(branch, project_tree_path(@project, branch)) | ||
48 | - - if @branches.any? | ||
49 | - and in | ||
50 | - = link_to("#{pluralize(@branches.count, "other branch")}", "#", class: "js-details-expand") | ||
51 | - %span.js-details-contain.hide | ||
52 | - = commit_branches_links(@project, @branches) | 42 | +- if @branches.any? |
43 | + .commit-info-row | ||
44 | + %span.cgray | ||
45 | + Exists in | ||
46 | + %span | ||
47 | + - branch = commit_default_branch(@project, @branches) | ||
48 | + = link_to(branch, project_tree_path(@project, branch)) | ||
49 | + - if @branches.any? | ||
50 | + and in | ||
51 | + = link_to("#{pluralize(@branches.count, "other branch")}", "#", class: "js-details-expand") | ||
52 | + %span.js-details-contain.hide | ||
53 | + = commit_branches_links(@project, @branches) | ||
53 | 54 | ||
54 | .commit-box | 55 | .commit-box |
55 | %h3.commit-title | 56 | %h3.commit-title |
features/steps/project/project_merge_requests.rb
@@ -109,7 +109,6 @@ class ProjectMergeRequests < Spinach::FeatureSteps | @@ -109,7 +109,6 @@ class ProjectMergeRequests < Spinach::FeatureSteps | ||
109 | end | 109 | end |
110 | 110 | ||
111 | And 'I click on the first commit in the merge request' do | 111 | And 'I click on the first commit in the merge request' do |
112 | - | ||
113 | click_link merge_request.commits.first.short_id(8) | 112 | click_link merge_request.commits.first.short_id(8) |
114 | end | 113 | end |
115 | 114 |