summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Gemfile.lock2
-rw-r--r--app/controllers/concerns/creates_commit.rb1
-rw-r--r--app/controllers/projects/blob_controller.rb9
3 files changed, 6 insertions, 6 deletions
diff --git a/Gemfile.lock b/Gemfile.lock
index 055596b056f..199ee684970 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -274,7 +274,7 @@ GEM
diff-lcs (~> 1.1)
mime-types (>= 1.16, < 3)
posix-spawn (~> 0.3)
- gitlab_git (10.2.3)
+ gitlab_git (10.3.0)
activesupport (~> 4.0)
charlock_holmes (~> 0.7.3)
github-linguist (~> 4.7.0)
diff --git a/app/controllers/concerns/creates_commit.rb b/app/controllers/concerns/creates_commit.rb
index a76fcd61b52..f2b8f297bc2 100644
--- a/app/controllers/concerns/creates_commit.rb
+++ b/app/controllers/concerns/creates_commit.rb
@@ -8,7 +8,6 @@ module CreatesCommit
source_project: @project,
source_branch: @ref,
target_branch: @target_branch,
- file_path: @file_path,
previous_path: @previous_path
)
diff --git a/app/controllers/projects/blob_controller.rb b/app/controllers/projects/blob_controller.rb
index fb6ddd0e51d..ac1141b8613 100644
--- a/app/controllers/projects/blob_controller.rb
+++ b/app/controllers/projects/blob_controller.rb
@@ -39,16 +39,17 @@ class Projects::BlobController < Projects::ApplicationController
def update
unless params[:file_name].empty?
- @previous_path = @file_path
- @file_path = params[:file_name]
+ @previous_path = @path
+ @path = params[:file_name]
+ @commit_params[:file_path] = @path
end
after_edit_path =
if from_merge_request && @target_branch == @ref
diffs_namespace_project_merge_request_path(from_merge_request.target_project.namespace, from_merge_request.target_project, from_merge_request) +
- "#file-path-#{hexdigest(@file_path)}"
+ "#file-path-#{hexdigest(@path)}"
else
- namespace_project_blob_path(@project.namespace, @project, File.join(@target_branch, @file_path))
+ namespace_project_blob_path(@project.namespace, @project, File.join(@target_branch, @path))
end
create_commit(Files::UpdateService, success_path: after_edit_path,