]> git.ipfire.org Git - thirdparty/git.git/commit - branch.c
branch: add a dry_run parameter to create_branch()
authorGlen Choo <chooglen@google.com>
Sat, 29 Jan 2022 00:04:43 +0000 (16:04 -0800)
committerJunio C Hamano <gitster@pobox.com>
Tue, 1 Feb 2022 22:18:56 +0000 (14:18 -0800)
commit3f3e76082bc29ff647dff16de9f0145a4d582825
tree202f07a599663c3f9659920b2051018852899a1c
parentbc0893cf3b0ee376ef5b6ed293b1525480a9d720
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>
branch.c
branch.h
builtin/branch.c
builtin/checkout.c