{"thread":{"id":"46120","subject":"Git v2.13.1 SHA1 very broken","startedAt":"2017-06-05T20:34:17Z","lastAt":"2017-07-03T12:34:30Z","messageCount":26,"participants":["Adam Dinwoodie","Ævar Arnfjörð Bjarmason","Ramsay Jones","Junio C Hamano","Morten Welinder","Jason Pyeron","Lars Schneider","Stefan Beller","Jeff King","Liam R. Howlett","Johannes Schindelin"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"321557","messageId":"20170605203409.GB25777@dinwoodie.org","threadId":"46120","inReplyTo":null,"subject":"Git v2.13.1 SHA1 very broken","fromName":"Adam Dinwoodie","fromEmail":"adam@dinwoodie.org","sentAt":"2017-06-05T20:34:09Z","receivedAt":"2017-06-05T20:34:17Z","isPatch":false,"sender":{"key":"adam@dinwoodie.org","avatar":"https://avatars.githubusercontent.com/u/1397507?v=4"},"body":"I'm trying to compile Git v2.13.1 to release for Cygwin, but it appears\na010391 (\"sha1dc: update from upstream\", 2017-05-20) is breaking a very\nsignificant number of test cases in both 32-bit and 64-bit Cygwin\nbuilds.\n\nThe first failure is t0000.46 \"validate object ID of a known tree\"; output with\n-x and -v is below, although it's not very interesting:\n\n    expecting success:\n\t    test \"$tree\" = 7bb943559a305bdd6bdee2cef6e5df2413c3d30a\n\n    ++ test ceb282701536fe61bea01075664405caa7d6343f = 7bb943559a305bdd6bdee2cef6e5df2413c3d30a\n    + test_eval_ret_=1\n    + want_trace\n    + test t = t\n    + test t = t\n    + set +x\n    error: last command exited with $?=1\n    not ok 46 - validate object ID of a known tree\n    #\n    #               test \"$tree\" = 7bb943559a305bdd6bdee2cef6e5df2413c3d30a\n    #\n\nI have no idea where to even begin debugging this, but I'm happy to take\npointers / try things out on my box.\n\nCheers,\n\nAdam\n"},{"id":"321564","messageId":"CACBZZX6vOr+ZjUaAf8i1xdjEFfY_Exj+_Xn2-1u0RcWoLy+X1g@mail.gmail.com","threadId":"46120","inReplyTo":"20170605203409.GB25777@dinwoodie.org","subject":"Re: Git v2.13.1 SHA1 very broken","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2017-06-05T21:05:24Z","receivedAt":"2017-06-05T21:05:51Z","isPatch":false,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"On Mon, Jun 5, 2017 at 10:34 PM, Adam Dinwoodie <adam@dinwoodie.org> wrote:\n> I'm trying to compile Git v2.13.1 to release for Cygwin, but it appears\n> a010391 (\"sha1dc: update from upstream\", 2017-05-20) is breaking a very\n> significant number of test cases in both 32-bit and 64-bit Cygwin\n> builds.\n>\n> The first failure is t0000.46 \"validate object ID of a known tree\"; output with\n> -x and -v is below, although it's not very interesting:\n>\n>     expecting success:\n>             test \"$tree\" = 7bb943559a305bdd6bdee2cef6e5df2413c3d30a\n>\n>     ++ test ceb282701536fe61bea01075664405caa7d6343f = 7bb943559a305bdd6bdee2cef6e5df2413c3d30a\n>     + test_eval_ret_=1\n>     + want_trace\n>     + test t = t\n>     + test t = t\n>     + set +x\n>     error: last command exited with $?=1\n>     not ok 46 - validate object ID of a known tree\n>     #\n>     #               test \"$tree\" = 7bb943559a305bdd6bdee2cef6e5df2413c3d30a\n>     #\n>\n> I have no idea where to even begin debugging this, but I'm happy to take\n> pointers / try things out on my box.\n\nThat looks scary, can you please comment out this:\n\n    #define SHA1DC_ALLOW_UNALIGNED_ACCESS\n\nIn sha1dc/sha1.c and see if that helps, alternatively comment out the\nifdefs guarded by \"#ifdef _MSC_VER\" calls in sha1dc/sha1.c\n\nThe functional differences between 2.13.0 and 2.13.1 on that platform\nshould be none aside from possibly those changes, unless I've missed\nsomething.\n"},{"id":"321576","messageId":"15c976f0-9203-dbba-86b6-240e44a1a56f@ramsayjones.plus.com","threadId":"46120","inReplyTo":"CACBZZX6vOr+ZjUaAf8i1xdjEFfY_Exj+_Xn2-1u0RcWoLy+X1g@mail.gmail.com","subject":"Re: Git v2.13.1 SHA1 very broken","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsayjones.plus.com","sentAt":"2017-06-05T23:20:07Z","receivedAt":"2017-06-05T23:20:15Z","isPatch":false,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"\n\nOn 05/06/17 22:05, Ævar Arnfjörð Bjarmason wrote:\n> On Mon, Jun 5, 2017 at 10:34 PM, Adam Dinwoodie <adam@dinwoodie.org> wrote:\n>> I'm trying to compile Git v2.13.1 to release for Cygwin, but it appears\n>> a010391 (\"sha1dc: update from upstream\", 2017-05-20) is breaking a very\n>> significant number of test cases in both 32-bit and 64-bit Cygwin\n>> builds.\n>>\n>> The first failure is t0000.46 \"validate object ID of a known tree\"; output with\n>> -x and -v is below, although it's not very interesting:\n>>\n>>     expecting success:\n>>             test \"$tree\" = 7bb943559a305bdd6bdee2cef6e5df2413c3d30a\n>>\n>>     ++ test ceb282701536fe61bea01075664405caa7d6343f = 7bb943559a305bdd6bdee2cef6e5df2413c3d30a\n>>     + test_eval_ret_=1\n>>     + want_trace\n>>     + test t = t\n>>     + test t = t\n>>     + set +x\n>>     error: last command exited with $?=1\n>>     not ok 46 - validate object ID of a known tree\n>>     #\n>>     #               test \"$tree\" = 7bb943559a305bdd6bdee2cef6e5df2413c3d30a\n>>     #\n>>\n>> I have no idea where to even begin debugging this, but I'm happy to take\n>> pointers / try things out on my box.\n> \n> That looks scary, can you please comment out this:\n> \n>     #define SHA1DC_ALLOW_UNALIGNED_ACCESS\n\nNo, that doesn't fix it.\n\n> \n> In sha1dc/sha1.c and see if that helps, alternatively comment out the\n> ifdefs guarded by \"#ifdef _MSC_VER\" calls in sha1dc/sha1.c\n\nThis can't possibly make a difference! ;-)\n\nHowever, rebuilding with:\n\n    $ make OPENSSL_SHA1=YesPlease >out2 2>&1\n\n... make t0000-basic.sh pass just fine, so ...\n\nATB,\nRamsay Jones\n\n"},{"id":"321581","messageId":"8847fce7-1961-0006-37b7-3f10f7ebf32f@ramsayjones.plus.com","threadId":"46120","inReplyTo":"15c976f0-9203-dbba-86b6-240e44a1a56f@ramsayjones.plus.com","subject":"Re: Git v2.13.1 SHA1 very broken","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsayjones.plus.com","sentAt":"2017-06-06T00:11:00Z","receivedAt":"2017-06-06T00:11:07Z","isPatch":false,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"\n\nOn 06/06/17 00:20, Ramsay Jones wrote:\n> \n> \n> On 05/06/17 22:05, Ævar Arnfjörð Bjarmason wrote:\n>> On Mon, Jun 5, 2017 at 10:34 PM, Adam Dinwoodie <adam@dinwoodie.org> wrote:\n>>> I'm trying to compile Git v2.13.1 to release for Cygwin, but it appears\n>>> a010391 (\"sha1dc: update from upstream\", 2017-05-20) is breaking a very\n>>> significant number of test cases in both 32-bit and 64-bit Cygwin\n>>> builds.\n>>>\n>>> The first failure is t0000.46 \"validate object ID of a known tree\"; output with\n>>> -x and -v is below, although it's not very interesting:\n>>>\n>>>     expecting success:\n>>>             test \"$tree\" = 7bb943559a305bdd6bdee2cef6e5df2413c3d30a\n>>>\n>>>     ++ test ceb282701536fe61bea01075664405caa7d6343f = 7bb943559a305bdd6bdee2cef6e5df2413c3d30a\n>>>     + test_eval_ret_=1\n>>>     + want_trace\n>>>     + test t = t\n>>>     + test t = t\n>>>     + set +x\n>>>     error: last command exited with $?=1\n>>>     not ok 46 - validate object ID of a known tree\n>>>     #\n>>>     #               test \"$tree\" = 7bb943559a305bdd6bdee2cef6e5df2413c3d30a\n>>>     #\n>>>\n>>> I have no idea where to even begin debugging this, but I'm happy to take\n>>> pointers / try things out on my box.\n>>\n>> That looks scary, can you please comment out this:\n>>\n>>     #define SHA1DC_ALLOW_UNALIGNED_ACCESS\n> \n> No, that doesn't fix it.\n> \n>>\n>> In sha1dc/sha1.c and see if that helps, alternatively comment out the\n>> ifdefs guarded by \"#ifdef _MSC_VER\" calls in sha1dc/sha1.c\n> \n> This can't possibly make a difference! ;-)\n> \n> However, rebuilding with:\n> \n>     $ make OPENSSL_SHA1=YesPlease >out2 2>&1\n> \n> ... make t0000-basic.sh pass just fine, so ...\n\ncommit 7e71542e8b (\"sha1dc: avoid CPP macro collisions\", 25-03-2017)\nruns t0000-basic.sh just fine.\n\ncommit a0103914c2 (\"sha1dc: update from upstream\", 20-05-2017) fails\nwhen running t0000-basic.sh.\n\nI will look into this more tomorrow (it is late, I need sleep), unless\nsomeone finds the solution overnight, of course.\n\nAdam, you can build using the OPENSSL_SHA1 build variable for now\n(if you want to release v2.13.1), or wait for another maint release\nI suppose, ... I'll leave that to you! ;-)\n\nATB,\nRamsay Jones\n\n\n"},{"id":"321587","messageId":"xmqq4lvtap3m.fsf@gitster.mtv.corp.google.com","threadId":"46120","inReplyTo":"CACBZZX6vOr+ZjUaAf8i1xdjEFfY_Exj+_Xn2-1u0RcWoLy+X1g@mail.gmail.com","subject":"Re: Git v2.13.1 SHA1 very broken","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2017-06-06T01:20:45Z","receivedAt":"2017-06-06T01:20:52Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:\n\n> That looks scary, can you please comment out this:\n>\n>     #define SHA1DC_ALLOW_UNALIGNED_ACCESS\n>\n> In sha1dc/sha1.c and see if that helps, alternatively comment out the\n> ifdefs guarded by \"#ifdef _MSC_VER\" calls in sha1dc/sha1.c\n\nThat is merely a performance (and theoretical correctness) thing,\nno?\n\n> The functional differences between 2.13.0 and 2.13.1 on that platform\n> should be none aside from possibly those changes, unless I've missed\n> something.\n\nIf it does not hash correctly, the cause is more likely that the\nendianness detection is going haywire.\n\n    make CFLAGS=\"-DSHA1DC_FORCE_LITTLEENDIAN -g -O2 -Wall\"\n\nor something like that, perhaps?\n\n"},{"id":"321605","messageId":"20170606100355.GC25777@dinwoodie.org","threadId":"46120","inReplyTo":"xmqq4lvtap3m.fsf@gitster.mtv.corp.google.com","subject":"Re: Git v2.13.1 SHA1 very broken","fromName":"Adam Dinwoodie","fromEmail":"adam@dinwoodie.org","sentAt":"2017-06-06T10:03:55Z","receivedAt":"2017-06-06T10:04:05Z","isPatch":false,"sender":{"key":"adam@dinwoodie.org","avatar":"https://avatars.githubusercontent.com/u/1397507?v=4"},"body":"On Tue, Jun 06, 2017 at 10:20:45AM +0900, Junio C Hamano wrote:\n> Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:\n> \n> > That looks scary, can you please comment out this:\n> >\n> >     #define SHA1DC_ALLOW_UNALIGNED_ACCESS\n> >\n> > In sha1dc/sha1.c and see if that helps, alternatively comment out the\n> > ifdefs guarded by \"#ifdef _MSC_VER\" calls in sha1dc/sha1.c\n> \n> That is merely a performance (and theoretical correctness) thing,\n> no?\n\nConfirmed rebuilding with either of these suggested changes has t0000.46\nstill failing.\n\n> > The functional differences between 2.13.0 and 2.13.1 on that platform\n> > should be none aside from possibly those changes, unless I've missed\n> > something.\n> \n> If it does not hash correctly, the cause is more likely that the\n> endianness detection is going haywire.\n> \n>     make CFLAGS=\"-DSHA1DC_FORCE_LITTLEENDIAN -g -O2 -Wall\"\n\nConfirmed rebuilding with this option has t0000 passing.  I can also get\nthe test to pass with Ramsay Jones' suggestion of using OpenSSL's SHA1.\n\nDigging briefly into the endianness detection, it appears Cygwin has\nboth _LITTLE_ENDIAN and _BIG_ENDIAN defined.  Git's detection works by\nassuming it's in a little endian environment and switching to big endian\nif it detects any of the defines that indicate such, and a010391 adds\n_BIG_ENDIAN to the set of defines that indicate big endianness.\n\nThe obvious quick fix would be one of the two below patches.  I'll also\ntake the discussion to the Cygwin mailing list in the hope that someone\ncan explain why Cygwin defines both _LITTLE_ENDIAN and _BIG_ENDIAN (and\nindeed _PDP_ENDIAN).\n\nPatch 1 (probably safer?):\n\ndiff --git a/sha1dc/sha1.c b/sha1dc/sha1.c\nindex 3dff80ac7..e47d004b1 100644\n--- a/sha1dc/sha1.c\n+++ b/sha1dc/sha1.c\n@@ -36,6 +36,7 @@\n #undef SHA1DC_BIGENDIAN\n #endif\n #if (!defined SHA1DC_FORCE_LITTLEENDIAN) && \\\n+    (!defined _LITTLE_ENDIAN) && \\\n     ((defined(__BYTE_ORDER) && (__BYTE_ORDER == __BIG_ENDIAN)) || \\\n     (defined(__BYTE_ORDER__) && (__BYTE_ORDER__ == __BIG_ENDIAN__)) || \\\n     defined(_BIG_ENDIAN) || defined(__BIG_ENDIAN__) || defined(__ARMEB__) || defined(__THUMBEB__) ||  defined(__AARCH64EB__) || \\\n\nPatch 2:\n\ndiff --git a/sha1dc/sha1.c b/sha1dc/sha1.c\nindex 3dff80ac7..8d7b1ee7d 100644\n--- a/sha1dc/sha1.c\n+++ b/sha1dc/sha1.c\n@@ -38,7 +38,7 @@\n #if (!defined SHA1DC_FORCE_LITTLEENDIAN) && \\\n     ((defined(__BYTE_ORDER) && (__BYTE_ORDER == __BIG_ENDIAN)) || \\\n     (defined(__BYTE_ORDER__) && (__BYTE_ORDER__ == __BIG_ENDIAN__)) || \\\n-    defined(_BIG_ENDIAN) || defined(__BIG_ENDIAN__) || defined(__ARMEB__) || defined(__THUMBEB__) ||  defined(__AARCH64EB__) || \\\n+    defined(__BIG_ENDIAN__) || defined(__ARMEB__) || defined(__THUMBEB__) ||  defined(__AARCH64EB__) || \\\n     defined(_MIPSEB) || defined(__MIPSEB) || defined(__MIPSEB__) || defined(SHA1DC_FORCE_BIGENDIAN))\n\n #define SHA1DC_BIGENDIAN\n"},{"id":"321611","messageId":"xmqqmv9l8h5z.fsf@gitster.mtv.corp.google.com","threadId":"46120","inReplyTo":"20170606100355.GC25777@dinwoodie.org","subject":"Re: Git v2.13.1 SHA1 very broken","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2017-06-06T11:55:04Z","receivedAt":"2017-06-06T11:55:10Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Adam Dinwoodie <adam@dinwoodie.org> writes:\n\n> Digging briefly into the endianness detection, it appears Cygwin has\n> both _LITTLE_ENDIAN and _BIG_ENDIAN defined.  Git's detection works by\n> assuming it's in a little endian environment and switching to big endian\n> if it detects any of the defines that indicate such, and a010391 adds\n> _BIG_ENDIAN to the set of defines that indicate big endianness.\n\nI suspect that the upstream has already fixed this one to cope with\nFreeBSD.  My preference is that we do another import on top of the\nab/sha1dc-maint topic, below the commit on ab/sha1dc that adds the\nupstream as a submodule.\n\n"},{"id":"321613","messageId":"20170606124323.GD25777@dinwoodie.org","threadId":"46120","inReplyTo":"xmqqmv9l8h5z.fsf@gitster.mtv.corp.google.com","subject":"Re: Git v2.13.1 SHA1 very broken","fromName":"Adam Dinwoodie","fromEmail":"adam@dinwoodie.org","sentAt":"2017-06-06T12:43:23Z","receivedAt":"2017-06-06T12:43:31Z","isPatch":false,"sender":{"key":"adam@dinwoodie.org","avatar":"https://avatars.githubusercontent.com/u/1397507?v=4"},"body":"On Tue, Jun 06, 2017 at 08:55:04PM +0900, Junio C Hamano wrote:\n> Adam Dinwoodie <adam@dinwoodie.org> writes:\n> \n> > Digging briefly into the endianness detection, it appears Cygwin has\n> > both _LITTLE_ENDIAN and _BIG_ENDIAN defined.  Git's detection works by\n> > assuming it's in a little endian environment and switching to big endian\n> > if it detects any of the defines that indicate such, and a010391 adds\n> > _BIG_ENDIAN to the set of defines that indicate big endianness.\n> \n> I suspect that the upstream has already fixed this one to cope with\n> FreeBSD.  My preference is that we do another import on top of the\n> ab/sha1dc-maint topic, below the commit on ab/sha1dc that adds the\n> upstream as a submodule.\n\nApparently so!  a010391 brings Git up to the upstream's cc46554 (\"Skip\ntemporary variable for SHA1DC_ALLOW_UNSIGNED_ACCESS\", 2017-05-18); the\nproblem has been fixed in upstream's a24eef5 (\"rewrote Endianness\nselection\", 2017-05-29).\n\nIn the interim, I'll use the CFLAGS route to try to get a v2.13.1 build\nready to release for Cygwin.\n"},{"id":"321614","messageId":"CANv4PN=G82J86eaPkvy8ZaXZGSnHoJRuKFeLcF34aX6_9Y9fcg@mail.gmail.com","threadId":"46120","inReplyTo":"xmqqmv9l8h5z.fsf@gitster.mtv.corp.google.com","subject":"Re: Git v2.13.1 SHA1 very broken","fromName":"Morten Welinder","fromEmail":"mwelinder@gmail.com","sentAt":"2017-06-06T12:49:22Z","receivedAt":"2017-06-06T12:49:34Z","isPatch":false,"sender":{"key":"mwelinder@gmail.com","avatar":null},"body":"One could have configure ask some existing dependency that has already\ndetermined the byte order.  For example:\n\n# perl -e 'use Config; $o=$Config{byteorder}; print(($o=~/^1234/ ?\n\"little\" : ($o=~/4321$/ ? \"big\" : \"weird\")), \"\\n\");'\nlittle\n\nGood: less #ifdef soup; bad: not so great for cross-compiling.\n\n(That's the integer byte order.  The floating-point byte order can be different;\nhopefully git doesn't care.)\n\nMorten\n\n\n\n\n\nOn Tue, Jun 6, 2017 at 7:55 AM, Junio C Hamano <gitster@pobox.com> wrote:\n> Adam Dinwoodie <adam@dinwoodie.org> writes:\n>\n>> Digging briefly into the endianness detection, it appears Cygwin has\n>> both _LITTLE_ENDIAN and _BIG_ENDIAN defined.  Git's detection works by\n>> assuming it's in a little endian environment and switching to big endian\n>> if it detects any of the defines that indicate such, and a010391 adds\n>> _BIG_ENDIAN to the set of defines that indicate big endianness.\n>\n> I suspect that the upstream has already fixed this one to cope with\n> FreeBSD.  My preference is that we do another import on top of the\n> ab/sha1dc-maint topic, below the commit on ab/sha1dc that adds the\n> upstream as a submodule.\n>\n"},{"id":"321620","messageId":"6D15A44412C346E2822A74A91FDF77B1@blackfat","threadId":"46120","inReplyTo":"20170606124323.GD25777@dinwoodie.org","subject":"Continous Integration (was: RE: Git v2.13.1 SHA1 very broken)","fromName":"Jason Pyeron","fromEmail":"jpyeron@pdinc.us","sentAt":"2017-06-06T14:47:20Z","receivedAt":"2017-06-06T14:47:47Z","isPatch":false,"sender":{"key":"jpyeron@pdinc.us","avatar":"https://gravatar.com/avatar/c2e53452caa53d940768a1ffc9cf76196d851b9b534b7a39cd39852a70a0508f?d=mp&s=160"},"body":"Do we have Jenkins (or something else) setup for Git?\n\nWe would be happy to donate (slave) VMs for cygwin builds og Git.  \n\n-Jason Pyeron\n\n"},{"id":"321621","messageId":"CF387D0C-6743-4B88-A4CC-D6310A634E03@gmail.com","threadId":"46120","inReplyTo":"6D15A44412C346E2822A74A91FDF77B1@blackfat","subject":"Re: Continous Integration (was: RE: Git v2.13.1 SHA1 very broken)","fromName":"Lars Schneider","fromEmail":"larsxschneider@gmail.com","sentAt":"2017-06-06T15:04:32Z","receivedAt":"2017-06-06T15:04:54Z","isPatch":false,"sender":{"key":"larsxschneider@gmail.com","avatar":"https://avatars.githubusercontent.com/u/477434?v=4"},"body":"\n> On 06 Jun 2017, at 16:47, Jason Pyeron <jpyeron@pdinc.us> wrote:\n> \n> Do we have Jenkins (or something else) setup for Git?\n> \n> We would be happy to donate (slave) VMs for cygwin builds og Git.  \n> \n> -Jason Pyeron\n> \n\nWe use TravisCI for Linux, Mac, and (in a special way) Windows: \nhttps://travis-ci.org/git/git\n\nWindows is not supported by TravisCI. We just use TravisCI to\ntrigger a build on MS Azure and read the results:\nhttps://github.com/git/git/commit/029aeeed55f6bfe8014e8ffe5fc7a6f2e5b110fc\n\nMaybe we could trigger a Cgywin build on your slaves in the same way?\n\n- Lars\n"},{"id":"321622","messageId":"20170606151231.25172-1-avarab@gmail.com","threadId":"46120","inReplyTo":"20170606124323.GD25777@dinwoodie.org","subject":"[PATCH 0/3] update sha1dc","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2017-06-06T15:12:28Z","receivedAt":"2017-06-06T15:12:54Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"This updates sha1dc fixing the issue on Cygwin introduced in 2.13.1,\nand hopefully not regressing elsewhere. Liam, it would be much\nappreciated if you could test this on SPARC.\n\nAs before the \"sha1dc: update from upstream\" patch is what should\nfast-track to master/maint and be in 2.13.2, the other two are the\ncooking submodule use, that's all unchanged aside from of course the\nsubmodule pointing to the same upstream commit as the code import\nitself does.\n\nJunio: There's a whitespace change to sha1.h that am warns about, but\nwhich it applies anyway that you didn't apply from my previous\npatch. I think it probably makes sense to just take upstream's\nwhitespace shenanigans as-is instead of seeing that diff every time we\nupdate. I guess we could also send them a pull request...\n\nJunio C Hamano (1):\n  sha1collisiondetection: automatically enable when submodule is\n    populated\n\nÆvar Arnfjörð Bjarmason (2):\n  sha1dc: update from upstream\n  sha1dc: optionally use sha1collisiondetection as a submodule\n\n .gitmodules            |  4 ++++\n Makefile               | 16 ++++++++++++++++\n hash.h                 |  4 ++++\n sha1collisiondetection |  1 +\n sha1dc/sha1.c          | 30 ++++++++++++++++++++++++------\n sha1dc/sha1.h          |  6 +++---\n 6 files changed, 52 insertions(+), 9 deletions(-)\n create mode 100644 .gitmodules\n create mode 160000 sha1collisiondetection\n\n-- \n2.13.0.506.g27d5fe0cd\n\n"},{"id":"321623","messageId":"20170606151231.25172-2-avarab@gmail.com","threadId":"46120","inReplyTo":"20170606151231.25172-1-avarab@gmail.com","subject":"[PATCH 1/3] sha1dc: update from upstream","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2017-06-06T15:12:29Z","receivedAt":"2017-06-06T15:12:57Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"Update sha1dc from the latest version by the upstream\nmaintainer[1].\n\nSee commit a0103914c2 (\"sha1dc: update from upstream\", 2017-05-20) for\nthe latest update. That update was done sans some whitespace changes\nby upstream, which is why the diff here isn't the same as the upstream\ncc46554..e139984.\n\nIt also brings in a change[2] upstream made which should hopefully\naddress the breakage in 2.13.1 on Cygwin, see [3]. Cygwin defines both\n_BIG_ENDIAN and _LITTLE_ENDIAN.\n\nAdam Dinwoodie reports on the mailing list that that upstream commit\nfixes the issue on Cygwin[4].\n\n1. https://github.com/cr-marcstevens/sha1collisiondetection/commit/e1399840b501a68ac6c8d7ed9a5cb1455480200e\n2. https://github.com/cr-marcstevens/sha1collisiondetection/commit/a24eef58c0684078405f8c7a89f9b78271432005\n3. <20170606100355.GC25777@dinwoodie.org> (https://public-inbox.org/git/20170606100355.GC25777@dinwoodie.org/)\n4. <20170606124323.GD25777@dinwoodie.org> (https://public-inbox.org/git/20170606124323.GD25777@dinwoodie.org/)\n\nSigned-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n---\n sha1dc/sha1.c | 30 ++++++++++++++++++++++++------\n sha1dc/sha1.h |  6 +++---\n 2 files changed, 27 insertions(+), 9 deletions(-)\n\ndiff --git a/sha1dc/sha1.c b/sha1dc/sha1.c\nindex 3dff80ac72..facea1bb56 100644\n--- a/sha1dc/sha1.c\n+++ b/sha1dc/sha1.c\n@@ -35,15 +35,33 @@\n #ifdef SHA1DC_BIGENDIAN\n #undef SHA1DC_BIGENDIAN\n #endif\n-#if (!defined SHA1DC_FORCE_LITTLEENDIAN) && \\\n-    ((defined(__BYTE_ORDER) && (__BYTE_ORDER == __BIG_ENDIAN)) || \\\n-    (defined(__BYTE_ORDER__) && (__BYTE_ORDER__ == __BIG_ENDIAN__)) || \\\n-    defined(_BIG_ENDIAN) || defined(__BIG_ENDIAN__) || defined(__ARMEB__) || defined(__THUMBEB__) ||  defined(__AARCH64EB__) || \\\n-    defined(_MIPSEB) || defined(__MIPSEB) || defined(__MIPSEB__) || defined(SHA1DC_FORCE_BIGENDIAN))\n \n+#if (defined(_BYTE_ORDER) || defined(__BYTE_ORDER) || defined(__BYTE_ORDER__))\n+\n+#if ((defined(_BYTE_ORDER) && (_BYTE_ORDER == _BIG_ENDIAN)) || \\\n+     (defined(__BYTE_ORDER) && (__BYTE_ORDER == __BIG_ENDIAN)) || \\\n+     (defined(__BYTE_ORDER__) && (__BYTE_ORDER__ == __BIG_ENDIAN__)) )\n #define SHA1DC_BIGENDIAN\n+#endif\n+\n+#else\n+\n+#if (defined(_BIG_ENDIAN) || defined(__BIG_ENDIAN) || defined(__BIG_ENDIAN__) || \\\n+     defined(__ARMEB__) || defined(__THUMBEB__) || defined(__AARCH64EB__) || \\\n+     defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || \\\n+     defined(__sparc))\n+#define SHA1DC_BIGENDIAN\n+#endif\n \n-#endif /*ENDIANNESS SELECTION*/\n+#endif\n+\n+#if (defined(SHA1DC_FORCE_LITTLEENDIAN) && defined(SHA1DC_BIGENDIAN))\n+#undef SHA1DC_BIGENDIAN\n+#endif\n+#if (defined(SHA1DC_FORCE_BIGENDIAN) && !defined(SHA1DC_BIGENDIAN))\n+#define SHA1DC_BIGENDIAN\n+#endif\n+/*ENDIANNESS SELECTION*/\n \n #if (defined SHA1DC_FORCE_UNALIGNED_ACCESS || \\\n      defined(__amd64__) || defined(__amd64) || defined(__x86_64__) || defined(__x86_64) || \\\ndiff --git a/sha1dc/sha1.h b/sha1dc/sha1.h\nindex a0ff5d1305..1e4e94be54 100644\n--- a/sha1dc/sha1.h\n+++ b/sha1dc/sha1.h\n@@ -61,9 +61,9 @@ void SHA1DCInit(SHA1_CTX*);\n     Function to enable safe SHA-1 hashing:\n     Collision attacks are thwarted by hashing a detected near-collision block 3 times.\n     Think of it as extending SHA-1 from 80-steps to 240-steps for such blocks:\n-\tThe best collision attacks against SHA-1 have complexity about 2^60,\n-\tthus for 240-steps an immediate lower-bound for the best cryptanalytic attacks would be 2^180.\n-\tAn attacker would be better off using a generic birthday search of complexity 2^80.\n+        The best collision attacks against SHA-1 have complexity about 2^60,\n+        thus for 240-steps an immediate lower-bound for the best cryptanalytic attacks would be 2^180.\n+        An attacker would be better off using a generic birthday search of complexity 2^80.\n \n    Enabling safe SHA-1 hashing will result in the correct SHA-1 hash for messages where no collision attack was detected,\n    but it will result in a different SHA-1 hash for messages where a collision attack was detected.\n-- \n2.13.0.506.g27d5fe0cd\n\n"},{"id":"321624","messageId":"20170606151231.25172-3-avarab@gmail.com","threadId":"46120","inReplyTo":"20170606151231.25172-1-avarab@gmail.com","subject":"[PATCH 2/3] sha1dc: optionally use sha1collisiondetection as a submodule","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2017-06-06T15:12:30Z","receivedAt":"2017-06-06T15:13:02Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"Add an option to use the sha1collisiondetection library from the\nsubmodule in sha1collisiondetection/ instead of in the copy in the\nsha1dc/ directory.\n\nThis allows us to try out the submodule in sha1collisiondetection\nwithout breaking the build for anyone who's not expecting them as we\nwork out any kinks.\n\nSigned-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n---\n .gitmodules            |  4 ++++\n Makefile               | 12 ++++++++++++\n hash.h                 |  4 ++++\n sha1collisiondetection |  1 +\n 4 files changed, 21 insertions(+)\n create mode 100644 .gitmodules\n create mode 160000 sha1collisiondetection\n\ndiff --git a/.gitmodules b/.gitmodules\nnew file mode 100644\nindex 0000000000..cbeebdab7a\n--- /dev/null\n+++ b/.gitmodules\n@@ -0,0 +1,4 @@\n+[submodule \"sha1collisiondetection\"]\n+\tpath = sha1collisiondetection\n+\turl = https://github.com/cr-marcstevens/sha1collisiondetection.git\n+\tbranch = master\ndiff --git a/Makefile b/Makefile\nindex 7c621f7f76..adeff26d57 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -146,6 +146,12 @@ all::\n # algorithm. This is slower, but may detect attempted collision attacks.\n # Takes priority over other *_SHA1 knobs.\n #\n+# Define DC_SHA1_SUBMODULE in addition to DC_SHA1 to use the\n+# sha1collisiondetection shipped as a submodule instead of the\n+# non-submodule copy in sha1dc/. This is an experimental option used\n+# by the git project to migrate to using sha1collisiondetection as a\n+# submodule.\n+#\n # Define OPENSSL_SHA1 environment variable when running make to link\n # with the SHA1 routine from openssl library.\n #\n@@ -1416,8 +1422,14 @@ ifdef APPLE_COMMON_CRYPTO\n \tBASIC_CFLAGS += -DSHA1_APPLE\n else\n \tDC_SHA1 := YesPlease\n+ifdef DC_SHA1_SUBMODULE\n+\tLIB_OBJS += sha1collisiondetection/lib/sha1.o\n+\tLIB_OBJS += sha1collisiondetection/lib/ubc_check.o\n+\tBASIC_CFLAGS += -DDC_SHA1_SUBMODULE\n+else\n \tLIB_OBJS += sha1dc/sha1.o\n \tLIB_OBJS += sha1dc/ubc_check.o\n+endif\n \tBASIC_CFLAGS += \\\n \t\t-DSHA1_DC \\\n \t\t-DSHA1DC_NO_STANDARD_INCLUDES \\\ndiff --git a/hash.h b/hash.h\nindex a11fc9233f..bef3e630a0 100644\n--- a/hash.h\n+++ b/hash.h\n@@ -8,7 +8,11 @@\n #elif defined(SHA1_OPENSSL)\n #include <openssl/sha.h>\n #elif defined(SHA1_DC)\n+#ifdef DC_SHA1_SUBMODULE\n+#include \"sha1collisiondetection/lib/sha1.h\"\n+#else\n #include \"sha1dc/sha1.h\"\n+#endif\n #else /* SHA1_BLK */\n #include \"block-sha1/sha1.h\"\n #endif\ndiff --git a/sha1collisiondetection b/sha1collisiondetection\nnew file mode 160000\nindex 0000000000..e1399840b5\n--- /dev/null\n+++ b/sha1collisiondetection\n@@ -0,0 +1 @@\n+Subproject commit e1399840b501a68ac6c8d7ed9a5cb1455480200e\n-- \n2.13.0.506.g27d5fe0cd\n\n"},{"id":"321625","messageId":"20170606151231.25172-4-avarab@gmail.com","threadId":"46120","inReplyTo":"20170606151231.25172-1-avarab@gmail.com","subject":"[PATCH 3/3] sha1collisiondetection: automatically enable when submodule is populated","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2017-06-06T15:12:31Z","receivedAt":"2017-06-06T15:13:15Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"From: Junio C Hamano <gitster@pobox.com>\n\nIf a user wants to experiment with the version of collision\ndetecting sha1 from the submodule, the user needed to not just\npopulate the submodule but also needed to turn the knob.\n\nA Makefile trick is easy enough to do so, so let's do this.  When\nsomebody with a copy of the submodule populated wants not to use it,\nthat can be done by overriding it in config.mak or from the command\nline.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\nSigned-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n---\n Makefile | 4 ++++\n 1 file changed, 4 insertions(+)\n\ndiff --git a/Makefile b/Makefile\nindex adeff26d57..eeccbff1cd 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -993,6 +993,10 @@ EXTLIBS =\n \n GIT_USER_AGENT = git/$(GIT_VERSION)\n \n+ifeq ($(wildcard sha1collisiondetection/lib/sha1.h),sha1collisiondetection/lib/sha1.h)\n+DC_SHA1_SUBMODULE = auto\n+endif\n+\n include config.mak.uname\n -include config.mak.autogen\n -include config.mak\n-- \n2.13.0.506.g27d5fe0cd\n\n"},{"id":"321631","messageId":"CAGZ79kaaRsUBAxRKLPxjuk=oRrw2zBdoHWd9iNDmTbY9MpqN-w@mail.gmail.com","threadId":"46120","inReplyTo":"20170606151231.25172-1-avarab@gmail.com","subject":"Re: [PATCH 0/3] update sha1dc","fromName":"Stefan Beller","fromEmail":"sbeller@google.com","sentAt":"2017-06-06T18:23:19Z","receivedAt":"2017-06-06T18:23:31Z","isPatch":true,"sender":{"key":"stefanbeller@gmail.com","avatar":"https://avatars.githubusercontent.com/u/455868?v=4"},"body":"On Tue, Jun 6, 2017 at 8:12 AM, Ævar Arnfjörð Bjarmason\n<avarab@gmail.com> wrote:\n> This updates sha1dc fixing the issue on Cygwin introduced in 2.13.1,\n> and hopefully not regressing elsewhere. Liam, it would be much\n> appreciated if you could test this on SPARC.\n>\n> As before the \"sha1dc: update from upstream\" patch is what should\n> fast-track to master/maint and be in 2.13.2, the other two are the\n> cooking submodule use, that's all unchanged aside from of course the\n> submodule pointing to the same upstream commit as the code import\n> itself does.\n>\n> Junio: There's a whitespace change to sha1.h that am warns about, but\n> which it applies anyway that you didn't apply from my previous\n> patch. I think it probably makes sense to just take upstream's\n> whitespace shenanigans as-is instead of seeing that diff every time we\n> update. I guess we could also send them a pull request...\n\nI would suggest the pull request.\n\nAlso as to not make the mistake from before that I jump on the\nsubmodule bandwagon here:\nPatch 1 ought to go in its on series/patch, so with that out the way\nwe have more time to consider the pros and cons of the rest of\nthe series?\n\nThanks,\nStefan\n"},{"id":"321637","messageId":"CAGZ79kYGaF6=RQZ2HpTZ8qE50V2SU0DO+-0nx-n9WEkQmM4WoA@mail.gmail.com","threadId":"46120","inReplyTo":"20170606151231.25172-3-avarab@gmail.com","subject":"Re: [PATCH 2/3] sha1dc: optionally use sha1collisiondetection as a submodule","fromName":"Stefan Beller","fromEmail":"sbeller@google.com","sentAt":"2017-06-06T18:48:10Z","receivedAt":"2017-06-06T18:49:02Z","isPatch":true,"sender":{"key":"stefanbeller@gmail.com","avatar":"https://avatars.githubusercontent.com/u/455868?v=4"},"body":"On Tue, Jun 6, 2017 at 8:12 AM, Ævar Arnfjörð Bjarmason\n<avarab@gmail.com> wrote:\n> Add an option to use the sha1collisiondetection library from the\n> submodule in sha1collisiondetection/ instead of in the copy in the\n> sha1dc/ directory.\n>\n> This allows us to try out the submodule in sha1collisiondetection\n> without breaking the build for anyone who's not expecting them as we\n> work out any kinks.\n>\n> Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n\nOther projects using submodules sometimes have\na .gitattributes entry to have .gitmodules not exported\nvia git-archive. Do we want a similar thing?\n\nSpeaking of attributes, I wonder if we want to specify\nthe .gitmodules file to be text with unixy file endings:\nHaving an entry\n    .gitattributes eol=crlf\nto simulate a Windows environment doesn't harm\nsubmodule operation, which is good. I'll check if we\nhave a test for that.\n"},{"id":"321638","messageId":"CACBZZX485+W99mRspDTf09LjP-C26PaAi+vNSBkW_aVyXAsQJg@mail.gmail.com","threadId":"46120","inReplyTo":"CAGZ79kaaRsUBAxRKLPxjuk=oRrw2zBdoHWd9iNDmTbY9MpqN-w@mail.gmail.com","subject":"Re: [PATCH 0/3] update sha1dc","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2017-06-06T18:51:35Z","receivedAt":"2017-06-06T18:52:44Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"On Tue, Jun 6, 2017 at 8:23 PM, Stefan Beller <sbeller@google.com> wrote:\n> On Tue, Jun 6, 2017 at 8:12 AM, Ævar Arnfjörð Bjarmason\n> <avarab@gmail.com> wrote:\n>> This updates sha1dc fixing the issue on Cygwin introduced in 2.13.1,\n>> and hopefully not regressing elsewhere. Liam, it would be much\n>> appreciated if you could test this on SPARC.\n>>\n>> As before the \"sha1dc: update from upstream\" patch is what should\n>> fast-track to master/maint and be in 2.13.2, the other two are the\n>> cooking submodule use, that's all unchanged aside from of course the\n>> submodule pointing to the same upstream commit as the code import\n>> itself does.\n>>\n>> Junio: There's a whitespace change to sha1.h that am warns about, but\n>> which it applies anyway that you didn't apply from my previous\n>> patch. I think it probably makes sense to just take upstream's\n>> whitespace shenanigans as-is instead of seeing that diff every time we\n>> update. I guess we could also send them a pull request...\n>\n> I would suggest the pull request.\n\nLooking at this again it's not a bug, just upstream choosing to indent\na comment with spaces, not a bug.\n\nSo it makes sense to just apply as-is so we don't have that diff with\nthem / different sha1s on the files etc.\n\n> Also as to not make the mistake from before that I jump on the\n> submodule bandwagon here:\n> Patch 1 ought to go in its on series/patch, so with that out the way\n> we have more time to consider the pros and cons of the rest of\n> the series?\n\nYes it makes perfect sense to just take the 1st patch here and make\nthe submodule changes cook. This is just how I submitted it the last\ntime and Junio took the 1st patch into a maint topic, so I figured I'd\nsend it like this again.\n"},{"id":"321640","messageId":"20170606190111.xm4nzvjhbpsw3qbg@sigill.intra.peff.net","threadId":"46120","inReplyTo":"CACBZZX485+W99mRspDTf09LjP-C26PaAi+vNSBkW_aVyXAsQJg@mail.gmail.com","subject":"[PATCH] sha1dc: ignore indent-with-non-tab whitespace violations","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2017-06-06T19:01:11Z","receivedAt":"2017-06-06T19:01:17Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Tue, Jun 06, 2017 at 08:51:35PM +0200, Ævar Arnfjörð Bjarmason wrote:\n\n> On Tue, Jun 6, 2017 at 8:23 PM, Stefan Beller <sbeller@google.com> wrote:\n> > On Tue, Jun 6, 2017 at 8:12 AM, Ævar Arnfjörð Bjarmason\n> > <avarab@gmail.com> wrote:\n> >> This updates sha1dc fixing the issue on Cygwin introduced in 2.13.1,\n> >> and hopefully not regressing elsewhere. Liam, it would be much\n> >> appreciated if you could test this on SPARC.\n> >>\n> >> As before the \"sha1dc: update from upstream\" patch is what should\n> >> fast-track to master/maint and be in 2.13.2, the other two are the\n> >> cooking submodule use, that's all unchanged aside from of course the\n> >> submodule pointing to the same upstream commit as the code import\n> >> itself does.\n> >>\n> >> Junio: There's a whitespace change to sha1.h that am warns about, but\n> >> which it applies anyway that you didn't apply from my previous\n> >> patch. I think it probably makes sense to just take upstream's\n> >> whitespace shenanigans as-is instead of seeing that diff every time we\n> >> update. I guess we could also send them a pull request...\n> >\n> > I would suggest the pull request.\n> \n> Looking at this again it's not a bug, just upstream choosing to indent\n> a comment with spaces, not a bug.\n> \n> So it makes sense to just apply as-is so we don't have that diff with\n> them / different sha1s on the files etc.\n\nAgreed. Maybe we'd also want this patch:\n\n-- >8 --\nSubject: sha1dc: ignore indent-with-non-tab whitespace violations\n\nThe upstream sha1dc code indents some lines with spaces.\nWhile this doesn't match Git's coding guidelines, it's better\nto leave this imported code untouched than to try to make it\nmatch our style. However, we can use .gitattributes to tell\n\"diff --check\" and \"git am\" not to bother us about it.\n\nSigned-off-by: Jeff King <peff@peff.net>\n---\n sha1dc/.gitattributes | 1 +\n 1 file changed, 1 insertion(+)\n create mode 100644 sha1dc/.gitattributes\n\ndiff --git a/sha1dc/.gitattributes b/sha1dc/.gitattributes\nnew file mode 100644\nindex 000000000..da53f4054\n--- /dev/null\n+++ b/sha1dc/.gitattributes\n@@ -0,0 +1 @@\n+* whitespace=-indent-with-non-tab\n-- \n2.13.1.664.g1b5a21ec3\n\n"},{"id":"321641","messageId":"CACBZZX6WJDrcUj4WMxZsShEaXK91CxR2sMUbWV+K3AudNYAXbA@mail.gmail.com","threadId":"46120","inReplyTo":"CAGZ79kYGaF6=RQZ2HpTZ8qE50V2SU0DO+-0nx-n9WEkQmM4WoA@mail.gmail.com","subject":"Re: [PATCH 2/3] sha1dc: optionally use sha1collisiondetection as a submodule","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2017-06-06T19:03:36Z","receivedAt":"2017-06-06T19:04:02Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"On Tue, Jun 6, 2017 at 8:48 PM, Stefan Beller <sbeller@google.com> wrote:\n> On Tue, Jun 6, 2017 at 8:12 AM, Ævar Arnfjörð Bjarmason\n> <avarab@gmail.com> wrote:\n>> Add an option to use the sha1collisiondetection library from the\n>> submodule in sha1collisiondetection/ instead of in the copy in the\n>> sha1dc/ directory.\n>>\n>> This allows us to try out the submodule in sha1collisiondetection\n>> without breaking the build for anyone who's not expecting them as we\n>> work out any kinks.\n>>\n>> Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n>\n> Other projects using submodules sometimes have\n> a .gitattributes entry to have .gitmodules not exported\n> via git-archive. Do we want a similar thing?\n\nRight now we end up with an empty directory due to the issue you noted\nin https://public-inbox.org/git/CAGZ79kZC98CxA69QjmX2s_SU6z1CSgKgwZeqvwiMRAQc6+S3xg@mail.gmail.com/\n\nIt's probably best to have the .gitmodules file as some hint that\nsomething should be there. We also ship the other .git* files.\n\n> Speaking of attributes, I wonder if we want to specify\n> the .gitmodules file to be text with unixy file endings:\n> Having an entry\n>     .gitattributes eol=crlf\n> to simulate a Windows environment doesn't harm\n> submodule operation, which is good. I'll check if we\n> have a test for that.\n\nI have no idea what that would do or why we'd have it, but I'm going\nto understand this as you looking into it :)\n"},{"id":"321642","messageId":"CACBZZX4FsGHha_Nuw=Tbw86Ghh5Mm7ocbmVXNVS7iXnGWT0bdQ@mail.gmail.com","threadId":"46120","inReplyTo":"20170606190111.xm4nzvjhbpsw3qbg@sigill.intra.peff.net","subject":"Re: [PATCH] sha1dc: ignore indent-with-non-tab whitespace violations","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2017-06-06T19:04:58Z","receivedAt":"2017-06-06T19:05:24Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"On Tue, Jun 6, 2017 at 9:01 PM, Jeff King <peff@peff.net> wrote:\n> On Tue, Jun 06, 2017 at 08:51:35PM +0200, Ævar Arnfjörð Bjarmason wrote:\n>\n>> On Tue, Jun 6, 2017 at 8:23 PM, Stefan Beller <sbeller@google.com> wrote:\n>> > On Tue, Jun 6, 2017 at 8:12 AM, Ævar Arnfjörð Bjarmason\n>> > <avarab@gmail.com> wrote:\n>> >> This updates sha1dc fixing the issue on Cygwin introduced in 2.13.1,\n>> >> and hopefully not regressing elsewhere. Liam, it would be much\n>> >> appreciated if you could test this on SPARC.\n>> >>\n>> >> As before the \"sha1dc: update from upstream\" patch is what should\n>> >> fast-track to master/maint and be in 2.13.2, the other two are the\n>> >> cooking submodule use, that's all unchanged aside from of course the\n>> >> submodule pointing to the same upstream commit as the code import\n>> >> itself does.\n>> >>\n>> >> Junio: There's a whitespace change to sha1.h that am warns about, but\n>> >> which it applies anyway that you didn't apply from my previous\n>> >> patch. I think it probably makes sense to just take upstream's\n>> >> whitespace shenanigans as-is instead of seeing that diff every time we\n>> >> update. I guess we could also send them a pull request...\n>> >\n>> > I would suggest the pull request.\n>>\n>> Looking at this again it's not a bug, just upstream choosing to indent\n>> a comment with spaces, not a bug.\n>>\n>> So it makes sense to just apply as-is so we don't have that diff with\n>> them / different sha1s on the files etc.\n>\n> Agreed. Maybe we'd also want this patch:\n\nGreat, that makes perfect sense for prepending to the series.\n\n> -- >8 --\n> Subject: sha1dc: ignore indent-with-non-tab whitespace violations\n>\n> The upstream sha1dc code indents some lines with spaces.\n> While this doesn't match Git's coding guidelines, it's better\n> to leave this imported code untouched than to try to make it\n> match our style. However, we can use .gitattributes to tell\n> \"diff --check\" and \"git am\" not to bother us about it.\n>\n> Signed-off-by: Jeff King <peff@peff.net>\n> ---\n>  sha1dc/.gitattributes | 1 +\n>  1 file changed, 1 insertion(+)\n>  create mode 100644 sha1dc/.gitattributes\n>\n> diff --git a/sha1dc/.gitattributes b/sha1dc/.gitattributes\n> new file mode 100644\n> index 000000000..da53f4054\n> --- /dev/null\n> +++ b/sha1dc/.gitattributes\n> @@ -0,0 +1 @@\n> +* whitespace=-indent-with-non-tab\n> --\n> 2.13.1.664.g1b5a21ec3\n>\n"},{"id":"321643","messageId":"CAGZ79kZ_SiiRzzE0jumsAQcmvb3LAEs9Uz5mQ5AhfOvXRniRag@mail.gmail.com","threadId":"46120","inReplyTo":"20170606190111.xm4nzvjhbpsw3qbg@sigill.intra.peff.net","subject":"Re: [PATCH] sha1dc: ignore indent-with-non-tab whitespace violations","fromName":"Stefan Beller","fromEmail":"sbeller@google.com","sentAt":"2017-06-06T19:05:31Z","receivedAt":"2017-06-06T19:05:36Z","isPatch":true,"sender":{"key":"stefanbeller@gmail.com","avatar":"https://avatars.githubusercontent.com/u/455868?v=4"},"body":"> Subject: sha1dc: ignore indent-with-non-tab whitespace violations\n>\n> The upstream sha1dc code indents some lines with spaces.\n> While this doesn't match Git's coding guidelines, it's better\n> to leave this imported code untouched than to try to make it\n> match our style. However, we can use .gitattributes to tell\n> \"diff --check\" and \"git am\" not to bother us about it.\n>\n> Signed-off-by: Jeff King <peff@peff.net>\n\nReviewed-by: Stefan Beller <sbeller@google.com>\n\n> ---\n>  sha1dc/.gitattributes | 1 +\n>  1 file changed, 1 insertion(+)\n>  create mode 100644 sha1dc/.gitattributes\n>\n> diff --git a/sha1dc/.gitattributes b/sha1dc/.gitattributes\n> new file mode 100644\n> index 000000000..da53f4054\n> --- /dev/null\n> +++ b/sha1dc/.gitattributes\n> @@ -0,0 +1 @@\n> +* whitespace=-indent-with-non-tab\n> --\n> 2.13.1.664.g1b5a21ec3\n>\n"},{"id":"321644","messageId":"CAGZ79kYfX=QXLnwTcZSG=hoBKurYG_Nub5eE_kK4SCQYb6L+MQ@mail.gmail.com","threadId":"46120","inReplyTo":"CACBZZX6WJDrcUj4WMxZsShEaXK91CxR2sMUbWV+K3AudNYAXbA@mail.gmail.com","subject":"Re: [PATCH 2/3] sha1dc: optionally use sha1collisiondetection as a submodule","fromName":"Stefan Beller","fromEmail":"sbeller@google.com","sentAt":"2017-06-06T19:09:38Z","receivedAt":"2017-06-06T19:10:02Z","isPatch":true,"sender":{"key":"stefanbeller@gmail.com","avatar":"https://avatars.githubusercontent.com/u/455868?v=4"},"body":"On Tue, Jun 6, 2017 at 12:03 PM, Ævar Arnfjörð Bjarmason\n<avarab@gmail.com> wrote:\n> On Tue, Jun 6, 2017 at 8:48 PM, Stefan Beller <sbeller@google.com> wrote:\n>> On Tue, Jun 6, 2017 at 8:12 AM, Ævar Arnfjörð Bjarmason\n>> <avarab@gmail.com> wrote:\n>>> Add an option to use the sha1collisiondetection library from the\n>>> submodule in sha1collisiondetection/ instead of in the copy in the\n>>> sha1dc/ directory.\n>>>\n>>> This allows us to try out the submodule in sha1collisiondetection\n>>> without breaking the build for anyone who's not expecting them as we\n>>> work out any kinks.\n>>>\n>>> Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n>>\n>> Other projects using submodules sometimes have\n>> a .gitattributes entry to have .gitmodules not exported\n>> via git-archive. Do we want a similar thing?\n>\n> Right now we end up with an empty directory due to the issue you noted\n> in https://public-inbox.org/git/CAGZ79kZC98CxA69QjmX2s_SU6z1CSgKgwZeqvwiMRAQc6+S3xg@mail.gmail.com/\n>\n> It's probably best to have the .gitmodules file as some hint that\n> something should be there. We also ship the other .git* files.\n\nOk, but then let's talk about the other .git* files, would we want to\ndistribute these via tarballs? (I guess it is a minor thing if at all and\nnobody downloading a git tarball would be surprised by these metadata\nfiles or annoyed by them, so all is good?)\n\n>\n>> Speaking of attributes, I wonder if we want to specify\n>> the .gitmodules file to be text with unixy file endings:\n>> Having an entry\n>>     .gitattributes eol=crlf\n>> to simulate a Windows environment doesn't harm\n>> submodule operation, which is good. I'll check if we\n>> have a test for that.\n>\n> I have no idea what that would do or why we'd have it, but I'm going\n> to understand this as you looking into it :)\n\nI looked briefly into it and it seems to be no problem just as config files\non Windows are no problem. I just spoke up too quickly.\n"},{"id":"322041","messageId":"20170613020939.gemh3m5z6czgwmzp@oracle.com","threadId":"46120","inReplyTo":"20170606151231.25172-1-avarab@gmail.com","subject":"Re: [PATCH 0/3] update sha1dc","fromName":"Liam R. Howlett","fromEmail":"liam.howlett@oracle.com","sentAt":"2017-06-13T02:09:39Z","receivedAt":"2017-06-13T02:10:14Z","isPatch":true,"sender":{"key":"liam.howlett@oracle.com","avatar":null},"body":"* ?var Arnfj?r? Bjarmason <avarab@gmail.com> [170606 11:12]:\n> This updates sha1dc fixing the issue on Cygwin introduced in 2.13.1,\n> and hopefully not regressing elsewhere. Liam, it would be much\n> appreciated if you could test this on SPARC.\n\nTested and confirmed this works for SPARC with no build flags.\n\nSorry for the delay, I was away last week.\n\nThanks,\nLiam\n\n"},{"id":"323745","messageId":"20170702203548.GA26574@dinwoodie.org","threadId":"46120","inReplyTo":"CF387D0C-6743-4B88-A4CC-D6310A634E03@gmail.com","subject":"Re: Continous Integration (was: RE: Git v2.13.1 SHA1 very broken)","fromName":"Adam Dinwoodie","fromEmail":"adam@dinwoodie.org","sentAt":"2017-07-02T20:35:48Z","receivedAt":"2017-07-02T20:36:14Z","isPatch":false,"sender":{"key":"adam@dinwoodie.org","avatar":"https://avatars.githubusercontent.com/u/1397507?v=4"},"body":"On Tue, Jun 06, 2017 at 05:04:32PM +0200, Lars Schneider wrote:\n> > On 06 Jun 2017, at 16:47, Jason Pyeron <jpyeron@pdinc.us> wrote:\n> > \n> > Do we have Jenkins (or something else) setup for Git?\n> > \n> > We would be happy to donate (slave) VMs for cygwin builds og Git.  \n> > \n> > -Jason Pyeron\n> > \n> \n> We use TravisCI for Linux, Mac, and (in a special way) Windows: \n> https://travis-ci.org/git/git\n> \n> Windows is not supported by TravisCI. We just use TravisCI to\n> trigger a build on MS Azure and read the results:\n> https://github.com/git/git/commit/029aeeed55f6bfe8014e8ffe5fc7a6f2e5b110fc\n> \n> Maybe we could trigger a Cgywin build on your slaves in the same way?\n\nI tried setting up a Cygwin Git build on AppVeyor a little while ago,\nbut the problem I found is that Cygwin builds are slow, particularly if\nyou want to also run the test suite.  I do the builds for the Cygwin\ndistribution on my normal PC (so reasonably powerful but definitely not\ndevoted to the purpose), and doing the build and running the default\ntests takes in the region of 8 hours for the 64-bit build and 12 hours\nfor the 32-bit build.\n\nAt the moment, I'm trying to set up automated regular builds on my PC\nusing BuildBot.  I think that, short of someone donating some fairly\nsignificant resources for Cygwin builds, that's going to be the closest\nI'll be able to find for spotting problems early.  It's a project in my\ncurrently limited spare time, though, and not something I've done\nbefore, so it's taking a little while to get going.\n\nAdam\n"},{"id":"323748","messageId":"alpine.DEB.2.21.1.1707031429560.84669@virtualbox","threadId":"46120","inReplyTo":"20170702203548.GA26574@dinwoodie.org","subject":"Re: Continous Integration (was: RE: Git v2.13.1 SHA1 very broken)","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2017-07-03T12:34:13Z","receivedAt":"2017-07-03T12:34:30Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Adam,\n\nOn Sun, 2 Jul 2017, Adam Dinwoodie wrote:\n\n> I do the builds for the Cygwin distribution on my normal PC (so\n> reasonably powerful but definitely not devoted to the purpose), and\n> doing the build and running the default tests takes in the region of 8\n> hours for the 64-bit build and 12 hours for the 32-bit build.\n\nWow. 8 hours. I take it that you are bitten by the same issue as Git for\nWindows, where Git's test suite uses Unix shell scripting rather heavily,\nand Unix shell simply requiring tons of expensive emulation to run\ndecently on Windows.\n\n> At the moment, I'm trying to set up automated regular builds on my PC\n> using BuildBot.  I think that, short of someone donating some fairly\n> significant resources for Cygwin builds, that's going to be the closest\n> I'll be able to find for spotting problems early.  It's a project in my\n> currently limited spare time, though, and not something I've done\n> before, so it's taking a little while to get going.\n\nHow automated is your process? (Including, most importantly, updating\nthe Cygwin build setup...)\n\nI ask because I could possibly set up something using the existing\ninfrastructure for Git for Windows' testing, as long as\n\n1) everything is scripted, and\n\n2) you do not need interactive access to any box (I mainly use Docker\n   containers to run the builds)\n\nIf you are interested, feel free to ping me via private mail.\n\nCiao,\nJohannes\n"}]}