Subject: Re: [PATCH v5 00/17] cruft packs

From: Jonathan Nieder <[email-masked]>
Date: Wed, 25 May 2022 00:53:59 -0700

Hi,

Taylor Blau wrote:
> On Tue, May 24, 2022 at 11:55:02PM +0200, Ævar Arnfjörð Bjarmason wrote:

>>> Moreover, I can't seem to find any formats that _don't_ use that
>>> convention.
>>
>> It's used in the reftable format.

It's also used in the formats described in
Documentation/technical/hash-function-transition.

[...]
> Sounds good. Unless others have a very strong opinion, let's leave it as
> is.

File formats are one of those things where a little time early can save
a lot of work later.  If there were a strong reason to use "1" and "2"
here then I'd be okay with living with it --- I'm a pragmatic person.
But in general, using the magic numbers instead of a sequential value is
really helpful both in making the file formats more self-explanatory and
in making it possible to experiment with multiple new hash_algos at the
same time.

The main argument I'm hearing for using "1" and "2" is "because some
other formats got that wrong".  That reason is the opposite of
compelling to me: it makes me suspect that as a project we should more
eagerly break the old bad habits and form new ones.  I guess this
qualifies as a very strong opinion.

Thanks,
Jonathan