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

2019-09-09 Thread Eric Freese
)%(refname)%(end)" Or to include only symbolic refs, use: "%(if)%(symref)%(then)%(refname)%(end)" Signed-off-by: Eric Freese --- ref-filter.c| 3 ++- t/t6300-for-each-ref.sh | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ref-filter.c b/ref-

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

2019-09-09 Thread Eric Freese
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

Re: [RFC PATCH 1/1] for-each-ref: add '--no-symbolic' option

2019-09-08 Thread Eric Freese
On Sun, Sep 9, 2019 at 4:34 PM Junio C Hamano wrote: > I guess with "%(if)...%(then)...%(else)...%(end)" you might be able > to do either one of --include/--exclude without supporting the > other, e.g. "--include='%(if)%(symref)%(then)%(else)not a > symref%(end)" would be usable as "I do not want

[RFC PATCH 0/1] for-each-ref: Add '--no-symbolic' option

2019-09-07 Thread Eric Freese
I could forsee this option also being added to git-branch and git-tag, but decided to keep it to git-for-each-ref to test the waters before investing any further time into it. Cheers Eric Freese (1): for-each-ref: add '--no-symbolic' option Documentation/git-for-each-ref.txt |

[RFC PATCH 1/1] for-each-ref: add '--no-symbolic' option

2019-09-07 Thread Eric Freese
Using the new flag will omit symbolic refs from the output. Without this flag, it is possible to get this behavior by using the `%(symref)` formatting field name and piping output through grep to include only those refs that do not output a value for `%(symref)`, but having this flag is more elega