summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2012-12-03 13:22:28 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2012-12-03 13:22:28 +0200
commit2d076394aa9e39fc1b6ec58b6cfcf21d0c0345af (patch)
tree835990bfc066230a9edc8bb477f551e786e71b0c
parent0530e5baaee07dd518811f21b227a46e99d1dc53 (diff)
downloadgitlab-ce-2d076394aa9e39fc1b6ec58b6cfcf21d0c0345af.tar.gz
Fix github issue #967
-rw-r--r--app/views/protected_branches/index.html.haml11
1 files changed, 7 insertions, 4 deletions
diff --git a/app/views/protected_branches/index.html.haml b/app/views/protected_branches/index.html.haml
index 50a817124dc..f408fd16c2c 100644
--- a/app/views/protected_branches/index.html.haml
+++ b/app/views/protected_branches/index.html.haml
@@ -39,10 +39,13 @@
- if branch.name == @project.root_ref
%span.label default
%td
- = link_to project_commit_path(@project, branch.commit.id) do
- = truncate branch.commit.id.to_s, length: 10
- = time_ago_in_words(branch.commit.committed_date)
- ago
+ - if branch.commit
+ = link_to project_commit_path(@project, branch.commit.id) do
+ = truncate branch.commit.id.to_s, length: 10
+ = time_ago_in_words(branch.commit.committed_date)
+ ago
+ - else
+ (branch was removed from repository)
%td
- if can? current_user, :admin_project, @project
= link_to 'Unprotect', [@project, branch], confirm: 'Are you sure?', method: :delete, class: "danger btn small"