Some vintage Apple PPC machines build a non-funtional version of git as of git 13.1 when using the stock gcc compilers that are installed with the OS; the SHA1 calculations are faulty. This can be repaired with a simple patch (attached).
Stock vintage Apple PPC machines come with gcc-4.0 or gcc-4.2. On MacOS 10.4 and earlier, or when not using Apple Common Crypto on 10.5, git uses the SHA1 calculation code from here <https://github.com/cr-marcstevens/sha1collisiondetection>. The code in <https://github.com/cr-marcstevens/sha1collisiondetection/blob/master/lib/sha1.c> tries to detect all systems that are BIG_ENDIAN, but the above noted systems fall through because they fail the tests.
It appears that the primary test:
#if defined(__BYTE_ORDER__) && defined(__ORDER_BIG_ENDIAN__)
only works as of gcc-4.6 and newer, so the code is built as LITTLE_ENDIAN on PPC with older gcc versions.
Issue report:
<https://github.com/cr-marcstevens/sha1collisiondetection/issues/40>
MacPorts bug report:
<https://trac.macports.org/ticket/54602>
The included patch to git fixes the issue on our testing.
Thanks for git!
Ken Cunningham
=====