Re: [PATCH] Proof-of-concept patch to remember what the detached HEAD was
- From
Björn Steinbrink <b.steinbrink@gmx.de>
- Date
- Oct 17, 2009, 17:48 UTC
- Message-ID
- <20091017174843.GA16251@atjola.homenet>
- In-Reply-To
- <alpine.LNX.2.00.0910171829430.7906@reaper.quantumfyre.co.uk>
On 2009.10.17 18:35:38 +0100, Julian Phillips wrote:
Show 7 quoted lines
> On Sat, 17 Oct 2009, Bj?rn Steinbrink wrote: > >Do you have multiple (annotated) tags for the same commit? > > Potentially, yes. Releasing isn't the only thing that requires > keeping track of things. It's even possible that the person > creating the newer tag doesn't yet know that a release tag has been > applied if the person who applied it hasn't yet pushed it back.
OK, I'd consider that namespace pollution, as things like "this-version-sucks" doesn't seem like it show go into public repos, but anyway. If your release tags fix into a certain "unique" format, you could use describe with --match, like: git describe --match 'v[0-9]*'
Show 8 quoted lines
> >Otherwise, I don't see why "git describe HEAD" should print the > >wrong one. If there's a tag that can be resolved to the same > >commit that HEAD can be resolved, then "git describe HEAD" must > >output that one. Otherwise, that'd be a clear bug to me. > > Oh, definately no bug. git describe works exactly as expected, the > problem is that the tag checked out isn't always the latest tag > applied to that commit.
I misworded that one. Should be "If there's only tag that can be ...". IOW it was meant for "only one tag per commit", which is what I assumed to be the case.
Björn