From: "Björn Steinbrink" <B.Steinbrink@gmx.de>
To: "Shawn O. Pearce" <spearce@spearce.org>
Cc: Junio C Hamano <gitster@pobox.com>, git@vger.kernel.org
Subject: Re: [PATCH] git-describe: Die early if there are no possible descriptions
Date: Wed, 5 Aug 2009 17:42:05 +0200 [thread overview]
Message-ID: <20090805154205.GA17792@atjola.homenet> (raw)
In-Reply-To: <20090805153411.GG1033@spearce.org>
On 2009.08.05 08:34:12 -0700, Shawn O. Pearce wrote:
> Bj?rn Steinbrink <B.Steinbrink@gmx.de> wrote:
> > If we found no refs that may be used for git-describe with the current
> > options, then die early instead of pointlessly walking the whole history.
> >
> > Signed-off-by: Bj?rn Steinbrink <B.Steinbrink@gmx.de>
> > ---
> > In git.git with all the tags dropped, this makes "git describe" go down
> > from 0.244 to 0.003 seconds for me. This is especially noticeable with
> > "git submodule" which calls describe with increasing levels of allowed
> > refs to be matched. Without tags, this means that it walks the whole
> > history in the submodule twice (first annotated, then plain tags), just
> > to find out that it can't describe the thing anyway.
> >
> > I'm not particularly sure about found_names actually counting the found
> > names, it was just out of the thought that maybe the walking code could
> > make use of it, but I didn't actually check that and ran out of time, so
> > I'm sending this version, hoping that it doesn't suck too much.
>
> This seems reasonable to me. Really you don't need found_names
> to be a counter, but could just always set it to 1 every time the
> add_to_known_names function is called. All you care about is that
> add_to_known_names was invoked at least once.
OK.
> Also, I really think that first paragraph after the --- should
> have been part of the commit message. The message above doesn't
> justify the change, even if it is fairly trivial, without that
> additional explanation.
Oh, d'oh, that's even what I intended to do (the original commit message
was written in even more of a hurry than the mail itself), but messed
up. Will re-send (also with found_names turned boolean)
Thanks,
Björn
next prev parent reply other threads:[~2009-08-05 15:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-05 14:17 [PATCH] git-describe: Die early if there are no possible descriptions Björn Steinbrink
2009-08-05 15:34 ` Shawn O. Pearce
2009-08-05 15:42 ` Björn Steinbrink [this message]
2009-08-06 12:15 ` [PATCH v2] " Björn Steinbrink
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=20090805154205.GA17792@atjola.homenet \
--to=b.steinbrink@gmx.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=spearce@spearce.org \
/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).