Re: [PATCH v9 11/20] ref-filter: introduce refname_atom_parser()
- From
Karthik Nayak <karthik.188@gmail.com>
- Date
- Dec 28, 2016, 07:56 UTC
- Message-ID
- <CAOLa=ZR2VF5mEf83A0pmkdAVLPxhUaBhWo=SVjOAUyjRR=QzjA@mail.gmail.com>
- In-Reply-To
- <xmqqtw9p6phx.fsf@gitster.mtv.corp.google.com>
On Wed, Dec 28, 2016 at 2:34 AM, Junio C Hamano <gitster@pobox.com> wrote:
Show 19 quoted lines
> Karthik Nayak <karthik.188@gmail.com> writes: > >> +symref:: >> + The ref which the given symbolic ref refers to. If not a >> + symbolic ref, nothing is printed. Respects the `:short` and >> + `:strip` options in the same way as `refname` above. >> + > > I am slightly unhappy with this name. If we had an atom that lets > you ask "Is this a symref?" and yields "" or "->", it could also be > called symref, and we would name it "is_symref" or something to > disambiguate it. Then it is only fair to give this one that lets > you ask "What does this symref point at?" a bit more specific name, > like "symref_target" or something. > > But probably I am worried too much. "is_symref", if necessary, can > be written as "%(if:notequals=)%(symref)%(then)...%(else)...%(end)" > and it is not likely that it would be used often, so let's keep it > as-is.
You're probably right about it not being the right name, since symref doesn't indicate that the atom will print the ref being pointed to, but the name 'symref' is short and I guess its easily understandable.
-- Regards, Karthik Nayak