Commit c916f293 authored by Lin Jen-Shin's avatar Lin Jen-Shin

Add some explanation to Repository#update_branch_with_hooks

parent e866985b
...@@ -1146,8 +1146,11 @@ class Repository ...@@ -1146,8 +1146,11 @@ class Repository
fetch_ref(path_to_repo, ref, ref_path) fetch_ref(path_to_repo, ref, ref_path)
end end
# Whenever `source_branch` is passed, if `branch` doesn't exist, it would # Whenever `source_branch` or `source_commit` is passed, if `branch`
# be created from `source_branch`. # doesn't exist, it would be created from `source_branch` or
# `source_commit`. Should only pass one of them, not both.
# If `source_project` is passed, and the branch doesn't exist,
# it would try to find the source from it instead of current repository.
def update_branch_with_hooks( def update_branch_with_hooks(
current_user, branch, current_user, branch,
source_branch: nil, source_commit: nil, source_project: project) source_branch: nil, source_commit: nil, source_project: project)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment