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

Re: [PATCH] commit: Add commit_list prefix to reduce_heads function.

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:50:11

Thiago Farina [off-list ref] writes:
Would these be a candidates for adding commit_list_ prefix?

free_commit_list -> commit_list_free
I think free_commit_list is a reasonable name for a function to free a
commit-list already.
contains
Historically I think we had two functions with this name, and both were
named perfectly fine in the context they were introduced in.

One is "does this haystack contain the needle we are looking for?", which
is a private helper in diffcore-pickaxe.c and considering what that module
does, it is crystal clear that it is about "needle in haystack" without
anything else tucked to its name.

The other is in 'pu' that came from Peff's "How about this" patch to
compute something similar to is-descendant-of more efficiently, while
sacrificing the ability to be usable as a general helper function.

As I already said in the review of that stalled series, the particular
implementation of that function is good enough within the scope of the
command it is used for (namely "tag --contains"); its implementation needs
to be cleaned up, moved from commit.c to builtin/tag.c and made static to
the file, but as long as that happens, it is named appropriately.
pop_most_recent_commit -> I'm not sure about this because of the
length of it, as Jonathan pointed in this thread.
pop_commit
These two do not sound wrong---pop/push implies queue/list-ness and is
quite clear that we are removing the topmost element from it.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help