Re: What's so special about objects/17/ ?
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Oct 7, 2018, 20:07 UTC
- Message-ID
- <xmqqlg79tta8.fsf@gitster-ct.c.googlers.com>
- In-Reply-To
- <xmqqpnwltu8s.fsf@gitster-ct.c.googlers.com>
Junio C Hamano <gitster@pobox.com> writes:
Show 11 quoted lines
> Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes: > >> 1. We still have this check of objects/17/ in builtin/gc.c today. Why >> objects/17/ and not e.g. objects/00/ to go with other 000* magic such >> as the 0000000000000000000000000000000000000000 SHA-1?d Statistically >> it doesn't matter, but 17 seems like an odd thing to pick at random >> out of 00..ff, does it have any significance? > > ... > by general public and I do not have to explain the choice to the > general public ;-)
One thing that is more important than "why not 00 but 17?" to answer is why a hardcoded number rather than a runtime random. It is for repeatability.