提交 39d83f72 编写于 作者: L Lin Jen-Shin

Add a few comments to explain implementation detail

上级 a68a6201
......@@ -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
......
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册