Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH 2/3] log-tree: make name_decoration hash static

From: Junio C Hamano <hidden>
Date: 2016-06-15 23:02:21

Jeff King [off-list ref] writes:
On Tue, Aug 26, 2014 at 10:40:10AM -0700, Junio C Hamano wrote:
quoted
I may have called it lookup_name_decoration() to match, though, if I
were doing this patch ;-)
Hmph. I called it "get" because that was the opposite of "add" to me,
and I was matching "add_name_decoration". Of course, in the regular
decoration code, the add function is also "add" and its opposite is
"lookup". So mine is gratuitously different. I do not mind if you adjust
while applying.
I do not care too deeply either way, either ;-)  I just thought that
sharing the verb with the underlying function being wrapped would be
more consistent.

I wish we used lookup vs get more consistently, though.  One should
mean "give us if we already have one otherwise fail" while the other
should mean "give us one, or create one if there isn't yet".

Unfortunately lookup_commit() and remote_get() both do auto-vivify X-<.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help