Re: [PATCH 1/2] Teach git-describe to display distances from tags.
- From
Shawn O. Pearce <spearce@spearce.org>
- Date
- Jan 25, 2007, 21:37 UTC
- Message-ID
- <20070125213712.GC13874@spearce.org>
- In-Reply-To
- <7vmz46ajcq.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano <junkio@cox.net> wrote:
> - This is purely style, but we seem to prefer %d instead of %i > elsewhere in the code (three existing offenders are > builtin-describe.c, receive-pack.c and sha1_file which we may > want to clean up for consistency).
I'll send a cleanup patch then for these locations.
Show 6 quoted lines
> - How much damage are we talking about with this patch to > People's existing scripts? I expect they all extract the > hash from last -g (because they cannot rely on particular > convention in tagnames), but I am also worried if people are > expecting everything that comes before the last -g is the > whole tag.
No way to know for sure. I almost put this as an option (e.g. "--include-distance") but didn't want everyone to need to update their existing git-describe callers to obtain this new data. I would hope that people split on last -g to get at or remove the commit SHA-1, but they probably are also assiming te tag name is everything to the left. Including the distance would certainly violate that.
-- Shawn.