mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-15 07:36:41 +10:00
Prevent 500 after merge MR if you check remove source branch
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
This commit is contained in:
@@ -66,7 +66,14 @@ module TreeHelper
|
||||
end
|
||||
|
||||
def edit_blob_link(project, ref, path, options = {})
|
||||
if project.repository.blob_at(ref, path).text?
|
||||
blob =
|
||||
begin
|
||||
project.repository.blob_at(ref, path)
|
||||
rescue
|
||||
nil
|
||||
end
|
||||
|
||||
if blob && blob.text?
|
||||
text = 'Edit'
|
||||
after = options[:after] || ''
|
||||
from_mr = options[:from_merge_request_id]
|
||||
|
||||
Reference in New Issue
Block a user