From: Johannes Sixt Date: Fri, 22 May 2026 06:18:50 GMT Subject: Re: [PATCH v10 1/4] branch: add --forked Message-ID: <273103d7-c816-4cde-9e89-b630c37b0749@kdbg.org> In-Reply-To: Am 22.05.26 um 00:40 schrieb Harald Nordgren via GitGitGadget: > diff --git a/Documentation/git-branch.adoc b/Documentation/git-branch.adoc > index c0afddc424..3a421f6663 100644 > --- a/Documentation/git-branch.adoc > +++ b/Documentation/git-branch.adoc > @@ -24,6 +24,7 @@ git branch (-m|-M) [] > git branch (-c|-C) [] > git branch (-d|-D) [-r] ... > git branch --edit-description [] > +git branch --forked ... I would have preferred that this option is another filter of --list mode, not its own mode of operation. Consequently, each --forked option would take only a single argument (which can contain globs), and can be given multiple times. > > DESCRIPTION > ----------- > @@ -199,6 +200,12 @@ This option is only applicable in non-verbose mode. > Print the name of the current branch. In detached `HEAD` state, > nothing is printed. > > +`--forked`:: > + List local branches whose configured upstream matches any > + of the given __ arguments. Each argument is either > + a ref (e.g. `origin/master`, `master`) or a shell-style > + glob (e.g. `'origin/*'`). Multiple arguments are unioned. So this could perhaps read: `--forked`:: List only branches whose configured upstream matches __. The argument can contain a shell-style glob (e.g. `'origin/*'`). The option can be repeated to widen the filter. Note that there is no reason to say "local branches". ("... are unioned" sounds strange, so this is may attempt to express the same in a different way.) 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. -- Hannes