git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Shawn O. Pearce" <spearce@spearce.org>
To: Jakub Narebski <jnareb@gmail.com>
Cc: Junio C Hamano <gitster@pobox.com>, git@vger.kernel.org
Subject: Re: [PATCH 5/6] Teach git-describe --exact-match to avoid expensive tag searches
Date: Sun, 24 Feb 2008 05:32:23 -0500	[thread overview]
Message-ID: <20080224103223.GI8410@spearce.org> (raw)
In-Reply-To: <m3skzibqjo.fsf@localhost.localdomain>

Jakub Narebski <jnareb@gmail.com> wrote:
> "Shawn O. Pearce" <spearce@spearce.org> writes:
> 
> >  A common idiom is to run git-describe twice:
> > 
> >   if test $(git describe $commit) = $(git describe --abbrev=0 $commit)
> >   ...
> 
> Wouldn't it be easier to use?
> 
>     if test $(git rev-parse $(git describe --abbrev=0 $commit)^0) = $commit
> 
> But this is also one unnecessary, although not as costly, call to git
> command.

Yea, that's the other way I've done this in a script before.  But
its obtuse and non-obvious.  --exact-match is a little easier to
figure out.  :-)

-- 
Shawn.

      reply	other threads:[~2008-02-24 10:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-24  8:07 [PATCH 5/6] Teach git-describe --exact-match to avoid expensive tag searches Shawn O. Pearce
2008-02-24 10:25 ` Jakub Narebski
2008-02-24 10:32   ` Shawn O. Pearce [this message]

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=20080224103223.GI8410@spearce.org \
    --to=spearce@spearce.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jnareb@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).