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
Boxiang Sun
gitlab-ce
Commits
92a43826
Commit
92a43826
authored
Nov 15, 2016
by
Lin Jen-Shin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix issues found by rubocop
parent
0b5a2eef
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
6 deletions
+14
-6
app/models/repository.rb
app/models/repository.rb
+14
-6
No files found.
app/models/repository.rb
View file @
92a43826
...
...
@@ -786,7 +786,8 @@ class Repository
@root_ref
||=
cache
.
fetch
(
:root_ref
)
{
raw_repository
.
root_ref
}
end
def
commit_dir
(
user
,
path
,
message
,
branch
,
def
commit_dir
(
user
,
path
,
message
,
branch
,
author_email:
nil
,
author_name:
nil
,
source_branch:
nil
)
update_branch_with_hooks
(
user
,
...
...
@@ -806,7 +807,9 @@ class Repository
end
end
def
commit_file
(
user
,
path
,
content
,
message
,
branch
,
update
,
# rubocop:disable Metrics/ParameterLists
def
commit_file
(
user
,
path
,
content
,
message
,
branch
,
update
,
author_email:
nil
,
author_name:
nil
,
source_branch:
nil
)
update_branch_with_hooks
(
user
,
...
...
@@ -830,8 +833,11 @@ class Repository
Gitlab
::
Git
::
Blob
.
commit
(
raw_repository
,
options
)
end
end
# rubocop:enable Metrics/ParameterLists
def
update_file
(
user
,
path
,
content
,
# rubocop:disable Metrics/ParameterLists
def
update_file
(
user
,
path
,
content
,
branch
:,
previous_path
:,
message
:,
author_email:
nil
,
author_name:
nil
,
source_branch:
nil
)
update_branch_with_hooks
(
...
...
@@ -861,8 +867,10 @@ class Repository
end
end
end
# rubocop:enable Metrics/ParameterLists
def
remove_file
(
user
,
path
,
message
,
branch
,
def
remove_file
(
user
,
path
,
message
,
branch
,
author_email:
nil
,
author_name:
nil
,
source_branch:
nil
)
update_branch_with_hooks
(
user
,
...
...
@@ -885,14 +893,14 @@ class Repository
end
end
def
multi_action
(
user
:,
branch
:,
message
:,
actions
:,
def
multi_action
(
user
:,
branch
:,
message
:,
actions
:,
author_email:
nil
,
author_name:
nil
,
source_branch:
nil
)
update_branch_with_hooks
(
user
,
branch
,
source_branch:
source_branch
)
do
|
ref
|
index
=
rugged
.
index
parents
=
[]
last_commit
=
find_branch
(
ref
).
dereferenced_target
index
.
read_tree
(
last_commit
.
raw_commit
.
tree
)
...
...
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