Re: [PATCH 5/6] Teach git-describe --exact-match to avoid expensive tag searches

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jakub Narebski <jnareb@xxxxxxxxx> wrote:
> "Shawn O. Pearce" <spearce@xxxxxxxxxxx> 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.
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux