Commit 510558fb authored by tiagonbotelho's avatar tiagonbotelho

fixes issues for mr acceptance

parent 8df419cb
......@@ -759,8 +759,8 @@ class Repository
update: options[:update]
}
if commit_options[:previous_path]
commit_options[:file].merge!(previous_path: commit_options[:previous_path])
if options[:previous_path]
commit_options[:file][:previous_path] = options[:previous_path]
Gitlab::Git::Blob.rename(raw_repository, commit_options)
else
......
......@@ -4,11 +4,9 @@
= icon('code-fork')
= ref
%span.editor-file-name
- if current_action?(:edit) && can?(current_user, :push_code, @project)
= text_field_tag 'file_name', params[:file_name], placeholder: @path,
-if current_action?(:edit) || current_action?(:update)
= text_field_tag 'file_name', (params[:file_name] or @path),
class: 'form-control new-file-name'
- else
= @path
- if current_action?(:new) || current_action?(:create)
%span.editor-file-name
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment