Subject: Re: Git v2.13.1 SHA1 very broken

From: Junio C Hamano <[email-masked]>
Date: Tue, 06 Jun 2017 10:20:45 +0900

Ævar Arnfjörð Bjarmason <[email-masked]> writes:

> That looks scary, can you please comment out this:
>
>     #define SHA1DC_ALLOW_UNALIGNED_ACCESS
>
> In sha1dc/sha1.c and see if that helps, alternatively comment out the
> ifdefs guarded by "#ifdef _MSC_VER" calls in sha1dc/sha1.c

That is merely a performance (and theoretical correctness) thing,
no?

> The functional differences between 2.13.0 and 2.13.1 on that platform
> should be none aside from possibly those changes, unless I've missed
> something.

If it does not hash correctly, the cause is more likely that the
endianness detection is going haywire.

    make CFLAGS="-DSHA1DC_FORCE_LITTLEENDIAN -g -O2 -Wall"

or something like that, perhaps?