{"thread":{"id":"24671","subject":"[PATCHv3 1/2] t5520-pull: Add testcases showing spurious conflicts from git pull --rebase","startedAt":"2010-08-08T20:55:15Z","lastAt":"2010-08-09T20:35:58Z","messageCount":7,"participants":["Elijah Newren","Junio C Hamano","Ævar Arnfjörð Bjarmason"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"147460","messageId":"1281300917-5610-1-git-send-email-newren@gmail.com","threadId":"24671","inReplyTo":null,"subject":"[PATCHv3 0/2] Fix spurious conflicts with pull --rebase","fromName":"Elijah Newren","fromEmail":"newren@gmail.com","sentAt":"2010-08-08T20:55:15Z","receivedAt":"2010-08-08T20:55:15Z","isPatch":false,"sender":{"key":"newren@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5455730?v=4"},"body":"This patch series fixes spurious conflict issues with git pull\n--rebase for the case where the upstream repository is *not* rebased.\n(There is no change in the case where the upstream repository is\nrebased.)\n\nIn c85c79279d and d44e71261f, the call to git-rebase was modified in\nan effort to reduce the number of commits being reapplied, by trying\nto avoid commits that upstream already had or has.  It was\nspecifically designed with an upstream that is rebased in mind.\nUnfortunately, it had two side effects for the non-rebased upstream\ncase: (1) it prevented detecting if \"local\" patches are already\nupstream, and (2) it could in some cases cause more patches known to\nbe upstream to be reapplied rather than less.  This series fixes both\nof these issues for the non-rebased upstream case.  See the commit\nmessage of the second patch for details.\n\nIt's worth noting that issue (1) above also affects the case where the\nupstream repository has been rebased, which this patch series does not\naddress.  As far as I can tell, fixing it would require changes\n(including new syntax) to format-patch to allow it to be told what\n'upstream' is, and some changes to git-pull.sh/git-rebase.sh to pass\nit this information.\n\nChanges since the last series:\n  * Address issues in t5520-pull.sh raised by Ævar Arnfjörð Bjarmason\n\nElijah Newren (2):\n  t5520-pull: Add testcases showing spurious conflicts from git pull\n    --rebase\n  pull --rebase: Avoid spurious conflicts and reapplying unnecessary\n    patches\n\n git-pull.sh     |   34 +++++++++++++++++++----------\n t/t5520-pull.sh |   63 +++++++++++++++++++++++++++++++++++++++++++++++++++++++\n 2 files changed, 85 insertions(+), 12 deletions(-)\n\n-- \n1.7.2.1\n"},{"id":"147459","messageId":"1281300917-5610-2-git-send-email-newren@gmail.com","threadId":"24671","inReplyTo":"1281300917-5610-1-git-send-email-newren@gmail.com","subject":"[PATCHv3 1/2] t5520-pull: Add testcases showing spurious conflicts from git pull --rebase","fromName":"Elijah Newren","fromEmail":"newren@gmail.com","sentAt":"2010-08-08T20:55:16Z","receivedAt":"2010-08-08T20:55:16Z","isPatch":false,"sender":{"key":"newren@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5455730?v=4"},"body":"\nSigned-off-by: Elijah Newren <newren@gmail.com>\n---\n t/t5520-pull.sh |   63 +++++++++++++++++++++++++++++++++++++++++++++++++++++++\n 1 files changed, 63 insertions(+), 0 deletions(-)\n\ndiff --git a/t/t5520-pull.sh b/t/t5520-pull.sh\nindex 319e389..9099e55 100755\n--- a/t/t5520-pull.sh\n+++ b/t/t5520-pull.sh\n@@ -4,6 +4,11 @@ test_description='pulling into void'\n \n . ./test-lib.sh\n \n+modify () {\n+\tsed -e \"$1\" < \"$2\" > \"$2\".x &&\n+\tmv \"$2\".x \"$2\"\n+}\n+\n D=`pwd`\n \n test_expect_success setup '\n@@ -160,4 +165,62 @@ test_expect_success 'pull --rebase works on branch yet to be born' '\n \ttest_cmp expect actual\n '\n \n+test_expect_success 'setup for detecting upstreamed changes' '\n+\tmkdir src &&\n+\t(cd src &&\n+\t git init &&\n+\t for i in $(seq 1 10); do echo $i; done > stuff &&\n+\t git add stuff &&\n+\t git commit -m \"Initial revision\"\n+\t) &&\n+\tgit clone src dst &&\n+\t(cd src &&\n+\t modify s/5/43/ stuff &&\n+\t git commit -a -m \"5->43\" &&\n+\t modify s/6/42/ stuff &&\n+\t git commit -a -m \"Make it bigger\" &&\n+\t correct=$(git rev-parse HEAD)\n+\t) &&\n+\t(cd dst &&\n+\t modify s/5/43/ stuff &&\n+\t git commit -a -m \"Independent discovery of 5->43\"\n+\t)\n+'\n+\n+test_expect_failure 'git pull --rebase detects upstreamed changes' '\n+\t(cd dst &&\n+\t git pull --rebase &&\n+\t test -z \"$(git ls-files -u)\"\n+\t)\n+'\n+\n+test_expect_success 'setup for avoiding reapplying old patches' '\n+\t(cd dst &&\n+\t git rebase --abort;\n+\t git reset --hard origin/master\n+\t) &&\n+\tgit clone --bare src src-replace.git &&\n+\trm -rf src &&\n+\tmv src-replace.git src &&\n+\t(cd dst &&\n+\t modify s/2/22/ stuff &&\n+\t git commit -a -m \"Change 2\" &&\n+\t modify s/3/33/ stuff &&\n+\t git commit -a -m \"Change 3\" &&\n+\t modify s/4/44/ stuff &&\n+\t git commit -a -m \"Change 4\" &&\n+\t git push &&\n+\n+\t modify s/44/55/ stuff &&\n+\t git commit --amend -a -m \"Modified Change 4\"\n+\t)\n+'\n+\n+test_expect_failure 'git pull --rebase does not reapply old patches' '\n+\t(cd dst &&\n+\t git pull --rebase;\n+\t test 1 = $(find .git/rebase-apply -name \"000*\" | wc -l)\n+\t)\n+'\n+\n test_done\n-- \n1.7.2.1\n"},{"id":"147461","messageId":"1281300917-5610-3-git-send-email-newren@gmail.com","threadId":"24671","inReplyTo":"1281300917-5610-1-git-send-email-newren@gmail.com","subject":"[PATCHv3 2/2] pull --rebase: Avoid spurious conflicts and reapplying unnecessary patches","fromName":"Elijah Newren","fromEmail":"newren@gmail.com","sentAt":"2010-08-08T20:55:17Z","receivedAt":"2010-08-08T20:55:17Z","isPatch":false,"sender":{"key":"newren@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5455730?v=4"},"body":"Prior to c85c79279df2c8a583d95449d1029baba41f8660, pull --rebase would run\n  git rebase $merge_head\nwhich resulted in a call to\n  git format-patch ... --ignore-if-in-upstream $merge_head..$cur_branch\n\nThis resulted in patches from $merge_head..$cur_branch being applied, as\nlong as they did not already exist in $cur_branch..$merge_head.\nUnfortunately, when upstream is rebased, $merge_head..$cur_branch also\nrefers to \"old\" commits that have already been rebased upstream, meaning\nthat many patches that were already fixed upstream would be reapplied.\nThis could result in many spurious conflicts, as well as reintroduce\npatches that were intentionally dropped upstream.\n\nSo the algorithm was changed in c85c79279df2c8a583d95449d1029baba41f8660\nand d44e71261f91d3cc81293e0976bb40daa8abb583.  Defining $old_remote_ref to\nbe the most recent entry in the reflog for @{upstream} that is an ancestor\nof $cur_branch, pull --rebase was changed to run\n  git rebase --onto $merge_head $old_remote_ref\nwhich results in a call to\n  git format-patch ... --ignore-if-in-upstream $old_remote_ref..$cur_branch\n\nThe whole point of this change was to reduce the number of commits being\nreapplied, by avoiding commits that upstream already has or had.\n\nIn the rebased upstream case, this change achieved that purpose.  It is\nworth noting, though, that since $old_remote_ref is always an ancestor of\n$cur_branch (by its definition), format-patch will not know what upstream\nis and thus will not be able to determine if any patches are already\nupstream; they will all be reapplied.\n\nIn the non-rebased upstream case, this new form is usually the same as the\noriginal code but in some cases $old_remote_ref can be an ancestor of\n   $(git merge-base $merge_head $cur_branch)\nmeaning that instead of avoiding reapplying commits that upstream already\nhas, it actually includes more such commits.  Combined with the fact that\nformat-patch can no longer detect commits that are already upstream (since\nit is no longer told what upstream is), results in lots of confusion for\nusers (e.g. \"git is giving me lots of conflicts in stuff I didn't even\nchange since my last push.\")\n\nFix the non-rebased upstream case by ignoring $old_remote_ref whenever it\nis contained in $(git merge-base $merge_head $cur_branch).  This should\nhave no affect on the rebased upstream case.\n\nSigned-off-by: Elijah Newren <newren@gmail.com>\n---\nNote that 24 lines of the patch are simply due to moving 12 lines; I\nconsidered leaving those 12 lines where they were, but it'd split the\ncode that handles the setting of oldremoteref, which I thought should\nbe together.  I couldn't place the new code earlier, because it\ndepends on the definition of $merge_head.  I'd be happy to reshuffle\ndifferently if anyone has any strong preferences.\n\n git-pull.sh     |   34 ++++++++++++++++++++++------------\n t/t5520-pull.sh |    4 ++--\n 2 files changed, 24 insertions(+), 14 deletions(-)\n\ndiff --git a/git-pull.sh b/git-pull.sh\nindex a09a44e..54da07b 100755\n--- a/git-pull.sh\n+++ b/git-pull.sh\n@@ -206,18 +206,6 @@ test true = \"$rebase\" && {\n \t\tgit diff-index --ignore-submodules --cached --quiet HEAD -- ||\n \t\tdie \"refusing to pull with rebase: your working tree is not up-to-date\"\n \tfi\n-\toldremoteref= &&\n-\t. git-parse-remote &&\n-\tremoteref=\"$(get_remote_merge_branch \"$@\" 2>/dev/null)\" &&\n-\toldremoteref=\"$(git rev-parse -q --verify \"$remoteref\")\" &&\n-\tfor reflog in $(git rev-list -g $remoteref 2>/dev/null)\n-\tdo\n-\t\tif test \"$reflog\" = \"$(git merge-base $reflog $curr_branch)\"\n-\t\tthen\n-\t\t\toldremoteref=\"$reflog\"\n-\t\t\tbreak\n-\t\tfi\n-\tdone\n }\n orig_head=$(git rev-parse -q --verify HEAD)\n git fetch $verbosity $progress $dry_run --update-head-ok \"$@\" || exit 1\n@@ -273,6 +261,28 @@ then\n \texit\n fi\n \n+if test true = \"$rebase\"\n+then\n+\toldremoteref= &&\n+\t. git-parse-remote &&\n+\tremoteref=\"$(get_remote_merge_branch \"$@\" 2>/dev/null)\" &&\n+\toldremoteref=\"$(git rev-parse -q --verify \"$remoteref\")\" &&\n+\tfor reflog in $(git rev-list -g $remoteref 2>/dev/null)\n+\tdo\n+\t\tif test \"$reflog\" = \"$(git merge-base $reflog $curr_branch)\"\n+\t\tthen\n+\t\t\toldremoteref=\"$reflog\"\n+\t\t\tbreak\n+\t\tfi\n+\tdone\n+\n+\to=$(git show-branch --merge-base $curr_branch $merge_head $oldremoteref)\n+\tif test \"$oldremoteref\" = \"$o\"\n+\tthen\n+\t\tunset oldremoteref\n+\tfi\n+fi\n+\n merge_name=$(git fmt-merge-msg $log_arg <\"$GIT_DIR/FETCH_HEAD\") || exit\n case \"$rebase\" in\n true)\ndiff --git a/t/t5520-pull.sh b/t/t5520-pull.sh\nindex 9099e55..0e5d097 100755\n--- a/t/t5520-pull.sh\n+++ b/t/t5520-pull.sh\n@@ -187,7 +187,7 @@ test_expect_success 'setup for detecting upstreamed changes' '\n \t)\n '\n \n-test_expect_failure 'git pull --rebase detects upstreamed changes' '\n+test_expect_success 'git pull --rebase detects upstreamed changes' '\n \t(cd dst &&\n \t git pull --rebase &&\n \t test -z \"$(git ls-files -u)\"\n@@ -216,7 +216,7 @@ test_expect_success 'setup for avoiding reapplying old patches' '\n \t)\n '\n \n-test_expect_failure 'git pull --rebase does not reapply old patches' '\n+test_expect_success 'git pull --rebase does not reapply old patches' '\n \t(cd dst &&\n \t git pull --rebase;\n \t test 1 = $(find .git/rebase-apply -name \"000*\" | wc -l)\n-- \n1.7.2.1\n"},{"id":"147472","messageId":"AANLkTikNEF=TaJmgTpuoJ=vKhM+r51m0FzwExcQDL=JG@mail.gmail.com","threadId":"24671","inReplyTo":"1281300917-5610-2-git-send-email-newren@gmail.com","subject":"Re: [PATCHv3 1/2] t5520-pull: Add testcases showing spurious conflicts from git pull --rebase","fromName":"Elijah Newren","fromEmail":"newren@gmail.com","sentAt":"2010-08-09T00:43:37Z","receivedAt":"2010-08-09T00:43:37Z","isPatch":false,"sender":{"key":"newren@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5455730?v=4"},"body":"On Sun, Aug 8, 2010 at 2:55 PM, Elijah Newren <newren@gmail.com> wrote:\n>\n> Signed-off-by: Elijah Newren <newren@gmail.com>\n> ---\n>  t/t5520-pull.sh |   63 +++++++++++++++++++++++++++++++++++++++++++++++++++++++\n>  1 files changed, 63 insertions(+), 0 deletions(-)\n>\n> diff --git a/t/t5520-pull.sh b/t/t5520-pull.sh\n> index 319e389..9099e55 100755\n> --- a/t/t5520-pull.sh\n> +++ b/t/t5520-pull.sh\n> @@ -4,6 +4,11 @@ test_description='pulling into void'\n>\n>  . ./test-lib.sh\n>\n> +modify () {\n> +       sed -e \"$1\" < \"$2\" > \"$2\".x &&\n> +       mv \"$2\".x \"$2\"\n> +}\n> +\n>  D=`pwd`\n>\n>  test_expect_success setup '\n> @@ -160,4 +165,62 @@ test_expect_success 'pull --rebase works on branch yet to be born' '\n>        test_cmp expect actual\n>  '\n>\n> +test_expect_success 'setup for detecting upstreamed changes' '\n> +       mkdir src &&\n> +       (cd src &&\n> +        git init &&\n> +        for i in $(seq 1 10); do echo $i; done > stuff &&\n> +        git add stuff &&\n> +        git commit -m \"Initial revision\"\n> +       ) &&\n> +       git clone src dst &&\n> +       (cd src &&\n> +        modify s/5/43/ stuff &&\n> +        git commit -a -m \"5->43\" &&\n> +        modify s/6/42/ stuff &&\n> +        git commit -a -m \"Make it bigger\" &&\n> +        correct=$(git rev-parse HEAD)\n> +       ) &&\n> +       (cd dst &&\n> +        modify s/5/43/ stuff &&\n> +        git commit -a -m \"Independent discovery of 5->43\"\n> +       )\n> +'\n> +\n> +test_expect_failure 'git pull --rebase detects upstreamed changes' '\n> +       (cd dst &&\n> +        git pull --rebase &&\n> +        test -z \"$(git ls-files -u)\"\n> +       )\n> +'\n> +\n> +test_expect_success 'setup for avoiding reapplying old patches' '\n> +       (cd dst &&\n> +        git rebase --abort;\n> +        git reset --hard origin/master\n> +       ) &&\n> +       git clone --bare src src-replace.git &&\n> +       rm -rf src &&\n> +       mv src-replace.git src &&\n> +       (cd dst &&\n> +        modify s/2/22/ stuff &&\n> +        git commit -a -m \"Change 2\" &&\n> +        modify s/3/33/ stuff &&\n> +        git commit -a -m \"Change 3\" &&\n> +        modify s/4/44/ stuff &&\n> +        git commit -a -m \"Change 4\" &&\n> +        git push &&\n> +\n> +        modify s/44/55/ stuff &&\n> +        git commit --amend -a -m \"Modified Change 4\"\n> +       )\n> +'\n> +\n> +test_expect_failure 'git pull --rebase does not reapply old patches' '\n> +       (cd dst &&\n> +        git pull --rebase;\n> +        test 1 = $(find .git/rebase-apply -name \"000*\" | wc -l)\n> +       )\n> +'\n> +\n>  test_done\n> --\n\nInterdiff addressing Hannes' comments (given on previous series):\n\ndiff -u b/t/t5520-pull.sh b/t/t5520-pull.sh\n--- b/t/t5520-pull.sh\n+++ b/t/t5520-pull.sh\n@@ -169,7 +169,7 @@\n \tmkdir src &&\n \t(cd src &&\n \t git init &&\n-\t for i in $(seq 1 10); do echo $i; done > stuff &&\n+\t printf \"1\\n2\\n3\\n4\\n5\\n6\\n7\\n8\\n9\\n10\\n\" > stuff &&\n \t git add stuff &&\n \t git commit -m \"Initial revision\"\n \t) &&\n@@ -178,8 +178,7 @@\n \t modify s/5/43/ stuff &&\n \t git commit -a -m \"5->43\" &&\n \t modify s/6/42/ stuff &&\n-\t git commit -a -m \"Make it bigger\" &&\n-\t correct=$(git rev-parse HEAD)\n+\t git commit -a -m \"Make it bigger\"\n \t) &&\n \t(cd dst &&\n \t modify s/5/43/ stuff &&\n@@ -196,7 +195,7 @@\n\n test_expect_success 'setup for avoiding reapplying old patches' '\n \t(cd dst &&\n-\t git rebase --abort;\n+\t test_might_fail git rebase --abort &&\n \t git reset --hard origin/master\n \t) &&\n \tgit clone --bare src src-replace.git &&\n@@ -218,7 +217,7 @@\n\n test_expect_failure 'git pull --rebase does not reapply old patches' '\n \t(cd dst &&\n-\t git pull --rebase;\n+\t test_must_fail git pull --rebase &&\n \t test 1 = $(find .git/rebase-apply -name \"000*\" | wc -l)\n \t)\n '\n"},{"id":"147533","messageId":"7vfwyn61td.fsf@alter.siamese.dyndns.org","threadId":"24671","inReplyTo":"1281300917-5610-2-git-send-email-newren@gmail.com","subject":"Re: [PATCHv3 1/2] t5520-pull: Add testcases showing spurious conflicts from git pull --rebase","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2010-08-09T19:09:02Z","receivedAt":"2010-08-09T19:09:02Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Elijah Newren <newren@gmail.com> writes:\n\n> Signed-off-by: Elijah Newren <newren@gmail.com>\n> ---\n>  t/t5520-pull.sh |   63 +++++++++++++++++++++++++++++++++++++++++++++++++++++++\n>  1 files changed, 63 insertions(+), 0 deletions(-)\n>\n> diff --git a/t/t5520-pull.sh b/t/t5520-pull.sh\n> index 319e389..9099e55 100755\n> --- a/t/t5520-pull.sh\n> +++ b/t/t5520-pull.sh\n> @@ -4,6 +4,11 @@ test_description='pulling into void'\n>  \n>  . ./test-lib.sh\n>  \n> +modify () {\n> +\tsed -e \"$1\" < \"$2\" > \"$2\".x &&\n> +\tmv \"$2\".x \"$2\"\n> +}\n\nJust a style thing but I'd prefer to see the above written like this:\n\n        modify () {\n                sed -e \"$1\" <\"$2\" >\"$2.x\" &&\n                mv \"$2.x\" \"$2\"\n        }\n\n> +test_expect_success 'setup for avoiding reapplying old patches' '\n> +\t(cd dst &&\n> +\t git rebase --abort;\n\nThis may be hypothetical but this discards error condition from failing to\nch into dst (for whatever reason).  Don't we expect \"git rebase --abort\"\nto exit with a non-zero status?  Same comment for the last one in the\npatch below.\n\n> +test_expect_failure 'git pull --rebase does not reapply old patches' '\n> +\t(cd dst &&\n> +\t git pull --rebase;\n> +\t test 1 = $(find .git/rebase-apply -name \"000*\" | wc -l)\n> +\t)\n> +'\n> +\n>  test_done\n\nThanks.\n"},{"id":"147534","messageId":"AANLkTin0xvK8H8RvaXtmaNHJh1dStn0AN1Mqed7JGvuO@mail.gmail.com","threadId":"24671","inReplyTo":"7vfwyn61td.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCHv3 1/2] t5520-pull: Add testcases showing spurious conflicts from git pull --rebase","fromName":"Elijah Newren","fromEmail":"newren@gmail.com","sentAt":"2010-08-09T19:22:40Z","receivedAt":"2010-08-09T19:22:40Z","isPatch":false,"sender":{"key":"newren@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5455730?v=4"},"body":"On Mon, Aug 9, 2010 at 1:09 PM, Junio C Hamano <gitster@pobox.com> wrote:\n> Elijah Newren <newren@gmail.com> writes:\n<snip>\n>> +modify () {\n>> +     sed -e \"$1\" < \"$2\" > \"$2\".x &&\n>> +     mv \"$2\".x \"$2\"\n>> +}\n>\n> Just a style thing but I'd prefer to see the above written like this:\n>\n>        modify () {\n>                sed -e \"$1\" <\"$2\" >\"$2.x\" &&\n>                mv \"$2.x\" \"$2\"\n>        }\n\nI copied this function verbatim from t/t4127-apply-same-fn.sh.  Would\nyou like me to fix that one too?\n\n>> +test_expect_success 'setup for avoiding reapplying old patches' '\n>> +     (cd dst &&\n>> +      git rebase --abort;\n>\n> This may be hypothetical but this discards error condition from failing to\n> ch into dst (for whatever reason).  Don't we expect \"git rebase --abort\"\n> to exit with a non-zero status?  Same comment for the last one in the\n> patch below.\n\nYes, Hannes pointed out the same issue.  Does the follow-up interdiff\nI posted in response to my patch address this in a way you'd like?\n"},{"id":"147550","messageId":"AANLkTinDK4GZ2GamqZHvx6+Cu5eVD1EncizKVxMONuek@mail.gmail.com","threadId":"24671","inReplyTo":"AANLkTin0xvK8H8RvaXtmaNHJh1dStn0AN1Mqed7JGvuO@mail.gmail.com","subject":"Re: [PATCHv3 1/2] t5520-pull: Add testcases showing spurious conflicts from git pull --rebase","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2010-08-09T20:35:58Z","receivedAt":"2010-08-09T20:35:58Z","isPatch":false,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"On Mon, Aug 9, 2010 at 19:22, Elijah Newren <newren@gmail.com> wrote:\n> On Mon, Aug 9, 2010 at 1:09 PM, Junio C Hamano <gitster@pobox.com> wrote:\n>> Elijah Newren <newren@gmail.com> writes:\n> <snip>\n>>> +modify () {\n>>> +     sed -e \"$1\" < \"$2\" > \"$2\".x &&\n>>> +     mv \"$2\".x \"$2\"\n>>> +}\n>>\n>> Just a style thing but I'd prefer to see the above written like this:\n>>\n>>        modify () {\n>>                sed -e \"$1\" <\"$2\" >\"$2.x\" &&\n>>                mv \"$2.x\" \"$2\"\n>>        }\n>\n> I copied this function verbatim from t/t4127-apply-same-fn.sh.  Would\n> you like me to fix that one too?\n\nRather than copy-paste this around we should just turn it into a\nutility function.\n\nIt'd be very useful (if you're up to it) to just use sed in this\npatch, then submit another patch to include the modify() function in\nthe test-lib.sh (and document it in t/README).\n\nThese could also use a modify():\n\n    cd t && grep -A1 sed  *sh | grep -B1 mv | less\n"}]}