Skip to content

RFC/POC: patterns for branch list

Michael J Gruber git 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2branch: allow pattern argumentsbuiltin/branch.c+9 -40 replies
2/2branch: introduce --list argumentbuiltin/branch.c+7 -30 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC/PATCH 0/2] RFC/POC: patterns for branch list

This mini series is about introducing patterns to the list mode of 'git branch' much like the pattern for 'git tag -l'. There are several things which I would like to do but would like to rfc first:

'-l' is the natural short option name for '--list'. This is taken for the rarely used or needed 'create reflog' option. I'd change the latter to '-g,--create-reflog' (cmp. log) and take '-l,--list' but know the reaction already.

'-v' and '-vv' both take considerable time (because they need to walk). It makes more sense to have '-v' display cheap output (upstream name) and '-vv' add expensive output (ahead/behind info). '-vvv' could add super expensive info (ahead/equivalent/behind a la cherry-mark).

But all of the above are changes to current (ui) behaviour. In the two patches below, only the automatic activation of the list mode with -v/-vv is a change of (undocumented) behaviour.

And yes, git-for-each-ref can do all this and more, but that is plumbing.

Michael J Gruber (2):
branch: allow pattern arguments
branch: introduce --list argument

 builtin/branch.c |   21 +++++++++++++++------
 1 files changed, 15 insertions(+), 6 deletions(-)
Signature · 1 line
1.7.5.270.gafca7