{"thread":{"id":"59080","subject":"[PATCH] t6426: fix TODO about making test more comprehensive","startedAt":"2023-01-13T04:30:32Z","lastAt":"2023-01-14T18:49:54Z","messageCount":4,"participants":["Elijah Newren via GitGitGadget","Andrei Rybak","Elijah Newren"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"470235","messageId":"pull.1462.git.1673584084761.gitgitgadget@gmail.com","threadId":"59080","inReplyTo":null,"subject":"[PATCH] t6426: fix TODO about making test more comprehensive","fromName":"Elijah Newren via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2023-01-13T04:28:04Z","receivedAt":"2023-01-13T04:30:32Z","isPatch":true,"sender":{"key":"newren@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5455730?v=4"},"body":"From: Elijah Newren <newren@gmail.com>\n\nt6426.7 (a rename/add testcase) long had a TODO/FIXME comment about\nhow the test could be improved (with some commented out sample code\nthat had a few small errors), but those improvements were blocked on\nother changes still in progress.  The necessary changes were put in\nplace years ago but the comment was forgotten.  Remove and fix the\ncommented out code section and finally remove the big TODO/FIXME\ncomment.\n\nSigned-off-by: Elijah Newren <newren@gmail.com>\n---\n    t6426: fix TODO about making test more comprehensive\n    \n    See\n    https://lore.kernel.org/git/CABPp-BFxK7SGs3wsOfozSw_Uvr-ynr+x8ciPV2Rmfx6Nr4si6g@mail.gmail.com/\n\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-1462%2Fnewren%2Ft6426-fix-todo-v1\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1462/newren/t6426-fix-todo-v1\nPull-Request: https://github.com/gitgitgadget/git/pull/1462\n\n t/t6426-merge-skip-unneeded-updates.sh | 56 ++++++++++----------------\n 1 file changed, 22 insertions(+), 34 deletions(-)\n\ndiff --git a/t/t6426-merge-skip-unneeded-updates.sh b/t/t6426-merge-skip-unneeded-updates.sh\nindex 2bb8e7f09bb..1fcf5d034ed 100755\n--- a/t/t6426-merge-skip-unneeded-updates.sh\n+++ b/t/t6426-merge-skip-unneeded-updates.sh\n@@ -380,40 +380,28 @@ test_expect_success '2c: Modify b & add c VS rename b->c' '\n \n \t\t# Make sure c WAS updated\n \t\ttest-tool chmtime --get c >new-mtime &&\n-\t\ttest $(cat old-mtime) -lt $(cat new-mtime)\n-\n-\t\t# FIXME: rename/add conflicts are horribly broken right now;\n-\t\t# when I get back to my patch series fixing it and\n-\t\t# rename/rename(2to1) conflicts to bring them in line with\n-\t\t# how add/add conflicts behave, then checks like the below\n-\t\t# could be added.  But that patch series is waiting until\n-\t\t# the rename-directory-detection series lands, which this\n-\t\t# is part of.  And in the mean time, I do not want to further\n-\t\t# enforce broken behavior.  So for now, the main test is the\n-\t\t# one above that err is an empty file.\n-\n-\t\t#git ls-files -s >index_files &&\n-\t\t#test_line_count = 2 index_files &&\n-\n-\t\t#git rev-parse >actual :2:c :3:c &&\n-\t\t#git rev-parse >expect A:b  A:c  &&\n-\t\t#test_cmp expect actual &&\n-\n-\t\t#git cat-file -p A:b >>merged &&\n-\t\t#git cat-file -p A:c >>merge-me &&\n-\t\t#>empty &&\n-\t\t#test_must_fail git merge-file \\\n-\t\t#\t-L \"Temporary merge branch 1\" \\\n-\t\t#\t-L \"\" \\\n-\t\t#\t-L \"Temporary merge branch 2\" \\\n-\t\t#\tmerged empty merge-me &&\n-\t\t#sed -e \"s/^\\([<=>]\\)/\\1\\1\\1/\" merged >merged-internal &&\n-\n-\t\t#git hash-object c               >actual &&\n-\t\t#git hash-object merged-internal >expect &&\n-\t\t#test_cmp expect actual &&\n-\n-\t\t#test_path_is_missing b\n+\t\ttest $(cat old-mtime) -lt $(cat new-mtime) &&\n+\n+\t\tgit ls-files -s >index_files &&\n+\t\ttest_line_count = 2 index_files &&\n+\n+\t\tgit rev-parse >actual :2:c :3:c &&\n+\t\tgit rev-parse >expect A:c  A:b  &&\n+\t\ttest_cmp expect actual &&\n+\n+\t\tgit cat-file -p A:b >>merge-me &&\n+\t\tgit cat-file -p A:c >>merged &&\n+\t\t>empty &&\n+\t\ttest_must_fail git merge-file \\\n+\t\t\t-L \"HEAD\" \\\n+\t\t\t-L \"\" \\\n+\t\t\t-L \"B^0\" \\\n+\t\t\tmerged empty merge-me &&\n+\t\tsed -e \"s/^\\([<=>]\\)/\\1\\1\\1/\" merged >merged-internal &&\n+\n+\t\ttest_cmp merged c &&\n+\n+\t\ttest_path_is_missing b\n \t)\n '\n \n\nbase-commit: 2b4f5a4e4bb102ac8d967cea653ed753b608193c\n-- \ngitgitgadget\n"},{"id":"470312","messageId":"f03094ce-e9e5-9530-7ed7-893a3f291ab0@gmail.com","threadId":"59080","inReplyTo":"pull.1462.git.1673584084761.gitgitgadget@gmail.com","subject":"Re: [PATCH] t6426: fix TODO about making test more comprehensive","fromName":"Andrei Rybak","fromEmail":"rybak.a.v@gmail.com","sentAt":"2023-01-13T22:09:24Z","receivedAt":"2023-01-13T22:09:31Z","isPatch":true,"sender":{"key":"rybak.a.v@gmail.com","avatar":"https://avatars.githubusercontent.com/u/624072?v=4"},"body":"On 13/01/2023 05:28, Elijah Newren via GitGitGadget wrote:\n> From: Elijah Newren <newren@gmail.com>\n> \n> t6426.7 (a rename/add testcase) long had a TODO/FIXME comment about\n> how the test could be improved (with some commented out sample code\n> that had a few small errors), but those improvements were blocked on\n> other changes still in progress.  The necessary changes were put in\n> place years ago but the comment was forgotten.  Remove and fix the\n> commented out code section and finally remove the big TODO/FIXME\n> comment.\n> \n> Signed-off-by: Elijah Newren <newren@gmail.com>\n> ---\n\nThank you for taking care of this FIXME.\n\n>      t6426: fix TODO about making test more comprehensive\n>      \n>      See\n>      https://lore.kernel.org/git/CABPp-BFxK7SGs3wsOfozSw_Uvr-ynr+x8ciPV2Rmfx6Nr4si6g@mail.gmail.com/\n> \n> Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1462%2Fnewren%2Ft6426-fix-todo-v1\n> Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1462/newren/t6426-fix-todo-v1\n> Pull-Request: https://github.com/gitgitgadget/git/pull/1462\n> \n>   t/t6426-merge-skip-unneeded-updates.sh | 56 ++++++++++----------------\n>   1 file changed, 22 insertions(+), 34 deletions(-)\n> \n> diff --git a/t/t6426-merge-skip-unneeded-updates.sh b/t/t6426-merge-skip-unneeded-updates.sh\n> index 2bb8e7f09bb..1fcf5d034ed 100755\n> --- a/t/t6426-merge-skip-unneeded-updates.sh\n> +++ b/t/t6426-merge-skip-unneeded-updates.sh\n> @@ -380,40 +380,28 @@ test_expect_success '2c: Modify b & add c VS rename b->c' '\n>   \n>   \t\t# Make sure c WAS updated\n>   \t\ttest-tool chmtime --get c >new-mtime &&\n> -\t\ttest $(cat old-mtime) -lt $(cat new-mtime)\n> -\n> -\t\t# FIXME: rename/add conflicts are horribly broken right now;\n> -\t\t# when I get back to my patch series fixing it and\n> -\t\t# rename/rename(2to1) conflicts to bring them in line with\n> -\t\t# how add/add conflicts behave, then checks like the below\n> -\t\t# could be added.  But that patch series is waiting until\n> -\t\t# the rename-directory-detection series lands, which this\n> -\t\t# is part of.  And in the mean time, I do not want to further\n> -\t\t# enforce broken behavior.  So for now, the main test is the\n> -\t\t# one above that err is an empty file.\n> -\n> -\t\t#git ls-files -s >index_files &&\n> -\t\t#test_line_count = 2 index_files &&\n> -\n> -\t\t#git rev-parse >actual :2:c :3:c &&\n> -\t\t#git rev-parse >expect A:b  A:c  &&\n> -\t\t#test_cmp expect actual &&\n> -\n> -\t\t#git cat-file -p A:b >>merged &&\n> -\t\t#git cat-file -p A:c >>merge-me &&\n> -\t\t#>empty &&\n> -\t\t#test_must_fail git merge-file \\\n> -\t\t#\t-L \"Temporary merge branch 1\" \\\n> -\t\t#\t-L \"\" \\\n> -\t\t#\t-L \"Temporary merge branch 2\" \\\n> -\t\t#\tmerged empty merge-me &&\n> -\t\t#sed -e \"s/^\\([<=>]\\)/\\1\\1\\1/\" merged >merged-internal &&\n> -\n> -\t\t#git hash-object c               >actual &&\n> -\t\t#git hash-object merged-internal >expect &&\n> -\t\t#test_cmp expect actual &&\n> -\n> -\t\t#test_path_is_missing b\n> +\t\ttest $(cat old-mtime) -lt $(cat new-mtime) &&\n> +\n> +\t\tgit ls-files -s >index_files &&\n> +\t\ttest_line_count = 2 index_files &&\n> +\n> +\t\tgit rev-parse >actual :2:c :3:c &&\n> +\t\tgit rev-parse >expect A:c  A:b  &&\n> +\t\ttest_cmp expect actual &&\n> +\n> +\t\tgit cat-file -p A:b >>merge-me &&\n> +\t\tgit cat-file -p A:c >>merged &&\n> +\t\t>empty &&\n> +\t\ttest_must_fail git merge-file \\\n> +\t\t\t-L \"HEAD\" \\\n> +\t\t\t-L \"\" \\\n> +\t\t\t-L \"B^0\" \\\n> +\t\t\tmerged empty merge-me &&\n> +\t\tsed -e \"s/^\\([<=>]\\)/\\1\\1\\1/\" merged >merged-internal &&\n\nIt seems that this line can be dropped, because merged-internal is not\ninspected afterwards. None of the other tests in the file do similar\ncalls to `sed`.  Such substitutions with sed are present in\nt6422-merge-rename-corner-cases.sh and t6406-merge-attr.sh though.\n\n> +\n> +\t\ttest_cmp merged c &&\n> +\n> +\t\ttest_path_is_missing b\n\nFunction test_setup_2c() creates commits in order: commit O (create b),\ncommit A (modify b, create c), and then commit B (rename b->c).\nI would have preferred if \"test_path_is_missing b\" check was done\nseveral lines higher, just before \"test_line_count = 2 index_files\".\nIt feels more natural with this order of commits in setup to check what\nhappened to file \"b\" first.  It would also mean that all checking of\ndirectory contents is done in one place, before merge conflict in file\n\"c\" is inspected.\n\nI see, however, that all tests in this file follow the pattern of\nchecking missing files at the very end, and consistency might be\npreferable here.\n\n>   \t)\n>   '\n>   \n> \n> base-commit: 2b4f5a4e4bb102ac8d967cea653ed753b608193c\n\nAside from unnecessary call to sed and nitpicking about order of\nassertions, the patch looks good to me.\n"},{"id":"470321","messageId":"CABPp-BE8O0beOS3=Y5Sh23KMRJGsOqmdHWD=ide4_=Zn5bWSPg@mail.gmail.com","threadId":"59080","inReplyTo":"f03094ce-e9e5-9530-7ed7-893a3f291ab0@gmail.com","subject":"Re: [PATCH] t6426: fix TODO about making test more comprehensive","fromName":"Elijah Newren","fromEmail":"newren@gmail.com","sentAt":"2023-01-14T04:06:00Z","receivedAt":"2023-01-14T04:06:23Z","isPatch":true,"sender":{"key":"newren@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5455730?v=4"},"body":"On Fri, Jan 13, 2023 at 2:09 PM Andrei Rybak <rybak.a.v@gmail.com> wrote:\n>\n> On 13/01/2023 05:28, Elijah Newren via GitGitGadget wrote:\n> > From: Elijah Newren <newren@gmail.com>\n> >\n> > t6426.7 (a rename/add testcase) long had a TODO/FIXME comment about\n> > how the test could be improved (with some commented out sample code\n> > that had a few small errors), but those improvements were blocked on\n> > other changes still in progress.  The necessary changes were put in\n> > place years ago but the comment was forgotten.  Remove and fix the\n> > commented out code section and finally remove the big TODO/FIXME\n> > comment.\n> >\n> > Signed-off-by: Elijah Newren <newren@gmail.com>\n> > ---\n>\n> Thank you for taking care of this FIXME.\n>\n> >      t6426: fix TODO about making test more comprehensive\n> >\n> >      See\n> >      https://lore.kernel.org/git/CABPp-BFxK7SGs3wsOfozSw_Uvr-ynr+x8ciPV2Rmfx6Nr4si6g@mail.gmail.com/\n> >\n> > Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1462%2Fnewren%2Ft6426-fix-todo-v1\n> > Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1462/newren/t6426-fix-todo-v1\n> > Pull-Request: https://github.com/gitgitgadget/git/pull/1462\n> >\n> >   t/t6426-merge-skip-unneeded-updates.sh | 56 ++++++++++----------------\n> >   1 file changed, 22 insertions(+), 34 deletions(-)\n> >\n> > diff --git a/t/t6426-merge-skip-unneeded-updates.sh b/t/t6426-merge-skip-unneeded-updates.sh\n> > index 2bb8e7f09bb..1fcf5d034ed 100755\n> > --- a/t/t6426-merge-skip-unneeded-updates.sh\n> > +++ b/t/t6426-merge-skip-unneeded-updates.sh\n> > @@ -380,40 +380,28 @@ test_expect_success '2c: Modify b & add c VS rename b->c' '\n> >\n> >               # Make sure c WAS updated\n> >               test-tool chmtime --get c >new-mtime &&\n> > -             test $(cat old-mtime) -lt $(cat new-mtime)\n> > -\n> > -             # FIXME: rename/add conflicts are horribly broken right now;\n> > -             # when I get back to my patch series fixing it and\n> > -             # rename/rename(2to1) conflicts to bring them in line with\n> > -             # how add/add conflicts behave, then checks like the below\n> > -             # could be added.  But that patch series is waiting until\n> > -             # the rename-directory-detection series lands, which this\n> > -             # is part of.  And in the mean time, I do not want to further\n> > -             # enforce broken behavior.  So for now, the main test is the\n> > -             # one above that err is an empty file.\n> > -\n> > -             #git ls-files -s >index_files &&\n> > -             #test_line_count = 2 index_files &&\n> > -\n> > -             #git rev-parse >actual :2:c :3:c &&\n> > -             #git rev-parse >expect A:b  A:c  &&\n> > -             #test_cmp expect actual &&\n> > -\n> > -             #git cat-file -p A:b >>merged &&\n> > -             #git cat-file -p A:c >>merge-me &&\n> > -             #>empty &&\n> > -             #test_must_fail git merge-file \\\n> > -             #       -L \"Temporary merge branch 1\" \\\n> > -             #       -L \"\" \\\n> > -             #       -L \"Temporary merge branch 2\" \\\n> > -             #       merged empty merge-me &&\n> > -             #sed -e \"s/^\\([<=>]\\)/\\1\\1\\1/\" merged >merged-internal &&\n> > -\n> > -             #git hash-object c               >actual &&\n> > -             #git hash-object merged-internal >expect &&\n> > -             #test_cmp expect actual &&\n> > -\n> > -             #test_path_is_missing b\n> > +             test $(cat old-mtime) -lt $(cat new-mtime) &&\n> > +\n> > +             git ls-files -s >index_files &&\n> > +             test_line_count = 2 index_files &&\n> > +\n> > +             git rev-parse >actual :2:c :3:c &&\n> > +             git rev-parse >expect A:c  A:b  &&\n> > +             test_cmp expect actual &&\n> > +\n> > +             git cat-file -p A:b >>merge-me &&\n> > +             git cat-file -p A:c >>merged &&\n> > +             >empty &&\n> > +             test_must_fail git merge-file \\\n> > +                     -L \"HEAD\" \\\n> > +                     -L \"\" \\\n> > +                     -L \"B^0\" \\\n> > +                     merged empty merge-me &&\n> > +             sed -e \"s/^\\([<=>]\\)/\\1\\1\\1/\" merged >merged-internal &&\n>\n> It seems that this line can be dropped, because merged-internal is not\n> inspected afterwards. None of the other tests in the file do similar\n> calls to `sed`.  Such substitutions with sed are present in\n> t6422-merge-rename-corner-cases.sh and t6406-merge-attr.sh though.\n\nAh, good catch.  There's no nested conflict, so this is totally unnecessary.\n\n> > +\n> > +             test_cmp merged c &&\n> > +\n> > +             test_path_is_missing b\n>\n> Function test_setup_2c() creates commits in order: commit O (create b),\n> commit A (modify b, create c), and then commit B (rename b->c).\n> I would have preferred if \"test_path_is_missing b\" check was done\n> several lines higher, just before \"test_line_count = 2 index_files\".\n> It feels more natural with this order of commits in setup to check what\n> happened to file \"b\" first.  It would also mean that all checking of\n> directory contents is done in one place, before merge conflict in file\n> \"c\" is inspected.\n\nI'm fine with switching it.  I need to remove the other superfluous line anyway.\n\n> I see, however, that all tests in this file follow the pattern of\n> checking missing files at the very end, and consistency might be\n> preferable here.\n\nAfter dealing with a number of really complicated conflicts (e.g. see\nthe mod6, rad, or rrdd testcases in t6422) where trying to go\nfile-by-file can just fail due to conflicts and files not being\none-to-one, I kind of got used to thinking in terms of \"what's\ncommitted\", \"what's in the index\", \"what's in the working tree\".  But\nthere's no particular reason we have to stick to that structure in\nthis much simpler testcase.  I'm happy to move it.\n\n> >       )\n> >   '\n> >\n> >\n> > base-commit: 2b4f5a4e4bb102ac8d967cea653ed753b608193c\n>\n> Aside from unnecessary call to sed and nitpicking about order of\n> assertions, the patch looks good to me.\n\nThanks for taking a look!\n"},{"id":"470361","messageId":"pull.1462.v2.git.1673722187025.gitgitgadget@gmail.com","threadId":"59080","inReplyTo":"pull.1462.git.1673584084761.gitgitgadget@gmail.com","subject":"[PATCH v2] t6426: fix TODO about making test more comprehensive","fromName":"Elijah Newren via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2023-01-14T18:49:46Z","receivedAt":"2023-01-14T18:49:54Z","isPatch":true,"sender":{"key":"newren@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5455730?v=4"},"body":"From: Elijah Newren <newren@gmail.com>\n\nt6426.7 (a rename/add testcase) long had a TODO/FIXME comment about\nhow the test could be improved (with some commented out sample code\nthat had a few small errors), but those improvements were blocked on\nother changes still in progress.  The necessary changes were put in\nplace years ago but the comment was forgotten.  Remove and fix the\ncommented out code section and finally remove the big TODO/FIXME\ncomment.\n\nSigned-off-by: Elijah Newren <newren@gmail.com>\n---\n    t6426: fix TODO about making test more comprehensive\n    \n    See\n    https://lore.kernel.org/git/CABPp-BFxK7SGs3wsOfozSw_Uvr-ynr+x8ciPV2Rmfx6Nr4si6g@mail.gmail.com/\n    \n    Changes since v1:\n    \n     * Removed spurious line, rearranged some lines so that checks on file\n       \"b\" come before file \"c\".\n\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-1462%2Fnewren%2Ft6426-fix-todo-v2\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1462/newren/t6426-fix-todo-v2\nPull-Request: https://github.com/gitgitgadget/git/pull/1462\n\nRange-diff vs v1:\n\n 1:  6de47daaeeb ! 1:  68fd28e2547 t6426: fix TODO about making test more comprehensive\n     @@ Commit message\n      \n       ## t/t6426-merge-skip-unneeded-updates.sh ##\n      @@ t/t6426-merge-skip-unneeded-updates.sh: test_expect_success '2c: Modify b & add c VS rename b->c' '\n     + \t\ttest_i18ngrep \"CONFLICT (.*/add):\" out &&\n     + \t\ttest_must_be_empty err &&\n       \n     - \t\t# Make sure c WAS updated\n     +-\t\t# Make sure c WAS updated\n     ++\t\tgit ls-files -s >index_files &&\n     ++\t\ttest_line_count = 2 index_files &&\n     ++\n     ++\t\t# Ensure b was removed\n     ++\t\ttest_path_is_missing b &&\n     ++\n     ++\t\t# Make sure c WAS updated...\n       \t\ttest-tool chmtime --get c >new-mtime &&\n      -\t\ttest $(cat old-mtime) -lt $(cat new-mtime)\n      -\n     @@ t/t6426-merge-skip-unneeded-updates.sh: test_expect_success '2c: Modify b & add\n      -\t\t#test_path_is_missing b\n      +\t\ttest $(cat old-mtime) -lt $(cat new-mtime) &&\n      +\n     -+\t\tgit ls-files -s >index_files &&\n     -+\t\ttest_line_count = 2 index_files &&\n     -+\n     ++\t\t# ...and has correct index entries and working tree contents\n      +\t\tgit rev-parse >actual :2:c :3:c &&\n      +\t\tgit rev-parse >expect A:c  A:b  &&\n      +\t\ttest_cmp expect actual &&\n     @@ t/t6426-merge-skip-unneeded-updates.sh: test_expect_success '2c: Modify b & add\n      +\t\t\t-L \"\" \\\n      +\t\t\t-L \"B^0\" \\\n      +\t\t\tmerged empty merge-me &&\n     -+\t\tsed -e \"s/^\\([<=>]\\)/\\1\\1\\1/\" merged >merged-internal &&\n     -+\n     -+\t\ttest_cmp merged c &&\n     -+\n     -+\t\ttest_path_is_missing b\n     ++\t\ttest_cmp merged c\n       \t)\n       '\n       \n\n\n t/t6426-merge-skip-unneeded-updates.sh | 58 ++++++++++----------------\n 1 file changed, 23 insertions(+), 35 deletions(-)\n\ndiff --git a/t/t6426-merge-skip-unneeded-updates.sh b/t/t6426-merge-skip-unneeded-updates.sh\nindex 2bb8e7f09bb..fd21c1a4863 100755\n--- a/t/t6426-merge-skip-unneeded-updates.sh\n+++ b/t/t6426-merge-skip-unneeded-updates.sh\n@@ -378,42 +378,30 @@ test_expect_success '2c: Modify b & add c VS rename b->c' '\n \t\ttest_i18ngrep \"CONFLICT (.*/add):\" out &&\n \t\ttest_must_be_empty err &&\n \n-\t\t# Make sure c WAS updated\n+\t\tgit ls-files -s >index_files &&\n+\t\ttest_line_count = 2 index_files &&\n+\n+\t\t# Ensure b was removed\n+\t\ttest_path_is_missing b &&\n+\n+\t\t# Make sure c WAS updated...\n \t\ttest-tool chmtime --get c >new-mtime &&\n-\t\ttest $(cat old-mtime) -lt $(cat new-mtime)\n-\n-\t\t# FIXME: rename/add conflicts are horribly broken right now;\n-\t\t# when I get back to my patch series fixing it and\n-\t\t# rename/rename(2to1) conflicts to bring them in line with\n-\t\t# how add/add conflicts behave, then checks like the below\n-\t\t# could be added.  But that patch series is waiting until\n-\t\t# the rename-directory-detection series lands, which this\n-\t\t# is part of.  And in the mean time, I do not want to further\n-\t\t# enforce broken behavior.  So for now, the main test is the\n-\t\t# one above that err is an empty file.\n-\n-\t\t#git ls-files -s >index_files &&\n-\t\t#test_line_count = 2 index_files &&\n-\n-\t\t#git rev-parse >actual :2:c :3:c &&\n-\t\t#git rev-parse >expect A:b  A:c  &&\n-\t\t#test_cmp expect actual &&\n-\n-\t\t#git cat-file -p A:b >>merged &&\n-\t\t#git cat-file -p A:c >>merge-me &&\n-\t\t#>empty &&\n-\t\t#test_must_fail git merge-file \\\n-\t\t#\t-L \"Temporary merge branch 1\" \\\n-\t\t#\t-L \"\" \\\n-\t\t#\t-L \"Temporary merge branch 2\" \\\n-\t\t#\tmerged empty merge-me &&\n-\t\t#sed -e \"s/^\\([<=>]\\)/\\1\\1\\1/\" merged >merged-internal &&\n-\n-\t\t#git hash-object c               >actual &&\n-\t\t#git hash-object merged-internal >expect &&\n-\t\t#test_cmp expect actual &&\n-\n-\t\t#test_path_is_missing b\n+\t\ttest $(cat old-mtime) -lt $(cat new-mtime) &&\n+\n+\t\t# ...and has correct index entries and working tree contents\n+\t\tgit rev-parse >actual :2:c :3:c &&\n+\t\tgit rev-parse >expect A:c  A:b  &&\n+\t\ttest_cmp expect actual &&\n+\n+\t\tgit cat-file -p A:b >>merge-me &&\n+\t\tgit cat-file -p A:c >>merged &&\n+\t\t>empty &&\n+\t\ttest_must_fail git merge-file \\\n+\t\t\t-L \"HEAD\" \\\n+\t\t\t-L \"\" \\\n+\t\t\t-L \"B^0\" \\\n+\t\t\tmerged empty merge-me &&\n+\t\ttest_cmp merged c\n \t)\n '\n \n\nbase-commit: 2b4f5a4e4bb102ac8d967cea653ed753b608193c\n-- \ngitgitgadget\n"}]}