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
0
Merge Requests
0
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
Tatuya Kamada
gitlab-ce
Commits
a6394540
Commit
a6394540
authored
Jan 06, 2017
by
Lin Jen-Shin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix renaming
parent
ccc73c45
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
9 additions
and
9 deletions
+9
-9
lib/api/commits.rb
lib/api/commits.rb
+1
-1
lib/api/files.rb
lib/api/files.rb
+1
-1
spec/features/projects/files/editing_a_file_spec.rb
spec/features/projects/files/editing_a_file_spec.rb
+1
-1
spec/lib/gitlab/diff/position_tracer_spec.rb
spec/lib/gitlab/diff/position_tracer_spec.rb
+3
-3
spec/models/repository_spec.rb
spec/models/repository_spec.rb
+1
-1
spec/services/files/update_service_spec.rb
spec/services/files/update_service_spec.rb
+2
-2
No files found.
lib/api/commits.rb
View file @
a6394540
...
@@ -55,7 +55,7 @@ module API
...
@@ -55,7 +55,7 @@ module API
authorize!
:push_code
,
user_project
authorize!
:push_code
,
user_project
attrs
=
declared_params
attrs
=
declared_params
attrs
[
:s
ource
_branch
]
=
attrs
[
:branch_name
]
attrs
[
:s
tart
_branch
]
=
attrs
[
:branch_name
]
attrs
[
:target_branch
]
=
attrs
[
:branch_name
]
attrs
[
:target_branch
]
=
attrs
[
:branch_name
]
attrs
[
:actions
].
map!
do
|
action
|
attrs
[
:actions
].
map!
do
|
action
|
action
[
:action
]
=
action
[
:action
].
to_sym
action
[
:action
]
=
action
[
:action
].
to_sym
...
...
lib/api/files.rb
View file @
a6394540
...
@@ -5,7 +5,7 @@ module API
...
@@ -5,7 +5,7 @@ module API
def
commit_params
(
attrs
)
def
commit_params
(
attrs
)
{
{
file_path:
attrs
[
:file_path
],
file_path:
attrs
[
:file_path
],
s
ource
_branch:
attrs
[
:branch_name
],
s
tart
_branch:
attrs
[
:branch_name
],
target_branch:
attrs
[
:branch_name
],
target_branch:
attrs
[
:branch_name
],
commit_message:
attrs
[
:commit_message
],
commit_message:
attrs
[
:commit_message
],
file_content:
attrs
[
:content
],
file_content:
attrs
[
:content
],
...
...
spec/features/projects/files/editing_a_file_spec.rb
View file @
a6394540
...
@@ -7,7 +7,7 @@ feature 'User wants to edit a file', feature: true do
...
@@ -7,7 +7,7 @@ feature 'User wants to edit a file', feature: true do
let
(
:user
)
{
create
(
:user
)
}
let
(
:user
)
{
create
(
:user
)
}
let
(
:commit_params
)
do
let
(
:commit_params
)
do
{
{
s
ource
_branch:
project
.
default_branch
,
s
tart
_branch:
project
.
default_branch
,
target_branch:
project
.
default_branch
,
target_branch:
project
.
default_branch
,
commit_message:
"Committing First Update"
,
commit_message:
"Committing First Update"
,
file_path:
".gitignore"
,
file_path:
".gitignore"
,
...
...
spec/lib/gitlab/diff/position_tracer_spec.rb
View file @
a6394540
...
@@ -99,7 +99,7 @@ describe Gitlab::Diff::PositionTracer, lib: true do
...
@@ -99,7 +99,7 @@ describe Gitlab::Diff::PositionTracer, lib: true do
Files
::
CreateService
.
new
(
Files
::
CreateService
.
new
(
project
,
project
,
current_user
,
current_user
,
s
ource
_branch:
branch_name
,
s
tart
_branch:
branch_name
,
target_branch:
branch_name
,
target_branch:
branch_name
,
commit_message:
"Create file"
,
commit_message:
"Create file"
,
file_path:
file_name
,
file_path:
file_name
,
...
@@ -112,7 +112,7 @@ describe Gitlab::Diff::PositionTracer, lib: true do
...
@@ -112,7 +112,7 @@ describe Gitlab::Diff::PositionTracer, lib: true do
Files
::
UpdateService
.
new
(
Files
::
UpdateService
.
new
(
project
,
project
,
current_user
,
current_user
,
s
ource
_branch:
branch_name
,
s
tart
_branch:
branch_name
,
target_branch:
branch_name
,
target_branch:
branch_name
,
commit_message:
"Update file"
,
commit_message:
"Update file"
,
file_path:
file_name
,
file_path:
file_name
,
...
@@ -125,7 +125,7 @@ describe Gitlab::Diff::PositionTracer, lib: true do
...
@@ -125,7 +125,7 @@ describe Gitlab::Diff::PositionTracer, lib: true do
Files
::
DeleteService
.
new
(
Files
::
DeleteService
.
new
(
project
,
project
,
current_user
,
current_user
,
s
ource
_branch:
branch_name
,
s
tart
_branch:
branch_name
,
target_branch:
branch_name
,
target_branch:
branch_name
,
commit_message:
"Delete file"
,
commit_message:
"Delete file"
,
file_path:
file_name
file_path:
file_name
...
...
spec/models/repository_spec.rb
View file @
a6394540
...
@@ -280,7 +280,7 @@ describe Repository, models: true do
...
@@ -280,7 +280,7 @@ describe Repository, models: true do
expect
do
expect
do
repository
.
commit_dir
(
user
,
'newdir'
,
repository
.
commit_dir
(
user
,
'newdir'
,
message:
'Create newdir'
,
branch_name:
'patch'
,
message:
'Create newdir'
,
branch_name:
'patch'
,
s
ource_branch_name:
'master'
,
source
_project:
forked_project
)
s
tart_branch_name:
'master'
,
start
_project:
forked_project
)
end
.
to
change
{
repository
.
commits
(
'master'
).
count
}.
by
(
0
)
end
.
to
change
{
repository
.
commits
(
'master'
).
count
}.
by
(
0
)
expect
(
repository
.
branch_exists?
(
'patch'
)).
to
be_truthy
expect
(
repository
.
branch_exists?
(
'patch'
)).
to
be_truthy
...
...
spec/services/files/update_service_spec.rb
View file @
a6394540
...
@@ -17,8 +17,8 @@ describe Files::UpdateService do
...
@@ -17,8 +17,8 @@ describe Files::UpdateService do
file_content:
new_contents
,
file_content:
new_contents
,
file_content_encoding:
"text"
,
file_content_encoding:
"text"
,
last_commit_sha:
last_commit_sha
,
last_commit_sha:
last_commit_sha
,
s
ource
_project:
project
,
s
tart
_project:
project
,
s
ource
_branch:
project
.
default_branch
,
s
tart
_branch:
project
.
default_branch
,
target_branch:
target_branch
target_branch:
target_branch
}
}
end
end
...
...
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