Subject: Re: [PATCH 04/10] Use original hash for legacy formats

From: Patrick Steinhardt <[email-masked]>
Date: Tue, 1 Jul 2025 13:35:38 +0200

On Fri, Jun 20, 2025 at 02:14:05PM -0700, Junio C Hamano wrote:
> "brian m. carlson" <[email-masked]> writes:
> 
> > On 2025-06-20 at 14:26:37, Junio C Hamano wrote:
> >> If we call use a name with SHA-1 in it (e.g., GIT_HASH_MUST_BE_SHA1)
> >> from the beginning, perhaps we do not have to rename _ORIGINAL later?
> >
> > We could call it GIT_HASH_LEGACY_SHA1 if you prefer that.  I originally
> > considered something like GIT_HASH_GOOD_OLD_REV (GOOD_OLD_REV comes from
> > ext2's much more rigid and less extendable v0 rather than its newer v1
> > format), but I felt like that would be too esoteric and not document
> > things well enough.
> >
> > I'm also open to other ideas for naming if someone has them.  After all,
> > naming things is one of the hard problems in computer science.
> 
> Yup, legacy-sha1 is good enough.  I just did not want a name that
> does not have sha1 in it.

Agreed. I almost started bikeshedding in the patch where you introduced
the define, but refrained from doing so. I myself would have proposed
GIT_HASH_SHA1_HISTORICAL, but calling it "legacy" is even better.

Patrick