diff options
author | Glen Choo <chooglen@google.com> | 2022-01-29 00:04:43 (GMT) |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-02-01 22:18:56 (GMT) |
commit | 3f3e76082bc29ff647dff16de9f0145a4d582825 (patch) | |
tree | 202f07a599663c3f9659920b2051018852899a1c /builtin/branch.c | |
parent | bc0893cf3b0ee376ef5b6ed293b1525480a9d720 (diff) | |
download | git-3f3e76082bc29ff647dff16de9f0145a4d582825.zip git-3f3e76082bc29ff647dff16de9f0145a4d582825.tar.gz git-3f3e76082bc29ff647dff16de9f0145a4d582825.tar.bz2 |
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>
Diffstat (limited to 'builtin/branch.c')
-rw-r--r-- | builtin/branch.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/branch.c b/builtin/branch.c index 6768252..0a49de0 100644 --- a/builtin/branch.c +++ b/builtin/branch.c @@ -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); |