git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Thiago Farina <tfransosi@gmail.com>
Date
Dec 5, 2010, 21:29 UTC
Message-ID
<AANLkTi=QK=N+_iGR9-47JKFs_SDKujJ8c4mtnnM0yo94@mail.gmail.com>
In-Reply-To
<7vk4joszcj.fsf@alter.siamese.dyndns.org>
On Sun, Dec 5, 2010 at 7:07 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 18 quoted lines
> Thiago Farina <tfransosi@gmail.com> writes:
>
>> Also I thought that as Junio already picked up the other patch. It's
>> was a hint that the other functions that has "struct commit_list *l"
>> as its parameters could be renamed as well.
>
> You took a wrong hint and I think that is because you didn't think about
> what naming is for.
>
> "insert-by-date" does not say _why_ you want things to be inserted by date
> (neither "sort-by-date").  They are pretty generic looking names for any
> function that deal with a list of elements that record date.  It makes
> sense to anticipate there will be many other such functions that deal with
> different kinds of lists that hold date-recording things, and naming one
> of them "this deals with list of COMMITS" by saying "commit_list_foo"
> makes quite a lot of sense, as "insert-by-date" does not give sufficient
> information to the reader.
>

That makes sense to me. And clarified why the complain at all. And you are right.

Would these be a candidates for adding commit_list_ prefix?

free_commit_list -> commit_list_free contains pop_most_recent_commit -> I'm not sure about this because of the length of it, as Jonathan pointed in this thread. pop_commit

Previous: Junio C HamanoNext: Junio C Hamano
Message 8 of 13 in “commit: Add commit_list prefix to reduce_heads function.”
  1. commit: Add commit_list prefix to reduce_heads function.Thiago Farina, Dec 5, 2010
  2. Jonathan NiederDec 5, 2010
  3. Thiago FarinaDec 5, 2010
  4. Jonathan NiederDec 5, 2010
  5. Thiago FarinaDec 5, 2010
  6. Thiago FarinaDec 5, 2010
  7. Junio C HamanoDec 5, 2010
  8. Thiago FarinaDec 5, 2010
  9. Junio C HamanoDec 6, 2010
  10. Junio C HamanoDec 6, 2010
  11. Junio C HamanoDec 5, 2010
  12. Thiago FarinaDec 5, 2010
  13. Junio C HamanoDec 5, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.