BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
39d83f72
Commit
39d83f72
authored
Nov 15, 2016
by
Lin Jen-Shin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a few comments to explain implementation detail
parent
a68a6201
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
0 deletions
+5
-0
repository.rb
app/models/repository.rb
+2
-0
base_service.rb
app/services/files/base_service.rb
+3
-0
No files found.
app/models/repository.rb
View file @
39d83f72
...
...
@@ -1121,6 +1121,8 @@ class Repository
fetch_ref
(
path_to_repo
,
ref
,
ref_path
)
end
# Whenever `source_branch` is passed, if `branch` doesn't exist, it would
# be created from `source_branch`.
def
update_branch_with_hooks
(
current_user
,
branch
,
source_branch:
nil
)
update_autocrlf_option
...
...
app/services/files/base_service.rb
View file @
39d83f72
...
...
@@ -75,6 +75,9 @@ module Files
validate_target_branch
if
@source_project
!=
project
# Make sure we have the source_branch in target project,
# and use source_branch as target_branch directly to avoid
# unnecessary source branch in target project.
@project
.
fetch_ref
(
@source_project
,
@target_branch
,
@source_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