git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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) "**",
> +		},
Previous: Harald Nordgren via GitGitGadgetNext: Harald Nordgren via GitGitGadget
Message 2 of 8 in “branch: let --delete-merged default to every upstream”
  1. branch: let --delete-merged default to every upstreamHarald Nordgren via GitGitGadget, Oct 2, 2026
  2. Junio C HamanoOct 2, 2026
  3. branch: let --delete-merged default to every upstreamHarald Nordgren via GitGitGadget, Oct 4, 2026
  4. Phillip WoodOct 4, 2026
  5. Harald NordgrenOct 4, 2026
  6. Phillip WoodOct 4, 2026
  7. Harald NordgrenOct 4, 2026
  8. Junio C HamanoOct 5, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.