git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[RFC PATCH 0/1] for-each-ref: do not output empty lines

From
Eric Freese <ericdfreese@gmail.com>
Date
Sep 10, 2019, 05:17 UTC
Message-ID
<20190910051705.2765-1-ericdfreese@gmail.com>
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(-)
-- 
2.23.0
Next: Eric Freese
Message 1 of 5 in “for-each-ref: do not output empty lines”
  1. 0/1 for-each-ref: do not output empty linesEric Freese, Sep 10, 2019
  2. 1/1 for-each-ref: do not output empty linesEric Freese, Sep 10, 2019
  3. Junio C HamanoSep 10, 2019
  4. Junio C HamanoSep 10, 2019
  5. Jeff KingSep 10, 2019

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.