Re: [PATCH 4/6] [GSOC] ref-filter: add %(rest) atom and --rest option
- From
ZheNing Hu <adlternative@gmail.com>
- Date
- Jun 8, 2021, 12:32 UTC
- Message-ID
- <CAOLTT8SfXq9k1EHOx5a+26Hm5Xk8NerREUb5N6fOcAOv0GOZsQ@mail.gmail.com>
- In-Reply-To
- <xmqqo8cgq28e.fsf@gitster.g>
Junio C Hamano <gitster@pobox.com> 于2021年6月8日周二 下午2:50写道:
Show 9 quoted lines
> > ZheNing Hu <adlternative@gmail.com> writes: > > > First of all, although %(rest) is meaningless in ordinary circumstances, > > ref-filter must learn %(rest), it is impossible for us to leave the parsing > > of %(rest) in cat-file.c alone. > > Oh, there is no question about that. >
OK.
Show 10 quoted lines
> > I don't understand. Why do you even need to add --reject? Why > would any user would want to use it with for-each-ref? > > Without any end-user input, %(rest) for for-each-ref would not make > sense, and %(refname) for cat-file --batch would not make sense, I > would imagine, so there is no need to be able to tell --reject=rest > to for-each-ref. It is not like giving --no-reject=rest to for-each-ref > and make it interpolate to an empty string is a useful feature anyway, > so I do not see a need for such an option.
Yeah... I might have thought it complicated before. We can reject %(rest) in verify_ref_format() easily. It's like we refused --<lang> before. :)
Thanks. -- ZheNing Hu