Thread (34 messages) flat view 34 messages, 3 authors, 2016-12-28

Re: [PATCH v9 11/20] ref-filter: introduce refname_atom_parser()

From: Karthik Nayak <hidden>
Date: 2016-12-28 08:03:21

On Wed, Dec 28, 2016 at 2:34 AM, Junio C Hamano [off-list ref] wrote:
Karthik Nayak [off-list ref] writes:
quoted
+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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help