{"thread":{"id":"45763","subject":"[BUG] test suite broken with GIT_TEST_SPLIT_INDEX","startedAt":"2017-04-20T20:52:10Z","lastAt":"2017-04-24T22:15:05Z","messageCount":16,"participants":["Thomas Gummerer","Christian Couder","Jeff King","Junio C Hamano","Duy Nguyen"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"317383","messageId":"20170420205214.GB4989@hank","threadId":"45763","inReplyTo":null,"subject":"[BUG] test suite broken with GIT_TEST_SPLIT_INDEX","fromName":"Thomas Gummerer","fromEmail":"t.gummerer@gmail.com","sentAt":"2017-04-20T20:52:14Z","receivedAt":"2017-04-20T20:52:10Z","isPatch":false,"sender":{"key":"t.gummerer@gmail.com","avatar":"https://avatars.githubusercontent.com/u/191004?v=4"},"body":"Hi,\n\nI just tried to run the test suite with GIT_TEST_SPLIT_INDEX=YesPlease\nand noticed that a few tests are broken both in pu and master.\n\nBelow the test failures on master:\n\nTest Summary Report\n-------------------\nt7009-filter-branch-null-sha1.sh                 (Wstat: 256 Tests: 5 Failed: 2)\n  Failed tests:  4-5\n  Non-zero exit status: 1\nt3900-i18n-commit.sh                             (Wstat: 256 Tests: 34 Failed: 1)\n  Failed test:  34\n  Non-zero exit status: 1\nt5407-post-rewrite-hook.sh                       (Wstat: 256 Tests: 14 Failed: 4)\n  Failed tests:  11-14\n  Non-zero exit status: 1\nt3415-rebase-autosquash.sh                       (Wstat: 256 Tests: 19 Failed: 15)\n  Failed tests:  4-17, 19\n  Non-zero exit status: 1\nt3404-rebase-interactive.sh                      (Wstat: 256 Tests: 95 Failed: 54)\n  Failed tests:  18, 20, 22-24, 26-43, 45, 47-74, 84-85\n  Non-zero exit status: 1\n\nBisecting between master and v2.10.0 leads me to the merge commit\n94c9b5af70 (\"Merge branch 'cc/split-index-config'\", 2017-03-17).\n\nUnfortunately I don't forsee myself having time to track the bug down\nsoon.  Sorry for not noticing this earlier in the cycle.\n\nThe bisect log is below if someone finds it helpful:\n\ngit bisect start\n# bad: [6a2c2f8d34fa1e8f3bb85d159d354810ed63692e] Git 2.13-rc0\ngit bisect bad 6a2c2f8d34fa1e8f3bb85d159d354810ed63692e\n# good: [6ebdac1bab966b720d776aa43ca188fe378b1f4b] Git 2.10\ngit bisect good 6ebdac1bab966b720d776aa43ca188fe378b1f4b\n# good: [733671b0fd2fb03edb05273f36ec70bd624e544f] Merge branch 'maint'\ngit bisect good 733671b0fd2fb03edb05273f36ec70bd624e544f\n# good: [04b4f7d579056cedaae2de0a019e5993b4d9c2d0] Merge branch 'sb/submodule-update-initial-runs-custom-script' into maint\ngit bisect good 04b4f7d579056cedaae2de0a019e5993b4d9c2d0\n# bad: [af6865a7f1e1d915d3b63e998226028ca4abb6ee] submodule.c: convert is_submodule_modified to use strbuf_getwholeline\ngit bisect bad af6865a7f1e1d915d3b63e998226028ca4abb6ee\n# good: [3f7ebc6ece46f1c23480d094688b8b5f24eb345c] Merge branch 'jk/tempfile-ferror-fclose-confusion'\ngit bisect good 3f7ebc6ece46f1c23480d094688b8b5f24eb345c\n# bad: [94c9b5af703eb70adba349cfbfaaa3029849744c] Merge branch 'cc/split-index-config'\ngit bisect bad 94c9b5af703eb70adba349cfbfaaa3029849744c\n# good: [36d5286f6815542761dae92fdcdce8db1556727f] Merge branch 'ax/line-log-range-merge-fix'\ngit bisect good 36d5286f6815542761dae92fdcdce8db1556727f\n# good: [c3a008250272295271584c6303463ffb9b055cbc] read-cache: use freshen_shared_index() in read_index_from()\ngit bisect good c3a008250272295271584c6303463ffb9b055cbc\n# good: [228b78752de9d759839665764391262c0ec156cf] Merge branch 'jt/perf-updates'\ngit bisect good 228b78752de9d759839665764391262c0ec156cf\n# good: [073778017158ecf3153b050776029907bc75826f] Merge branch 'kn/ref-filter-branch-list'\ngit bisect good 073778017158ecf3153b050776029907bc75826f\n# good: [b46013950aff31b6626af96ccbf2c48469e36c66] Documentation/git-update-index: explain splitIndex.*\ngit bisect good b46013950aff31b6626af96ccbf2c48469e36c66\n# good: [32c43f595f93cdd4ed5305aef97a3f6aaa74ed72] Sync with 'maint'\ngit bisect good 32c43f595f93cdd4ed5305aef97a3f6aaa74ed72\n# first bad commit: [94c9b5af703eb70adba349cfbfaaa3029849744c] Merge branch 'cc/split-index-config'\n\n"},{"id":"317394","messageId":"CAP8UFD1LAU8hg4ioes=y4o_Phgd1zBhUJOmkqTPo++4SprWWpw@mail.gmail.com","threadId":"45763","inReplyTo":"20170420205214.GB4989@hank","subject":"Re: [BUG] test suite broken with GIT_TEST_SPLIT_INDEX","fromName":"Christian Couder","fromEmail":"christian.couder@gmail.com","sentAt":"2017-04-20T21:03:46Z","receivedAt":"2017-04-20T21:03:53Z","isPatch":false,"sender":{"key":"christian.couder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/208954?v=4"},"body":"Hi,\n\nOn Thu, Apr 20, 2017 at 10:52 PM, Thomas Gummerer <t.gummerer@gmail.com> wrote:\n> Hi,\n>\n> I just tried to run the test suite with GIT_TEST_SPLIT_INDEX=YesPlease\n> and noticed that a few tests are broken both in pu and master.\n>\n> Below the test failures on master:\n>\n> Test Summary Report\n> -------------------\n> t7009-filter-branch-null-sha1.sh                 (Wstat: 256 Tests: 5 Failed: 2)\n>   Failed tests:  4-5\n>   Non-zero exit status: 1\n> t3900-i18n-commit.sh                             (Wstat: 256 Tests: 34 Failed: 1)\n>   Failed test:  34\n>   Non-zero exit status: 1\n> t5407-post-rewrite-hook.sh                       (Wstat: 256 Tests: 14 Failed: 4)\n>   Failed tests:  11-14\n>   Non-zero exit status: 1\n> t3415-rebase-autosquash.sh                       (Wstat: 256 Tests: 19 Failed: 15)\n>   Failed tests:  4-17, 19\n>   Non-zero exit status: 1\n> t3404-rebase-interactive.sh                      (Wstat: 256 Tests: 95 Failed: 54)\n>   Failed tests:  18, 20, 22-24, 26-43, 45, 47-74, 84-85\n>   Non-zero exit status: 1\n>\n> Bisecting between master and v2.10.0 leads me to the merge commit\n> 94c9b5af70 (\"Merge branch 'cc/split-index-config'\", 2017-03-17).\n>\n> Unfortunately I don't forsee myself having time to track the bug down\n> soon.  Sorry for not noticing this earlier in the cycle.\n>\n> The bisect log is below if someone finds it helpful:\n>\n> git bisect start\n> # bad: [6a2c2f8d34fa1e8f3bb85d159d354810ed63692e] Git 2.13-rc0\n> git bisect bad 6a2c2f8d34fa1e8f3bb85d159d354810ed63692e\n> # good: [6ebdac1bab966b720d776aa43ca188fe378b1f4b] Git 2.10\n> git bisect good 6ebdac1bab966b720d776aa43ca188fe378b1f4b\n> # good: [733671b0fd2fb03edb05273f36ec70bd624e544f] Merge branch 'maint'\n> git bisect good 733671b0fd2fb03edb05273f36ec70bd624e544f\n> # good: [04b4f7d579056cedaae2de0a019e5993b4d9c2d0] Merge branch 'sb/submodule-update-initial-runs-custom-script' into maint\n> git bisect good 04b4f7d579056cedaae2de0a019e5993b4d9c2d0\n> # bad: [af6865a7f1e1d915d3b63e998226028ca4abb6ee] submodule.c: convert is_submodule_modified to use strbuf_getwholeline\n> git bisect bad af6865a7f1e1d915d3b63e998226028ca4abb6ee\n> # good: [3f7ebc6ece46f1c23480d094688b8b5f24eb345c] Merge branch 'jk/tempfile-ferror-fclose-confusion'\n> git bisect good 3f7ebc6ece46f1c23480d094688b8b5f24eb345c\n> # bad: [94c9b5af703eb70adba349cfbfaaa3029849744c] Merge branch 'cc/split-index-config'\n> git bisect bad 94c9b5af703eb70adba349cfbfaaa3029849744c\n> # good: [36d5286f6815542761dae92fdcdce8db1556727f] Merge branch 'ax/line-log-range-merge-fix'\n> git bisect good 36d5286f6815542761dae92fdcdce8db1556727f\n> # good: [c3a008250272295271584c6303463ffb9b055cbc] read-cache: use freshen_shared_index() in read_index_from()\n> git bisect good c3a008250272295271584c6303463ffb9b055cbc\n> # good: [228b78752de9d759839665764391262c0ec156cf] Merge branch 'jt/perf-updates'\n> git bisect good 228b78752de9d759839665764391262c0ec156cf\n> # good: [073778017158ecf3153b050776029907bc75826f] Merge branch 'kn/ref-filter-branch-list'\n> git bisect good 073778017158ecf3153b050776029907bc75826f\n> # good: [b46013950aff31b6626af96ccbf2c48469e36c66] Documentation/git-update-index: explain splitIndex.*\n> git bisect good b46013950aff31b6626af96ccbf2c48469e36c66\n> # good: [32c43f595f93cdd4ed5305aef97a3f6aaa74ed72] Sync with 'maint'\n> git bisect good 32c43f595f93cdd4ed5305aef97a3f6aaa74ed72\n> # first bad commit: [94c9b5af703eb70adba349cfbfaaa3029849744c] Merge branch 'cc/split-index-config'\n\nCould you try with the following patch:\n\nhttp://public-inbox.org/git/20170330210354.20018-1-chriscool@tuxfamily.org/\n\nThanks,\nChristian.\n"},{"id":"317395","messageId":"20170420210610.lxfc6kqrsq5i67nz@sigill.intra.peff.net","threadId":"45763","inReplyTo":"20170420205214.GB4989@hank","subject":"Re: [BUG] test suite broken with GIT_TEST_SPLIT_INDEX","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2017-04-20T21:06:10Z","receivedAt":"2017-04-20T21:06:16Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Thu, Apr 20, 2017 at 09:52:14PM +0100, Thomas Gummerer wrote:\n\n> I just tried to run the test suite with GIT_TEST_SPLIT_INDEX=YesPlease\n> and noticed that a few tests are broken both in pu and master.\n> [...]\n> Bisecting between master and v2.10.0 leads me to the merge commit\n> 94c9b5af70 (\"Merge branch 'cc/split-index-config'\", 2017-03-17).\n\nHmm. It looks like the fix from:\n\n  http://public-inbox.org/git/20170329080820.8084-1-chriscool@tuxfamily.org/\n\nhasn't been merged yet. That would possibly explain the problems on\nmaster, but I think it _is_ in pu. So maybe this is something else.\n\n-Peff\n"},{"id":"317408","messageId":"20170420212436.GC4989@hank","threadId":"45763","inReplyTo":"CAP8UFD1LAU8hg4ioes=y4o_Phgd1zBhUJOmkqTPo++4SprWWpw@mail.gmail.com","subject":"Re: [BUG] test suite broken with GIT_TEST_SPLIT_INDEX","fromName":"Thomas Gummerer","fromEmail":"t.gummerer@gmail.com","sentAt":"2017-04-20T21:24:36Z","receivedAt":"2017-04-20T21:24:32Z","isPatch":false,"sender":{"key":"t.gummerer@gmail.com","avatar":"https://avatars.githubusercontent.com/u/191004?v=4"},"body":"On 04/20, Christian Couder wrote:\n> Hi,\n> \n> On Thu, Apr 20, 2017 at 10:52 PM, Thomas Gummerer <t.gummerer@gmail.com> wrote:\n> > Hi,\n> >\n> > I just tried to run the test suite with GIT_TEST_SPLIT_INDEX=YesPlease\n> > and noticed that a few tests are broken both in pu and master.\n> >\n> > Below the test failures on master:\n> >\n> > Test Summary Report\n> > -------------------\n> > t7009-filter-branch-null-sha1.sh                 (Wstat: 256 Tests: 5 Failed: 2)\n> >   Failed tests:  4-5\n> >   Non-zero exit status: 1\n> > t3900-i18n-commit.sh                             (Wstat: 256 Tests: 34 Failed: 1)\n> >   Failed test:  34\n> >   Non-zero exit status: 1\n> > t5407-post-rewrite-hook.sh                       (Wstat: 256 Tests: 14 Failed: 4)\n> >   Failed tests:  11-14\n> >   Non-zero exit status: 1\n> > t3415-rebase-autosquash.sh                       (Wstat: 256 Tests: 19 Failed: 15)\n> >   Failed tests:  4-17, 19\n> >   Non-zero exit status: 1\n> > t3404-rebase-interactive.sh                      (Wstat: 256 Tests: 95 Failed: 54)\n> >   Failed tests:  18, 20, 22-24, 26-43, 45, 47-74, 84-85\n> >   Non-zero exit status: 1\n> >\n> > Bisecting between master and v2.10.0 leads me to the merge commit\n> > 94c9b5af70 (\"Merge branch 'cc/split-index-config'\", 2017-03-17).\n> >\n> > Unfortunately I don't forsee myself having time to track the bug down\n> > soon.  Sorry for not noticing this earlier in the cycle.\n> >\n> > The bisect log is below if someone finds it helpful:\n> >\n> > git bisect start\n> > # bad: [6a2c2f8d34fa1e8f3bb85d159d354810ed63692e] Git 2.13-rc0\n> > git bisect bad 6a2c2f8d34fa1e8f3bb85d159d354810ed63692e\n> > # good: [6ebdac1bab966b720d776aa43ca188fe378b1f4b] Git 2.10\n> > git bisect good 6ebdac1bab966b720d776aa43ca188fe378b1f4b\n> > # good: [733671b0fd2fb03edb05273f36ec70bd624e544f] Merge branch 'maint'\n> > git bisect good 733671b0fd2fb03edb05273f36ec70bd624e544f\n> > # good: [04b4f7d579056cedaae2de0a019e5993b4d9c2d0] Merge branch 'sb/submodule-update-initial-runs-custom-script' into maint\n> > git bisect good 04b4f7d579056cedaae2de0a019e5993b4d9c2d0\n> > # bad: [af6865a7f1e1d915d3b63e998226028ca4abb6ee] submodule.c: convert is_submodule_modified to use strbuf_getwholeline\n> > git bisect bad af6865a7f1e1d915d3b63e998226028ca4abb6ee\n> > # good: [3f7ebc6ece46f1c23480d094688b8b5f24eb345c] Merge branch 'jk/tempfile-ferror-fclose-confusion'\n> > git bisect good 3f7ebc6ece46f1c23480d094688b8b5f24eb345c\n> > # bad: [94c9b5af703eb70adba349cfbfaaa3029849744c] Merge branch 'cc/split-index-config'\n> > git bisect bad 94c9b5af703eb70adba349cfbfaaa3029849744c\n> > # good: [36d5286f6815542761dae92fdcdce8db1556727f] Merge branch 'ax/line-log-range-merge-fix'\n> > git bisect good 36d5286f6815542761dae92fdcdce8db1556727f\n> > # good: [c3a008250272295271584c6303463ffb9b055cbc] read-cache: use freshen_shared_index() in read_index_from()\n> > git bisect good c3a008250272295271584c6303463ffb9b055cbc\n> > # good: [228b78752de9d759839665764391262c0ec156cf] Merge branch 'jt/perf-updates'\n> > git bisect good 228b78752de9d759839665764391262c0ec156cf\n> > # good: [073778017158ecf3153b050776029907bc75826f] Merge branch 'kn/ref-filter-branch-list'\n> > git bisect good 073778017158ecf3153b050776029907bc75826f\n> > # good: [b46013950aff31b6626af96ccbf2c48469e36c66] Documentation/git-update-index: explain splitIndex.*\n> > git bisect good b46013950aff31b6626af96ccbf2c48469e36c66\n> > # good: [32c43f595f93cdd4ed5305aef97a3f6aaa74ed72] Sync with 'maint'\n> > git bisect good 32c43f595f93cdd4ed5305aef97a3f6aaa74ed72\n> > # first bad commit: [94c9b5af703eb70adba349cfbfaaa3029849744c] Merge branch 'cc/split-index-config'\n> \n> Could you try with the following patch:\n> \n> http://public-inbox.org/git/20170330210354.20018-1-chriscool@tuxfamily.org/\n\nYeah, I tried with and without that patch with the same result.\nUnless I'm screwing something up when testing I don't think this fixes\nthe issue unfortunately.\n\n> Thanks,\n> Christian.\n"},{"id":"317453","messageId":"xmqqfuh25rzz.fsf@gitster.mtv.corp.google.com","threadId":"45763","inReplyTo":"CAP8UFD1LAU8hg4ioes=y4o_Phgd1zBhUJOmkqTPo++4SprWWpw@mail.gmail.com","subject":"Re: [BUG] test suite broken with GIT_TEST_SPLIT_INDEX","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2017-04-21T04:01:04Z","receivedAt":"2017-04-21T04:02:02Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Christian Couder <christian.couder@gmail.com> writes:\n\n> Could you try with the following patch:\n>\n> http://public-inbox.org/git/20170330210354.20018-1-chriscool@tuxfamily.org/\n\nAh, this reminds me.  The patch has been in the stalled state for\nquite some time due to confusing description.  How about explaining\nit like so and merge it to 'next'?\n\n-- >8 --\nFrom: Christian Couder <christian.couder@gmail.com>\nDate: Thu, 30 Mar 2017 23:03:54 +0200\nSubject: [PATCH] read-cache: avoid using git_path() in freshen_shared_index()\n\nWhen performing an interactive rebase in split-index mode,\nthe commit message that one should rework when squashing commits\ncan contain some garbage instead of the usual concatenation of\nboth of the commit messages.\n\nThe code uses git_path() to compute the shared index filename, and\npasses it to check_and_freshen_file() as its argument; there is no\nguarantee that the rotating pathname buffer passed as argument will\nstay valid during the life of this call.  Make our own copy before\ncalling the function and pass the copy as its argument to avoid this\nrisky pattern.\n\nSigned-off-by: Christian Couder <chriscool@tuxfamily.org>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n read-cache.c | 3 ++-\n 1 file changed, 2 insertions(+), 1 deletion(-)\n\ndiff --git a/read-cache.c b/read-cache.c\nindex 8cf0673adc..0b166c211a 100644\n--- a/read-cache.c\n+++ b/read-cache.c\n@@ -1690,9 +1690,10 @@ int do_read_index(struct index_state *istate, const char *path, int must_exist)\n  */\n static void freshen_shared_index(char *base_sha1_hex, int warn)\n {\n-\tconst char *shared_index = git_path(\"sharedindex.%s\", base_sha1_hex);\n+\tchar *shared_index = git_pathdup(\"sharedindex.%s\", base_sha1_hex);\n \tif (!check_and_freshen_file(shared_index, 1) && warn)\n \t\twarning(\"could not freshen shared index '%s'\", shared_index);\n+\tfree(shared_index);\n }\n \n int read_index_from(struct index_state *istate, const char *path)\n-- \n2.13.0-rc0-176-gf5d713c632\n\n"},{"id":"317464","messageId":"CAP8UFD1N_PoQj3yK1XgL8L725UA-4NOgaNLVEXMrjNhOW=jF_g@mail.gmail.com","threadId":"45763","inReplyTo":"xmqqfuh25rzz.fsf@gitster.mtv.corp.google.com","subject":"Re: [BUG] test suite broken with GIT_TEST_SPLIT_INDEX","fromName":"Christian Couder","fromEmail":"christian.couder@gmail.com","sentAt":"2017-04-21T07:02:10Z","receivedAt":"2017-04-21T07:02:18Z","isPatch":false,"sender":{"key":"christian.couder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/208954?v=4"},"body":"On Fri, Apr 21, 2017 at 6:01 AM, Junio C Hamano <gitster@pobox.com> wrote:\n> Christian Couder <christian.couder@gmail.com> writes:\n>\n>> Could you try with the following patch:\n>>\n>> http://public-inbox.org/git/20170330210354.20018-1-chriscool@tuxfamily.org/\n>\n> Ah, this reminds me.  The patch has been in the stalled state for\n> quite some time due to confusing description.  How about explaining\n> it like so and merge it to 'next'?\n\nYeah, I am ok with this description. Thanks!\n"},{"id":"317465","messageId":"CAP8UFD25tJgQD=bREOG-_q0jCLw-nxhO6pYbOaaYMuAH4VxN3Q@mail.gmail.com","threadId":"45763","inReplyTo":"20170420212436.GC4989@hank","subject":"Re: [BUG] test suite broken with GIT_TEST_SPLIT_INDEX","fromName":"Christian Couder","fromEmail":"christian.couder@gmail.com","sentAt":"2017-04-21T07:10:28Z","receivedAt":"2017-04-21T07:10:36Z","isPatch":false,"sender":{"key":"christian.couder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/208954?v=4"},"body":"On Thu, Apr 20, 2017 at 11:24 PM, Thomas Gummerer <t.gummerer@gmail.com> wrote:\n> On 04/20, Christian Couder wrote:\n>>\n>> Could you try with the following patch:\n>>\n>> http://public-inbox.org/git/20170330210354.20018-1-chriscool@tuxfamily.org/\n>\n> Yeah, I tried with and without that patch with the same result.\n> Unless I'm screwing something up when testing I don't think this fixes\n> the issue unfortunately.\n\nOk, I will take a look soon.\n\nBy the way I think that GIT_TEST_SPLIT_INDEX has become redundant now\nthat there is core.splitIndex.\nSo perhaps in the long run it will be best to deprecate\nGIT_TEST_SPLIT_INDEX and eventually remove it.\n"},{"id":"317470","messageId":"CACsJy8DotVErJjbUBmt9bxu90CSKEsqAT_nYTNXwstEk3YhN2g@mail.gmail.com","threadId":"45763","inReplyTo":"CAP8UFD25tJgQD=bREOG-_q0jCLw-nxhO6pYbOaaYMuAH4VxN3Q@mail.gmail.com","subject":"Re: [BUG] test suite broken with GIT_TEST_SPLIT_INDEX","fromName":"Duy Nguyen","fromEmail":"pclouds@gmail.com","sentAt":"2017-04-21T09:53:02Z","receivedAt":"2017-04-21T09:53:38Z","isPatch":false,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"On Fri, Apr 21, 2017 at 2:10 PM, Christian Couder\n<christian.couder@gmail.com> wrote:\n> On Thu, Apr 20, 2017 at 11:24 PM, Thomas Gummerer <t.gummerer@gmail.com> wrote:\n>> On 04/20, Christian Couder wrote:\n>>>\n>>> Could you try with the following patch:\n>>>\n>>> http://public-inbox.org/git/20170330210354.20018-1-chriscool@tuxfamily.org/\n>>\n>> Yeah, I tried with and without that patch with the same result.\n>> Unless I'm screwing something up when testing I don't think this fixes\n>> the issue unfortunately.\n>\n> Ok, I will take a look soon.\n>\n> By the way I think that GIT_TEST_SPLIT_INDEX has become redundant now\n> that there is core.splitIndex.\n> So perhaps in the long run it will be best to deprecate\n> GIT_TEST_SPLIT_INDEX and eventually remove it.\n\nI think you can't, at least the way I understand this variable. It's a\n_test_ variable to force exercise split index code path a whole lot\nmore, by running the entire test suite with split index always\nenabled, instead of just a couple in  t????-split-index.sh. We can't\nachieve the same with core.splitIndex because that's more about user\ncontrol and you can't just set core.splitIndex for the entire test\nsuite (can we?).\n\nI would understand if the failed tests are about core.splitIndex (they\nboth try to control how split index is created), but failed tests look\ntotally unrelated. We may have discovered some bug (or that git_path\none Jeff mentioned).\n-- \nDuy\n"},{"id":"317483","messageId":"CAP8UFD2v-X3KfsvFSQrFvgTWRB7P684qN=DowNK2GunJys1i=Q@mail.gmail.com","threadId":"45763","inReplyTo":"CACsJy8DotVErJjbUBmt9bxu90CSKEsqAT_nYTNXwstEk3YhN2g@mail.gmail.com","subject":"Re: [BUG] test suite broken with GIT_TEST_SPLIT_INDEX","fromName":"Christian Couder","fromEmail":"christian.couder@gmail.com","sentAt":"2017-04-21T11:46:51Z","receivedAt":"2017-04-21T11:47:13Z","isPatch":false,"sender":{"key":"christian.couder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/208954?v=4"},"body":"On Fri, Apr 21, 2017 at 11:53 AM, Duy Nguyen <pclouds@gmail.com> wrote:\n> On Fri, Apr 21, 2017 at 2:10 PM, Christian Couder\n> <christian.couder@gmail.com> wrote:\n>> On Thu, Apr 20, 2017 at 11:24 PM, Thomas Gummerer <t.gummerer@gmail.com> wrote:\n>>> On 04/20, Christian Couder wrote:\n>>>>\n>>>> Could you try with the following patch:\n>>>>\n>>>> http://public-inbox.org/git/20170330210354.20018-1-chriscool@tuxfamily.org/\n>>>\n>>> Yeah, I tried with and without that patch with the same result.\n>>> Unless I'm screwing something up when testing I don't think this fixes\n>>> the issue unfortunately.\n>>\n>> Ok, I will take a look soon.\n>>\n>> By the way I think that GIT_TEST_SPLIT_INDEX has become redundant now\n>> that there is core.splitIndex.\n>> So perhaps in the long run it will be best to deprecate\n>> GIT_TEST_SPLIT_INDEX and eventually remove it.\n>\n> I think you can't, at least the way I understand this variable. It's a\n> _test_ variable to force exercise split index code path a whole lot\n> more, by running the entire test suite with split index always\n> enabled, instead of just a couple in  t????-split-index.sh. We can't\n> achieve the same with core.splitIndex because that's more about user\n> control and you can't just set core.splitIndex for the entire test\n> suite (can we?).\n\nYeah, you are right.\nIt looks like we have GIT_TEST_OPTS to pass options like --debug,\n--valgrind, --verbose, but we don't have an environment variable to\nset config options.\n"},{"id":"317485","messageId":"CAP8UFD3MJYR6pH2=7pKjBdLY6oUswNdG7eDNp6PdCFz336Y2FQ@mail.gmail.com","threadId":"45763","inReplyTo":"CAP8UFD2v-X3KfsvFSQrFvgTWRB7P684qN=DowNK2GunJys1i=Q@mail.gmail.com","subject":"Re: [BUG] test suite broken with GIT_TEST_SPLIT_INDEX","fromName":"Christian Couder","fromEmail":"christian.couder@gmail.com","sentAt":"2017-04-21T11:57:14Z","receivedAt":"2017-04-21T11:57:22Z","isPatch":false,"sender":{"key":"christian.couder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/208954?v=4"},"body":"On Fri, Apr 21, 2017 at 1:46 PM, Christian Couder\n<christian.couder@gmail.com> wrote:\n> On Fri, Apr 21, 2017 at 11:53 AM, Duy Nguyen <pclouds@gmail.com> wrote:\n>> On Fri, Apr 21, 2017 at 2:10 PM, Christian Couder\n>> <christian.couder@gmail.com> wrote:\n>>> On Thu, Apr 20, 2017 at 11:24 PM, Thomas Gummerer <t.gummerer@gmail.com> wrote:\n>>>> On 04/20, Christian Couder wrote:\n>>>>>\n>>>>> Could you try with the following patch:\n>>>>>\n>>>>> http://public-inbox.org/git/20170330210354.20018-1-chriscool@tuxfamily.org/\n>>>>\n>>>> Yeah, I tried with and without that patch with the same result.\n>>>> Unless I'm screwing something up when testing I don't think this fixes\n>>>> the issue unfortunately.\n>>>\n>>> Ok, I will take a look soon.\n>>>\n>>> By the way I think that GIT_TEST_SPLIT_INDEX has become redundant now\n>>> that there is core.splitIndex.\n>>> So perhaps in the long run it will be best to deprecate\n>>> GIT_TEST_SPLIT_INDEX and eventually remove it.\n>>\n>> I think you can't, at least the way I understand this variable. It's a\n>> _test_ variable to force exercise split index code path a whole lot\n>> more, by running the entire test suite with split index always\n>> enabled, instead of just a couple in  t????-split-index.sh. We can't\n>> achieve the same with core.splitIndex because that's more about user\n>> control and you can't just set core.splitIndex for the entire test\n>> suite (can we?).\n>\n> Yeah, you are right.\n> It looks like we have GIT_TEST_OPTS to pass options like --debug,\n> --valgrind, --verbose, but we don't have an environment variable to\n> set config options.\n\nOr maybe GIT_CONFIG_PARAMETERS works for this purpose?\n"},{"id":"317486","messageId":"CACsJy8ATvRgOZPpy9_SznvFXm5imJNbcqMSAYSw4H633rqRjEw@mail.gmail.com","threadId":"45763","inReplyTo":"CAP8UFD3MJYR6pH2=7pKjBdLY6oUswNdG7eDNp6PdCFz336Y2FQ@mail.gmail.com","subject":"Re: [BUG] test suite broken with GIT_TEST_SPLIT_INDEX","fromName":"Duy Nguyen","fromEmail":"pclouds@gmail.com","sentAt":"2017-04-21T12:25:21Z","receivedAt":"2017-04-21T12:26:13Z","isPatch":false,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"On Fri, Apr 21, 2017 at 6:57 PM, Christian Couder\n<christian.couder@gmail.com> wrote:\n> On Fri, Apr 21, 2017 at 1:46 PM, Christian Couder\n> <christian.couder@gmail.com> wrote:\n>> On Fri, Apr 21, 2017 at 11:53 AM, Duy Nguyen <pclouds@gmail.com> wrote:\n>>> On Fri, Apr 21, 2017 at 2:10 PM, Christian Couder\n>>> <christian.couder@gmail.com> wrote:\n>>>> On Thu, Apr 20, 2017 at 11:24 PM, Thomas Gummerer <t.gummerer@gmail.com> wrote:\n>>>>> On 04/20, Christian Couder wrote:\n>>>>>>\n>>>>>> Could you try with the following patch:\n>>>>>>\n>>>>>> http://public-inbox.org/git/20170330210354.20018-1-chriscool@tuxfamily.org/\n>>>>>\n>>>>> Yeah, I tried with and without that patch with the same result.\n>>>>> Unless I'm screwing something up when testing I don't think this fixes\n>>>>> the issue unfortunately.\n>>>>\n>>>> Ok, I will take a look soon.\n>>>>\n>>>> By the way I think that GIT_TEST_SPLIT_INDEX has become redundant now\n>>>> that there is core.splitIndex.\n>>>> So perhaps in the long run it will be best to deprecate\n>>>> GIT_TEST_SPLIT_INDEX and eventually remove it.\n>>>\n>>> I think you can't, at least the way I understand this variable. It's a\n>>> _test_ variable to force exercise split index code path a whole lot\n>>> more, by running the entire test suite with split index always\n>>> enabled, instead of just a couple in  t????-split-index.sh. We can't\n>>> achieve the same with core.splitIndex because that's more about user\n>>> control and you can't just set core.splitIndex for the entire test\n>>> suite (can we?).\n>>\n>> Yeah, you are right.\n>> It looks like we have GIT_TEST_OPTS to pass options like --debug,\n>> --valgrind, --verbose, but we don't have an environment variable to\n>> set config options.\n>\n> Or maybe GIT_CONFIG_PARAMETERS works for this purpose?\n\nIt has to be set inside test-lib.sh, not from outside because\nenvironment variables from outside are filtered if I remember\ncorrectly and only a few specials plus those GIT_TEST_ can survive.\nSome tests override GIT_CONFIG_PARAMETERS themselves to pass config\nvars to certain command (I know because I just did a couple days ago\n;).which loses core.splitIndex.\n-- \nDuy\n"},{"id":"317490","messageId":"CAP8UFD2f9g__ykCjReSoaAUvFTPmgRDbsWFQMRrFoFw8haV0uA@mail.gmail.com","threadId":"45763","inReplyTo":"20170420212436.GC4989@hank","subject":"Re: [BUG] test suite broken with GIT_TEST_SPLIT_INDEX","fromName":"Christian Couder","fromEmail":"christian.couder@gmail.com","sentAt":"2017-04-21T14:25:20Z","receivedAt":"2017-04-21T14:25:27Z","isPatch":false,"sender":{"key":"christian.couder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/208954?v=4"},"body":"On Thu, Apr 20, 2017 at 11:24 PM, Thomas Gummerer <t.gummerer@gmail.com> wrote:\n> On 04/20, Christian Couder wrote:\n>>\n>> Could you try with the following patch:\n>>\n>> http://public-inbox.org/git/20170330210354.20018-1-chriscool@tuxfamily.org/\n>\n> Yeah, I tried with and without that patch with the same result.\n> Unless I'm screwing something up when testing I don't think this fixes\n> the issue unfortunately.\n\nI just tried on \"pu\" and only the first test\n(t7009-filter-branch-null-sha1.sh) fails there.\n"},{"id":"317496","messageId":"CAP8UFD36dcm9EfvtWqqEON1Muyyd7_j3uRtr6C2bLzXZN5n1MQ@mail.gmail.com","threadId":"45763","inReplyTo":"CAP8UFD2f9g__ykCjReSoaAUvFTPmgRDbsWFQMRrFoFw8haV0uA@mail.gmail.com","subject":"Re: [BUG] test suite broken with GIT_TEST_SPLIT_INDEX","fromName":"Christian Couder","fromEmail":"christian.couder@gmail.com","sentAt":"2017-04-21T15:23:51Z","receivedAt":"2017-04-21T18:06:54Z","isPatch":false,"sender":{"key":"christian.couder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/208954?v=4"},"body":"On Fri, Apr 21, 2017 at 4:25 PM, Christian Couder\n<christian.couder@gmail.com> wrote:\n> On Thu, Apr 20, 2017 at 11:24 PM, Thomas Gummerer <t.gummerer@gmail.com> wrote:\n>> On 04/20, Christian Couder wrote:\n>>>\n>>> Could you try with the following patch:\n>>>\n>>> http://public-inbox.org/git/20170330210354.20018-1-chriscool@tuxfamily.org/\n>>\n>> Yeah, I tried with and without that patch with the same result.\n>> Unless I'm screwing something up when testing I don't think this fixes\n>> the issue unfortunately.\n>\n> I just tried on \"pu\" and only the first test\n> (t7009-filter-branch-null-sha1.sh) fails there.\n\nI bisected this test's failure (when using\nGIT_TEST_SPLIT_INDEX=YesPlease) to e6a1dd77e1 (read-cache: regenerate\nshared index if necessary, 2017-02-27).\n\nThe failing test is the following:\n\ntest_expect_success 'filter commands are still checked' '\n        test_must_fail git filter-branch \\\n                --force --prune-empty \\\n                --index-filter \"git rm --cached --ignore-unmatch three.t\"\n'\n\nAnd if I add the following at the beginning of the test:\n\n        git config splitIndex.maxPercentChange 100 &&\n\nthe test then passes.\n\nSo It looks like in split index mode the test doesn't expect the\nshared index to be regenerated.\nMaybe Peff, as he is the author of this test, or Duy have an idea about this?\n"},{"id":"317511","messageId":"20170421170943.tj5jcstj3yy27sev@sigill.intra.peff.net","threadId":"45763","inReplyTo":"CACsJy8ATvRgOZPpy9_SznvFXm5imJNbcqMSAYSw4H633rqRjEw@mail.gmail.com","subject":"Re: [BUG] test suite broken with GIT_TEST_SPLIT_INDEX","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2017-04-21T17:09:43Z","receivedAt":"2017-04-21T19:27:59Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Fri, Apr 21, 2017 at 07:25:21PM +0700, Duy Nguyen wrote:\n\n> >> Yeah, you are right.\n> >> It looks like we have GIT_TEST_OPTS to pass options like --debug,\n> >> --valgrind, --verbose, but we don't have an environment variable to\n> >> set config options.\n> >\n> > Or maybe GIT_CONFIG_PARAMETERS works for this purpose?\n> \n> It has to be set inside test-lib.sh, not from outside because\n> environment variables from outside are filtered if I remember\n> correctly and only a few specials plus those GIT_TEST_ can survive.\n> Some tests override GIT_CONFIG_PARAMETERS themselves to pass config\n> vars to certain command (I know because I just did a couple days ago\n> ;).which loses core.splitIndex.\n\nIt does seem reasonable to have a GIT_TEST_REPO_CONFIG that sets some\nvariables by default in the trash repository created by\ntest_create_repo.\n\nThat doesn't quite catch everything, because a few tests make their own\nsub-repos. But those cases are usually testing something very specific\nanyway.\n\n-Peff\n"},{"id":"317513","messageId":"20170421170551.jsj47btuyfwvmc62@sigill.intra.peff.net","threadId":"45763","inReplyTo":"CAP8UFD36dcm9EfvtWqqEON1Muyyd7_j3uRtr6C2bLzXZN5n1MQ@mail.gmail.com","subject":"Re: [BUG] test suite broken with GIT_TEST_SPLIT_INDEX","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2017-04-21T17:05:51Z","receivedAt":"2017-04-21T19:52:40Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Fri, Apr 21, 2017 at 05:23:51PM +0200, Christian Couder wrote:\n\n> > I just tried on \"pu\" and only the first test\n> > (t7009-filter-branch-null-sha1.sh) fails there.\n> \n> I bisected this test's failure (when using\n> GIT_TEST_SPLIT_INDEX=YesPlease) to e6a1dd77e1 (read-cache: regenerate\n> shared index if necessary, 2017-02-27).\n> \n> The failing test is the following:\n> \n> test_expect_success 'filter commands are still checked' '\n>         test_must_fail git filter-branch \\\n>                 --force --prune-empty \\\n>                 --index-filter \"git rm --cached --ignore-unmatch three.t\"\n> '\n> \n> And if I add the following at the beginning of the test:\n> \n>         git config splitIndex.maxPercentChange 100 &&\n> \n> the test then passes.\n> \n> So It looks like in split index mode the test doesn't expect the\n> shared index to be regenerated.\n> Maybe Peff, as he is the author of this test, or Duy have an idea about this?\n\nRight. The test has a broken tree with a null sha1, and filter-branch\nwill do:\n\n  GIT_ALLOW_NULL_SHA1=1 git read-tree $broken\n\nto allow it to enter the index. We expect that further commands that\nwrite out the index will not allow it (so you can run commands that\nremove the broken entry, but not ones that leave it).\n\nSo without split index, this command:\n\n  git rm --cached three.t\n\nwill fail. But in split-index mode, the broken entry is in another\nindex, and is left untouched. I'm not sure there's a way to reconcile\nthe split-index behavior with what the test is expecting; it's\ninherently optimizing out the thing that the test wants to check.\n\nProbably we should catch the broken index entry when we write out the\ntree, too. We usually do catch missing objects, but this one is a\ngitlink, so it's OK for it to be missing. I think we should catch the\nnull sha1 specifically, though, as that was the intent of the commit\nthat added t7009.\n\nSo the patch below _almost_ works. It fixes the failing test. But note\nthe new test I added, with a noop index-filter. That checks that we\ndon't retain the cache-tree extension from the bogus tree when reading.\nBut for some reason it fails on split-index mode. Does cache-tree stuff\nsomehow work differently there?\n\ndiff --git a/cache-tree.c b/cache-tree.c\nindex 345ea3596..34baa6d85 100644\n--- a/cache-tree.c\n+++ b/cache-tree.c\n@@ -354,7 +354,9 @@ static int update_one(struct cache_tree *it,\n \t\t\tentlen = pathlen - baselen;\n \t\t\ti++;\n \t\t}\n-\t\tif (mode != S_IFGITLINK && !missing_ok && !has_sha1_file(sha1)) {\n+\n+\t\tif (is_null_sha1(sha1) ||\n+\t\t    (mode != S_IFGITLINK && !missing_ok && !has_sha1_file(sha1))) {\n \t\t\tstrbuf_release(&buffer);\n \t\t\tif (expected_missing)\n \t\t\t\treturn -1;\ndiff --git a/read-cache.c b/read-cache.c\nindex b3d0f3c30..15a4779f2 100644\n--- a/read-cache.c\n+++ b/read-cache.c\n@@ -2197,6 +2197,7 @@ static int do_write_index(struct index_state *istate, int newfd,\n \tint entries = istate->cache_nr;\n \tstruct stat st;\n \tstruct strbuf previous_name_buf = STRBUF_INIT, *previous_name;\n+\tint drop_cache_tree = 0;\n \n \tfor (i = removed = extended = 0; i < entries; i++) {\n \t\tif (cache[i]->ce_flags & CE_REMOVE)\n@@ -2247,6 +2248,8 @@ static int do_write_index(struct index_state *istate, int newfd,\n \t\t\t\twarning(msg, ce->name);\n \t\t\telse\n \t\t\t\treturn error(msg, ce->name);\n+\n+\t\t\tdrop_cache_tree = 1;\n \t\t}\n \t\tif (ce_write_entry(&c, newfd, ce, previous_name) < 0)\n \t\t\treturn -1;\n@@ -2265,7 +2268,7 @@ static int do_write_index(struct index_state *istate, int newfd,\n \t\tif (err)\n \t\t\treturn -1;\n \t}\n-\tif (!strip_extensions && istate->cache_tree) {\n+\tif (!strip_extensions && !drop_cache_tree && istate->cache_tree) {\n \t\tstruct strbuf sb = STRBUF_INIT;\n \n \t\tcache_tree_write(&sb, istate->cache_tree);\ndiff --git a/t/t7009-filter-branch-null-sha1.sh b/t/t7009-filter-branch-null-sha1.sh\nindex c27f90f28..a8d9ec498 100755\n--- a/t/t7009-filter-branch-null-sha1.sh\n+++ b/t/t7009-filter-branch-null-sha1.sh\n@@ -31,6 +31,12 @@ test_expect_success 'setup: bring HEAD and index in sync' '\n \tgit commit -a -m \"back to normal\"\n '\n \n+test_expect_success 'noop filter-branch complains' '\n+\ttest_must_fail git filter-branch \\\n+\t\t--force --prune-empty \\\n+\t\t--index-filter \"true\"\n+'\n+\n test_expect_success 'filter commands are still checked' '\n \ttest_must_fail git filter-branch \\\n \t\t--force --prune-empty \\\n"},{"id":"317729","messageId":"20170424221516.GD4989@hank","threadId":"45763","inReplyTo":"CAP8UFD2f9g__ykCjReSoaAUvFTPmgRDbsWFQMRrFoFw8haV0uA@mail.gmail.com","subject":"Re: [BUG] test suite broken with GIT_TEST_SPLIT_INDEX","fromName":"Thomas Gummerer","fromEmail":"t.gummerer@gmail.com","sentAt":"2017-04-24T22:15:16Z","receivedAt":"2017-04-24T22:15:05Z","isPatch":false,"sender":{"key":"t.gummerer@gmail.com","avatar":"https://avatars.githubusercontent.com/u/191004?v=4"},"body":"On 04/21, Christian Couder wrote:\n> On Thu, Apr 20, 2017 at 11:24 PM, Thomas Gummerer <t.gummerer@gmail.com> wrote:\n> > On 04/20, Christian Couder wrote:\n> >>\n> >> Could you try with the following patch:\n> >>\n> >> http://public-inbox.org/git/20170330210354.20018-1-chriscool@tuxfamily.org/\n> >\n> > Yeah, I tried with and without that patch with the same result.\n> > Unless I'm screwing something up when testing I don't think this fixes\n> > the issue unfortunately.\n> \n> I just tried on \"pu\" and only the first test\n> (t7009-filter-branch-null-sha1.sh) fails there.\n\nI can't seem to reproduce this now either with the latest pu or next.\nI must have messed something up while testing.\n\nSorry for the noise.\n"}]}