On Mon, Sep 09, 2019 at 11:02:07PM -0700, Junio C Hamano wrote:
> Eric Freese writes:
>
> > If the format string expands to an empty string for a given ref, do not
> > print the empty line.
> >
> > This is helpful when wanting to print only certain kinds of refs that
> > you can't already filter
Junio C Hamano writes:
>> fwrite(final_buf.buf, 1, final_buf.len, stdout);
>> +if (final_buf.len)
>> +putchar('\n');
>
> While we are introducing a conditional, let's drop the useless
> fwrite of 0-byte while we are at it [*1*], i.e.
>
> if (final_buf.len && !omit_empty
Eric Freese writes:
> If the format string expands to an empty string for a given ref, do not
> print the empty line.
>
> This is helpful when wanting to print only certain kinds of refs that
> you can't already filter for.
We tend to prefer stating the reason why we want to do so first and
then
If the format string expands to an empty string for a given ref, do not
print the empty line.
This is helpful when wanting to print only certain kinds of refs that
you can't already filter for.
For example, to exclude symbolic refs, use format string:
"%(if)%(symref)%(then)%(else)%(refname)%(en
4 matches
Mail list logo