From: Shawn O. Pearce Date: Sun, 24 Feb 2008 10:32:23 GMT Subject: Re: [PATCH 5/6] Teach git-describe --exact-match to avoid expensive tag searches Message-ID: <20080224103223.GI8410@spearce.org> In-Reply-To: Jakub Narebski wrote: > "Shawn O. Pearce" 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.