GIT: Monotonically increasing trunk and release branch ids

Julien "FrnchFrgg" Rivaud
Sun Jan 12 18:09:00 GMT 2020

Le 11/01/2020 à 14:49, Jakub Jelinek a écrit :
> On Sat, Jan 11, 2020 at 07:43:17AM -0600, Segher Boessenkool wrote:
>> On Fri, Jan 10, 2020 at 07:50:02PM +0100, Jakub Jelinek wrote:
>>> Maybe even add for 7-40 hexadecimal digits
>>> redirect to;h=NNNNNNN
>>> and then just put as URL those
>>> URLs instead to make it somewhat shorter, and again teach bugzilla to
>>> URLize g3b2b821c3f1bac2ac6dd2481f461ec33a13eac9b with 7-40 hexadecimal
>>> digits.
>> Please never post links with a short hash.  Those *will* collide after a
>> while, making your link go stale.  Use at least ten chars, or twelve to
>> be save (and it is a nice round number).
> Yeah, the 7 was just that it is what git describe prints by default,

IIRC git-describe will automatically increase the number of chars if 
there are collisions in the repository at a given number. But this of 
course doesn't help short hashes already published in an email, so I 
agree with Segher.

> in the git-hooks tentative patch I've posted today it would use the
> r10-1234 style ids in the subject (those will never collide) and in
> the body the
> r10-1234-g3b2b821c3f1bac2ac6dd2481f461ec33a13eac9b
> style one.
> 	Jakub

More information about the Gcc mailing list