Re: [PATCH v10 1/4] branch: add --forked <branch>
From: Johannes Sixt <hidden>
Date: 2026-05-22 11:25:22
Am 22.05.26 um 12:49 schrieb Harald Nordgren:
quoted
Johannes Sixt [off-list ref] writes:quoted
The icing on the cake would now be that git branch --merged origin/main --forked origin/* provides the list of branches forked from origin that have already been integrated.Yup, that is very nice. Also with "--merged" replaced with "--not-merged", i.e., "our work building on top of origin's, and still need to be finished", would give us a good list to work on.This is nice, but I think this would require an overhaul of other infra as well, maybe better to do as a follow-up?
This can certainly be done as an extension in a follow-up patch. But the
UI must still be planned accordingly, i.e., --forked can only take a
single argument. For example, in
git branch --forked foo bar
'bar' is the pattern of branches to show. The "list" is filtered
according to '--forked foo'. That is, if 'bar' was not forked from
'foo', the output is empty.
You would have to require
git branch --forked foo --forked bar
to list all branches forked from 'foo' or 'bar'.
In the first implementation, you can restrict uses of other options with
--forked or even with a branch pattern. But you cannot be loose by
accepting multiple branch patterns with one --forked option, because
that would later clash with --list mode.
-- Hannes