Re: [PATCH 2/2] branch, for-each-ref: add option to omit empty lines

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Øystein Walle <oystwa@xxxxxxxxx> writes:

> The logic is more or less duplicated in branch.c and for-each-ref.c
> which I don't like. However I couldn't really find a "central" place to
> put it. Imo. it's definitely not a property of the format or the filter,
> so struct ref_format and struct ref_filter are no good.

I think the division of labor is very much in line with how the
ref-filter API is currently laid out.  Enumerating is done calling
filter_refs(), and result is returned in an array, which the caller
adds whatever frills around its elements to show them in the output.
The "adding frills" is aided by calling format_ref_array_item(), but
the API does not care how the formatting result is used.




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux