git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Thiago Farina <tfransosi@gmail.com>
Cc: Jonathan Nieder <jrnieder@gmail.com>, git@vger.kernel.org
Subject: Re: [PATCH] commit: Add commit_list prefix to reduce_heads function.
Date: Sun, 05 Dec 2010 19:58:12 -0800	[thread overview]
Message-ID: <7vbp4ztuwb.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <AANLkTi=QK=N+_iGR9-47JKFs_SDKujJ8c4mtnnM0yo94@mail.gmail.com> (Thiago Farina's message of "Sun\, 5 Dec 2010 19\:29\:12 -0200")

Thiago Farina <tfransosi@gmail.com> 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.

  reply	other threads:[~2010-12-06  3:58 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-05  1:59 [PATCH] commit: Add commit_list prefix to reduce_heads function Thiago Farina
2010-12-05  2:18 ` Jonathan Nieder
2010-12-05 12:18   ` Thiago Farina
2010-12-05 17:09     ` Jonathan Nieder
2010-12-05 17:29       ` Thiago Farina
2010-12-05 17:32         ` Thiago Farina
2010-12-05 21:07           ` Junio C Hamano
2010-12-05 21:29             ` Thiago Farina
2010-12-06  3:58               ` Junio C Hamano [this message]
2010-12-06  4:01               ` Junio C Hamano
2010-12-05  5:24 ` Junio C Hamano
2010-12-05 12:23   ` Thiago Farina
2010-12-05 20:40     ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7vbp4ztuwb.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=jrnieder@gmail.com \
    --cc=tfransosi@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).