]> git.ipfire.org Git - thirdparty/git.git/commit
branch: let delete_branches warn instead of error on bulk refusal
authorHarald Nordgren <haraldnordgren@gmail.com>
Wed, 3 Jun 2026 09:04:35 +0000 (09:04 +0000)
committerJunio C Hamano <gitster@pobox.com>
Wed, 3 Jun 2026 10:10:04 +0000 (19:10 +0900)
commit0ce3d598de4b08d8af30b41f07eded459d6c164b
tree5171bb5125d80e0cbb1ecdcbc9ed3ec3434b8fbf
parentb201bdb32d1a7074924c9c61d0be4cba36a01620
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