]> git.ipfire.org Git - thirdparty/git.git/commit - builtin/branch.c
branch, for-each-ref, tag: add option to omit empty lines
authorØystein Walle <oystwa@gmail.com>
Fri, 7 Apr 2023 17:53:16 +0000 (19:53 +0200)
committerJunio C Hamano <gitster@pobox.com>
Thu, 13 Apr 2023 15:07:45 +0000 (08:07 -0700)
commitaabfdc9514a51d8d9a2f3afbc29e5044ccf7191b
treece139c4fbbe04454b87b128865b2047f8ae5070f
parent73876f4861cd3d187a4682290ab75c9dccadbc56
branch, for-each-ref, tag: add option to omit empty lines

If the given format string expands to the empty string, a newline is
still printed. This makes using the output linewise more tedious. For
example, git update-ref --stdin does not accept empty lines.

Add options to "git branch", "git for-each-ref", and "git tag" to
not print these empty lines.  The default behavior remains the same.

Signed-off-by: Øystein Walle <oystwa@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-branch.txt
Documentation/git-for-each-ref.txt
Documentation/git-tag.txt
builtin/branch.c
builtin/for-each-ref.c
builtin/tag.c
t/t3203-branch-output.sh
t/t6300-for-each-ref.sh
t/t7004-tag.sh