Re: [PATCH 03/10] builtin: use default hash when outside a repository

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jun 20, 2025 at 01:19:35AM +0000, brian m. carlson wrote:
> We have some commands that can operate inside or outside a repository.
> If we're operating outside a repository, we clearly cannot use the
> repository's hash algorithm as a default since it doesn't exist, so
> instead, let's pick the default instead of specifically SHA-1.  Right
> now this results in no functional change since the default is SHA-1, but
> that may change in the future.

With the preceding commit in mind that introduced GIT_HASH_ORIGINAL you
could also argue that those callsites should be converted to use that
define instead. We always used to treat them as SHA1 repositories, and
we have no better way of telling otherwise, so we use the historical
value of SHA1 so that scripts aren't dependent on how exactly Git was
built.

Patrick




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux