]> git.ipfire.org Git - thirdparty/git.git/commit
branch: let delete_branches warn instead of error on bulk refusal
authorHarald Nordgren <haraldnordgren@gmail.com>
Fri, 22 May 2026 11:31:34 +0000 (11:31 +0000)
committerJunio C Hamano <gitster@pobox.com>
Sun, 24 May 2026 08:41:07 +0000 (17:41 +0900)
commited58862e5582830e5c4441a3ecb987135b902135
treedb3fb3c765c66281c418edb7110d1f77dc89ee86
parent9b7b78adc0bd93edff9501d5f8e740f63fe40f6b
branch: let delete_branches warn instead of error on bulk refusal

Add a warn_only flag to delete_branches() and check_branch_commit()
so a bulk caller can report not-fully-merged branches as one-line
warnings and continue, instead of erroring with the four-line "use
'git branch -D'" advice that the standalone "git branch -d" path
emits.  Default callers pass 0 and are unaffected.

Signed-off-by: Harald Nordgren <haraldnordgren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/branch.c