Re: [PATCH] branch: let --delete-merged default to every upstream
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Oct 2, 2026, 17:11 UTC
- Message-ID
- <xmqq8q4gxc1w.fsf@gitster.g>
- In-Reply-To
- <pull.2428.git.git.1790960147943.gitgitgadget@gmail.com>
"Harald Nordgren via GitGitGadget" <gitgitgadget@gmail.com> writes:
> From: Harald Nordgren <haraldnordgren@gmail.com> > > Cleaning up every branch whose work has landed upstream required > typing '*/*' as the pattern.
This description and what the code actually does contradict with each other, I wonder?
> Let a bare "git branch --delete-merged" consider every upstream. As > with "--merged" without a commit, this applies only when the option > comes last, so "git branch --dry-run --delete-merged" previews the > cleanup.
There are many options ('--merged', '--no-merged', '--contains', '--no-contains', '--unset-upstream', '--edit-description') that default to the current branch, which is a very natural thing within the context of git. Is defaulting to '**' is a good comparison to them? I dunno.
> + .defval = (intptr_t) "**", > + },