On Tue, Jun 02, 2015 at 11:10:22PM +0200, Michael Haggerty wrote:
> >> +
> >> + if (!(flag & REF_ISBROKEN) && is_null_sha1(sha1)) {
> >
> > Why do we do the extra check for !(flag & REF_ISBROKEN) here?
>
> That was an attempt to avoid calling is_null_sha1() unnecessarily. I
On 06/02/2015 07:28 PM, Stefan Beller wrote:
> On Tue, Jun 2, 2015 at 8:57 AM, Michael Haggerty wrote:
>> NULL_SHA1 is never a valid value for a reference. If a loose reference
>> has that value, mark it as broken.
>>
>> Why check NULL_SHA1 and not the nearly 2^160 other SHA-1s that are
>> also in
Michael Haggerty writes:
> NULL_SHA1 is never a valid value for a reference. If a loose reference
> has that value, mark it as broken.
>
> Why check NULL_SHA1 and not the nearly 2^160 other SHA-1s that are
> also invalid in a given repository? Because (a) it is cheap to test
> for NULL_SHA1, and
On Tue, Jun 2, 2015 at 8:57 AM, Michael Haggerty wrote:
> NULL_SHA1 is never a valid value for a reference. If a loose reference
> has that value, mark it as broken.
>
> Why check NULL_SHA1 and not the nearly 2^160 other SHA-1s that are
> also invalid in a given repository? Because (a) it is cheap
NULL_SHA1 is never a valid value for a reference. If a loose reference
has that value, mark it as broken.
Why check NULL_SHA1 and not the nearly 2^160 other SHA-1s that are
also invalid in a given repository? Because (a) it is cheap to test
for NULL_SHA1, and (b) NULL_SHA1 is often used as a "SHA-
5 matches
Mail list logo