diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-06-11 23:08:39 +0400 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-06-11 23:08:39 +0400 |
commit | e740a00ed659221929a79e580634424423690514 (patch) | |
tree | 0f785529cd9a36878afb5313054e9baf9f773980 /app | |
parent | 4b6c93c127799d088e16be5028088c0d6f48b578 (diff) |
Prevent commit page error if cant collect branches where commit exists
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/projects/commit_controller.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/app/controllers/projects/commit_controller.rb b/app/controllers/projects/commit_controller.rb index c56df65dcba..860ab408299 100644 --- a/app/controllers/projects/commit_controller.rb +++ b/app/controllers/projects/commit_controller.rb @@ -12,7 +12,12 @@ class Projects::CommitController < Projects::ApplicationController return git_not_found! unless @commit @line_notes = project.notes.for_commit_id(commit.id).inline - @branches = project.repository.branch_names_contains(commit.id) + + @branches = begin + project.repository.branch_names_contains(commit.id) + rescue Grit::Git::GitTimeout + [] + end begin @suppress_diff = true if commit.diff_suppress? && !params[:force_show_diff] |