Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
ac30c60a
Commit
ac30c60a
authored
Jul 01, 2016
by
tiagonbotelho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
successfully adds the new version with the updated name on the projects repo
parent
b34310ae
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
+7
-2
app/controllers/concerns/creates_commit.rb
app/controllers/concerns/creates_commit.rb
+2
-1
app/controllers/projects/blob_controller.rb
app/controllers/projects/blob_controller.rb
+5
-1
No files found.
app/controllers/concerns/creates_commit.rb
View file @
ac30c60a
...
...
@@ -7,7 +7,8 @@ module CreatesCommit
commit_params
=
@commit_params
.
merge
(
source_project:
@project
,
source_branch:
@ref
,
target_branch:
@target_branch
target_branch:
@target_branch
,
file_path:
@path
)
result
=
service
.
new
(
@tree_edit_project
,
current_user
,
commit_params
).
execute
...
...
app/controllers/projects/blob_controller.rb
View file @
ac30c60a
...
...
@@ -44,7 +44,11 @@ class Projects::BlobController < Projects::ApplicationController
"#file-path-
#{
hexdigest
(
@path
)
}
"
else
# params[:file_name] stores the new name for the file
namespace_project_blob_path
(
@project
.
namespace
,
@project
,
File
.
join
(
@target_branch
,
params
[
:file_name
]))
unless
params
[
:file_name
]
==
@path
@path
=
params
[
:file_name
]
end
namespace_project_blob_path
(
@project
.
namespace
,
@project
,
File
.
join
(
@target_branch
,
@path
))
end
create_commit
(
Files
::
UpdateService
,
success_path:
after_edit_path
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment