mbox series

[v2,0/2] branch, for-each-ref: add option to omit empty lines

Message ID 20230406170837.10060-1-oystwa@gmail.com (mailing list archive)
Headers show
Series branch, for-each-ref: add option to omit empty lines | expand

Message

Øystein Walle April 6, 2023, 5:08 p.m. UTC
Changes since v1:

 - Improved commit message in 1/2,
 - Stopped considering flag combinations as an error, which greatly
   simplified the logic,
 - Improved weird test file generation,
 - Removed short option and renamed long option,
 - Changed conditions to check the string length before the flag, which
   imo. reads better.

Øystein Walle (2):
  ref-filter: remove unused ref_format member
  branch, for-each-ref: add option to omit empty lines

 Documentation/git-branch.txt       |  4 ++++
 Documentation/git-for-each-ref.txt |  4 ++++
 ref-filter.h                       |  1 -
 builtin/branch.c                   |  6 +++++-
 builtin/for-each-ref.c             |  7 +++++--
 ref-filter.c                       |  1 -
 t/t3203-branch-output.sh           | 24 ++++++++++++++++++++++++
 t/t6300-for-each-ref.sh            |  8 ++++++++
 8 files changed, 50 insertions(+), 5 deletions(-)

Comments

Junio C Hamano April 6, 2023, 6:24 p.m. UTC | #1
Øystein Walle <oystwa@gmail.com> writes:

> Øystein Walle (2):
>   ref-filter: remove unused ref_format member
>   branch, for-each-ref: add option to omit empty lines
>
>  Documentation/git-branch.txt       |  4 ++++
>  Documentation/git-for-each-ref.txt |  4 ++++
>  ref-filter.h                       |  1 -
>  builtin/branch.c                   |  6 +++++-
>  builtin/for-each-ref.c             |  7 +++++--
>  ref-filter.c                       |  1 -
>  t/t3203-branch-output.sh           | 24 ++++++++++++++++++++++++
>  t/t6300-for-each-ref.sh            |  8 ++++++++
>  8 files changed, 50 insertions(+), 5 deletions(-)

I have always thought that the listing mode of "branch" and "tag"
subcommands is a mere syntax sugar around "for-each-ref", and the
above leaves me puzzled.  Did we decide not to add the same for "git
tag" in the listing mode during the review of the previous round (if
we did, I do not recall the discussion), or would it be just the
matter of adding another 6-line patch to builtin/tag.c?

Thanks.