branch: add a dry_run parameter to create_branch()
Add a dry_run parameter to create_branch() such that dry_run = 1 will validate a new branch without trying to create it. This will be used in `git branch --recurse-submodules` to ensure that the new branch can be created in all submodules. Signed-off-by: Glen Choo <chooglen@google.com> Reviewed-by: Jonathan Tan <jonathantanmy@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
bc0893cf3b
commit
3f3e76082b
@@ -859,7 +859,7 @@ int cmd_branch(int argc, const char **argv, const char *prefix)
|
||||
|
||||
create_branch(the_repository,
|
||||
argv[0], (argc == 2) ? argv[1] : head,
|
||||
force, 0, reflog, quiet, track);
|
||||
force, 0, reflog, quiet, track, 0);
|
||||
|
||||
} else
|
||||
usage_with_options(builtin_branch_usage, options);
|
||||
|
||||
Reference in New Issue
Block a user