Skip to content

RFC for-each-ref: do not output empty lines

Eric Freese git 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest1 patch 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/1for-each-ref: do not output empty linesref-filter.c t/t6300-for-each-ref.sh+4 -33 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/1] for-each-ref: do not output empty lines

Hi,

This is a follow-up patch based on conversation from the thread: "[RFC PATCH 1/1] for-each-ref: add '--no-symbolic' option"

I had proposed a --no-symbolic option to git-for-each-ref that would filter out symbolic refs from the output. It was discovered that the behavior was already possible using an %(if) atom, but with the small caveat that empty lines would be output for each non-symbolic ref.

This patch changes the output behavior of git-for-each-ref such that it only prints lines for refs for which the format string expands to a non-empty string.

If this is deemed to be too disruptive of a change, a new command option could be added to opt in to the new behavior.

Cheers

Eric Freese (1):
for-each-ref: do not output empty lines

 ref-filter.c            | 3 ++-
 t/t6300-for-each-ref.sh | 4 ++--
 2 files changed, 4 insertions(+), 3 deletions(-)
Signature · 1 line
2.23.0