Re: [PATCH v9 11/20] ref-filter: introduce refname_atom_parser()
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Dec 27, 2016, 21:04 UTC
- Message-ID
- <xmqqtw9p6phx.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <20161227162357.28212-12-Karthik.188@gmail.com>
Karthik Nayak <karthik.188@gmail.com> writes:
Show 5 quoted lines
> +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.