Re: [PATCH v2 2/2] ls-files: add %(skipworktree) atom to format option
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jan 23, 2023, 22:39 UTC
- Message-ID
- <xmqqmt68lvu6.fsf@gitster.g>
- In-Reply-To
- <CAOLTT8TztbirR9FmD0s_5iPQ9+NETfecXHE8xeJDNXQUNojSJA@mail.gmail.com>
ZheNing Hu <adlternative@gmail.com> writes:
Show 5 quoted lines
>> Perhaps it becomes useful in conjunction with %(if) and friends, >> when they become avaiable? >> ... > Can this strange design be considered as a bad design of %(if) and > %(else) in ref-filter?
Sorry, but I am not sure what "strange design" you are referring to.
On the ref-filter side, thanks to these conditional formatting primitives, a boolean %(token) that gives an empty string vs a non-empty string does make sense for a good design. If another --format="" wants to imitate it, it would be a good idea to first see what part of the implementation can be shared and reused from there.