git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: Ted Ts'o <tytso@mit.edu>, git@vger.kernel.org
Subject: Re: jk/tag-contains: stalled
Date: Thu, 05 Aug 2010 11:47:09 -0700	[thread overview]
Message-ID: <7vy6ckdhhu.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <20100805173635.GA15760@sigill> (Jeff King's message of "Thu\, 5 Aug 2010 13\:36\:36 -0400")

Jeff King <peff@peff.net> writes:

> On Thu, Aug 05, 2010 at 10:05:58AM -0700, Junio C Hamano wrote:
>
>> >>> * jk/tag-contains (2010-07-05) 4 commits
>> >>>  - Why is "git tag --contains" so slow?
>> >>>  - default core.clockskew variable to one day
>> >>>  - limit "contains" traversals based on commit timestamp
>> >>>  - tag: speed up --contains calculation
>> [...]
>> > I agree in principle; the log messages need to be cleaned up first
>> > at the least, though.
>> 
>> To reduce the risk of double-work, I need to clarify.
>> 
>> I meant to say that I can find enough material, especially what Peff
>> wrote, in the discussion that followed in the thread to do the clean-up
>> myself.  No need to resend by anybody unless there are material
>> differences from what have been discussed so far that need to be
>> incorporated in the final series.
>
> The only bad log message should be the final one, which should be
> dropped anyway. I would recommend just merging the first two for now,
> and Ted can tweak his core.clockskew manually.

After re-reviewing the one that is queued, the use of TMP_MARK smelled
somewhat bad to me.  It is named TMP_ exactly because it is meant to be
used in a closed callpath---you can use it but you are supposed to clean
it before you return the control to the caller, so that the caller can
rely on TMP_MARK absent from any objects.

Use of UNINTERESTING is similarly not kosher if this were to be used in
larger context outside of "do 'tags --contains' and exit".  You noted
these two points in your original RFC patch.

Besides, "contains()" is too generic a name to live in commit.h.

My gut feeling is that it is probably Ok if contains() and its recursive
helper are moved to builtin/tag.c and are made static, to make it clear
that this should not be reused outside the current context as a generic
"contains" function.  It would probably help to have a comment at the end
of list_tags() to say that TMP_MARK _ought_ to be cleaned before leaving
the function but we don't do that because we know it is the last function
in the callchain before we exit.

By the way, I wonder why pop_most_recent_commit() with a commit_list,
which is the usual revision traversal ingredient for doing something like
this, was not used in the patch, though.  Is it because depth-first was
necessary?

  reply	other threads:[~2010-08-05 18:47 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-04 22:24 What's cooking in git.git (Aug 2010, #01; Wed, 4) Junio C Hamano
2010-08-05  0:16 ` jk/tag-contains: stalled Ted Ts'o
2010-08-05 16:29   ` Junio C Hamano
2010-08-05 17:05     ` Junio C Hamano
2010-08-05 17:36       ` Jeff King
2010-08-05 18:47         ` Junio C Hamano [this message]
2010-08-05 19:06           ` Jeff King
2010-08-05 19:18             ` Jay Soffian
2010-08-05 19:27               ` Jeff King
2010-08-05 20:00                 ` Jay Soffian
2010-08-05 20:36             ` Ted Ts'o
2010-08-05 20:53             ` Junio C Hamano
2010-08-05 21:38               ` Thomas Rast
2010-08-05 22:15                 ` Junio C Hamano
2010-08-06  5:44             ` Junio C Hamano
2010-08-05  6:53 ` tc/checkout-B Jonathan Nieder
2010-08-05 10:18   ` tc/checkout-B Tay Ray Chuan
2010-08-05  8:20 ` What's cooking in git.git (Aug 2010, #01; Wed, 4) Matthieu Moy
2010-08-05  8:22   ` [PATCH 1/5] diff: parse separate options like -S foo Matthieu Moy
2010-08-05 12:16     ` Jakub Narebski
2010-08-05 12:24       ` Matthieu Moy
2010-08-05  8:22   ` [PATCH 2/5] diff: split off a function for --stat-* option parsing Matthieu Moy
2010-08-05  8:22   ` [PATCH 3/5] diff: parse separate options --stat-width n, --stat-name-width n Matthieu Moy
2010-08-05  8:22   ` [PATCH 4/5] log: parse separate options like git log --grep foo Matthieu Moy
2010-08-05  8:22   ` [PATCH 5/5] log: parse separate option for --glob Matthieu Moy
2010-08-05 11:41   ` mm/shortopt-detached Jonathan Nieder
2010-08-05 21:12 ` jc/sha1-name-find-fix Dmitry V. Levin

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=7vy6ckdhhu.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    --cc=tytso@mit.edu \
    /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).