{"thread":{"id":"48813","subject":"[PATCH 00/25] fix buggy tests, modernize tests, fix broken &&-chains","startedAt":"2018-07-02T00:24:52Z","lastAt":"2018-07-17T17:53:33Z","messageCount":52,"participants":["Eric Sunshine","Stefan Beller","Junio C Hamano","SZEDER Gábor","Jeff King","Johannes Schindelin"],"isPatch":true,"patchVersion":1,"patchTotal":25},"messages":[{"id":"351482","messageId":"20180702002405.3042-1-sunshine@sunshineco.com","threadId":"48813","inReplyTo":null,"subject":"[PATCH 00/25] fix buggy tests, modernize tests, fix broken &&-chains","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2018-07-02T00:23:40Z","receivedAt":"2018-07-02T00:24:52Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"This series fixes several buggy tests which went undetected due to\nbroken &&-chains in subshells, modernizes some tests to take advantage\nof test functions (test_might_fail(), test_write_lines(), etc.), and\nfixes a lot of broken &&-chains in subshells. It applies atop\n'master'. Happily, there are no broken &&-chains in subshells in any\nin-flight topic.\n\nIt is split out from an earlier series[1] which additionally extended\n--chain-lint to work within subshells. I decided to make this an\nindependent series because these (hopefully) non-controversial changes\nall stand on their own merit, and because I don't want to flood the list\nrepeatedly with this lengthy series as I re-roll the \"extend\n--chain-lint to work in subshells\" functionality from [1].\n\nTo ease review burden, I largely avoided noisy modernizations and\ncleanups, and limited changes to merely adding \"&&\" even when some other\ntransformation would have made the fix nicer overall. (For example, I\nresisted the urge to replace a series of 'echo' statements with a simple\nhere-doc.)\n\nChanges since [1]:\n\n* Found and fixed more &&-chain breakage, and converted a couple more\n  'unset' instances (which were hidden behind a MINGW prerequisite) to\n  sane_unset().\n\n* Rewrote commit messages to sell changes on their own merit rather than\n  leaning on --chain-lint as a crutch. (junio, jrnieder)\n\n* Changed a modernization/cleanup to use \"! non-git-command\" rather than\n  test_must_fail(), moving it to its own patch in the process. (j6t)\n\n* Changed \"printf '%s\\n'\" idiom to test_write_lines(). (junio)\n\n* Incorporated Stefan's fix[2] for a broken 't/lib-submodule-update'\n  test since my interpretation of the problem was incorrect.\n\n* Converted a subshell 'echo' sequence to write_script().\n\n* Dropped patches which existed primarily to pacify --chain-lint; they\n  are no longer needed since I re-wrote the \"linter\" to detect &&-chain\n  breakage itself (by pure textual inspection) rather than by\n  incorporating subshell bodies into the main &&-chain:\n\n  t0001: use \"{...}\" block around \"||\" expression rather than subshell\n  t3303: use standard here-doc tag \"EOF\" to avoid fooling --chain-lint\n  t9104: use \"{...}\" block around \"||\" expression rather than subshell\n  t9401: drop unnecessary nested subshell\n\n* Dropped a patch which pretty much duplicated Junio's 037714252f\n  (tests: clean after SANITY tests, 2018-06-15), which graduated to\n  'master':\n\n  t7508: use test_when_finished() instead of managing exit code manually\n\nAn interdiff against [1] is below, although I stripped out all the noisy\n\"printf '%s\\n'\" to test_write_lines() differences, of which there were a\nlot, since they drowned out the other more significant changes.\n\nThanks to Elijah, Hannes, Jonathan Nieder, Jonathan Tan, Junio, Luke,\nPeff, and Stefan for comments on [1].\n\n[1]: https://public-inbox.org/git/20180626073001.6555-1-sunshine@sunshineco.com/\n[2]: https://public-inbox.org/git/20180627183057.254467-1-sbeller@google.com/\n\nEric Sunshine (25):\n  t: use test_might_fail() instead of manipulating exit code manually\n  t: use test_write_lines() instead of series of 'echo' commands\n  t: use sane_unset() rather than 'unset' with broken &&-chain\n  t: drop unnecessary terminating semicolon in subshell\n  t/lib-submodule-update: fix \"absorbing\" test\n  t5405: use test_must_fail() instead of checking exit code manually\n  t5406: use write_script() instead of birthing shell script manually\n  t5505: modernize and simplify hard-to-digest test\n  t6036: fix broken \"merge fails but has appropriate contents\" tests\n  t7201: drop pointless \"exit 0\" at end of subshell\n  t7400: fix broken \"submodule add/reconfigure --force\" test\n  t7810: use test_expect_code() instead of hand-rolled comparison\n  t9001: fix broken \"invoke hook\" test\n  t9814: simplify convoluted check that command correctly errors out\n  t0000-t0999: fix broken &&-chains\n  t1000-t1999: fix broken &&-chains\n  t2000-t2999: fix broken &&-chains\n  t3000-t3999: fix broken &&-chains\n  t3030: fix broken &&-chains\n  t4000-t4999: fix broken &&-chains\n  t5000-t5999: fix broken &&-chains\n  t6000-t6999: fix broken &&-chains\n  t7000-t7999: fix broken &&-chains\n  t9000-t9999: fix broken &&-chains\n  t9119: fix broken &&-chains\n\n t/lib-submodule-update.sh                     |   5 +-\n t/t0000-basic.sh                              |   2 +-\n t/t0001-init.sh                               |   4 +-\n t/t0003-attributes.sh                         |  24 +-\n t/t0021-conversion.sh                         |   4 +-\n t/t0090-cache-tree.sh                         |   2 +-\n t/t1004-read-tree-m-u-wf.sh                   |   8 +-\n t/t1005-read-tree-reset.sh                    |  10 +-\n t/t1008-read-tree-overlay.sh                  |   2 +-\n t/t1020-subdirectory.sh                       |   2 +-\n t/t1050-large.sh                              |   6 +-\n t/t1300-config.sh                             |   2 +-\n t/t1411-reflog-show.sh                        |   6 +-\n t/t1507-rev-parse-upstream.sh                 |   6 +-\n t/t1512-rev-parse-disambiguation.sh           |   6 +-\n t/t1700-split-index.sh                        |   2 +-\n t/t2016-checkout-patch.sh                     |  24 +-\n t/t2103-update-index-ignore-missing.sh        |   2 +-\n t/t2202-add-addremove.sh                      |  14 +-\n t/t3000-ls-files-others.sh                    |   2 +-\n t/t3006-ls-files-long.sh                      |   2 +-\n t/t3008-ls-files-lazy-init-name-hash.sh       |   8 +-\n t/t3030-merge-recursive.sh                    | 340 +++++++++---------\n t/t3050-subprojects-fetch.sh                  |   8 +-\n t/t3102-ls-tree-wildcards.sh                  |   2 +-\n t/t3210-pack-refs.sh                          |   4 +-\n t/t3301-notes.sh                              |   8 +-\n t/t3400-rebase.sh                             |   8 +-\n t/t3402-rebase-merge.sh                       |   4 +-\n t/t3404-rebase-interactive.sh                 |   6 +-\n t/t3418-rebase-continue.sh                    |   4 +-\n t/t3700-add.sh                                |   8 +-\n t/t3701-add-interactive.sh                    |  16 +-\n t/t3904-stash-patch.sh                        |   8 +-\n t/t4001-diff-rename.sh                        |   2 +-\n t/t4010-diff-pathspec.sh                      |   4 +-\n t/t4012-diff-binary.sh                        |   6 +-\n t/t4024-diff-optimize-common.sh               |  16 +-\n t/t4025-hunk-header.sh                        |   8 +-\n t/t4041-diff-submodule-option.sh              |   4 +-\n t/t4060-diff-submodule-option-diff-format.sh  |   2 +-\n t/t4121-apply-diffs.sh                        |   2 +-\n t/t5300-pack-object.sh                        |   2 +-\n t/t5302-pack-index.sh                         |   2 +-\n t/t5400-send-pack.sh                          |   4 +-\n t/t5401-update-hooks.sh                       |   4 +-\n t/t5405-send-pack-rewind.sh                   |   3 +-\n t/t5406-remote-rejects.sh                     |   5 +-\n t/t5500-fetch-pack.sh                         |   2 +-\n t/t5505-remote.sh                             |  10 +-\n t/t5512-ls-remote.sh                          |   4 +-\n t/t5516-fetch-push.sh                         |  10 +-\n t/t5517-push-mirror.sh                        |  10 +-\n t/t5526-fetch-submodules.sh                   |   2 +-\n t/t5531-deep-submodule-push.sh                |   2 +-\n t/t5543-atomic-push.sh                        |   2 +-\n t/t5601-clone.sh                              |   2 +-\n t/t5605-clone-local.sh                        |   2 +-\n t/t5801-remote-helpers.sh                     |   2 +-\n t/t6010-merge-base.sh                         |   2 +-\n t/t6029-merge-subtree.sh                      |  16 +-\n t/t6036-recursive-corner-cases.sh             |  14 +-\n t/t6042-merge-rename-corner-cases.sh          |   8 +-\n t/t6043-merge-rename-directories.sh           |   2 +-\n t/t7001-mv.sh                                 |   2 +-\n t/t7105-reset-patch.sh                        |  12 +-\n t/t7201-co.sh                                 |  41 ++-\n t/t7301-clean-interactive.sh                  |  41 ++-\n t/t7400-submodule-basic.sh                    |  12 +-\n t/t7406-submodule-update.sh                   |   6 +-\n t/t7408-submodule-reference.sh                |   2 +-\n t/t7501-commit.sh                             |  56 +--\n t/t7506-status-submodule.sh                   |  10 +-\n t/t7610-mergetool.sh                          |   8 +-\n t/t7810-grep.sh                               |   7 +-\n t/t9001-send-email.sh                         |  10 +-\n t/t9100-git-svn-basic.sh                      |   2 +-\n t/t9101-git-svn-props.sh                      |   2 +-\n t/t9119-git-svn-info.sh                       | 120 +++----\n t/t9122-git-svn-author.sh                     |   6 +-\n t/t9129-git-svn-i18n-commitencoding.sh        |   2 +-\n t/t9130-git-svn-authors-file.sh               |   4 +-\n t/t9134-git-svn-ignore-paths.sh               |   6 +-\n t/t9137-git-svn-dcommit-clobber-series.sh     |   2 +-\n t/t9138-git-svn-authors-prog.sh               |   6 +-\n t/t9146-git-svn-empty-dirs.sh                 |  20 +-\n t/t9147-git-svn-include-paths.sh              |   6 +-\n t/t9152-svn-empty-dirs-after-gc.sh            |   2 +-\n t/t9164-git-svn-dcommit-concurrent.sh         |   2 +-\n ...65-git-svn-fetch-merge-branch-of-branch.sh |   2 +-\n t/t9200-git-cvsexportcommit.sh                |   6 +-\n t/t9302-fast-import-unpack-limit.sh           |   2 +-\n t/t9400-git-cvsserver-server.sh               |   8 +-\n t/t9600-cvsimport.sh                          |   2 +-\n t/t9806-git-p4-options.sh                     |   2 +-\n t/t9810-git-p4-rcs.sh                         |   2 +-\n t/t9811-git-p4-label-import.sh                |   2 +-\n t/t9814-git-p4-rename.sh                      |  18 +-\n t/t9815-git-p4-submit-fail.sh                 |   2 +-\n t/t9830-git-p4-symlink-dir.sh                 |   2 +-\n t/t9831-git-p4-triggers.sh                    |   2 +-\n t/t9902-completion.sh                         |   4 +-\n t/t9903-bash-prompt.sh                        |   2 +-\n 103 files changed, 567 insertions(+), 589 deletions(-)\n\n-- \n2.18.0.203.gfac676dfb9\n\n\nInterdiff since [1]:\n\ndiff --git a/t/lib-submodule-update.sh b/t/lib-submodule-update.sh\nindex 8a2edee1cb..e90ec79087 100755\n--- a/t/lib-submodule-update.sh\n+++ b/t/lib-submodule-update.sh\n@@ -959,7 +959,7 @@ test_submodule_forced_switch_recursing_with_args () {\n \t\t)\n \t'\n \t# ... absorbing a .git directory.\n-\ttest_expect_failure \"$command: replace submodule containing a .git directory with a directory must fail\" '\n+\ttest_expect_success \"$command: replace submodule containing a .git directory with a directory must fail\" '\n \t\tprolog &&\n \t\treset_work_tree_to_interested add_sub1 &&\n \t\t(\n@@ -967,9 +967,8 @@ test_submodule_forced_switch_recursing_with_args () {\n \t\t\tgit branch -t replace_sub1_with_directory origin/replace_sub1_with_directory &&\n \t\t\treplace_gitfile_with_git_dir sub1 &&\n \t\t\trm -rf .git/modules/sub1 &&\n-\t\t\ttest_must_fail $command replace_sub1_with_directory &&\n+\t\t\t$command replace_sub1_with_directory &&\n \t\t\ttest_superproject_content origin/replace_sub1_with_directory &&\n-\t\t\ttest_submodule_content sub1 origin/modify_sub1 &&\n \t\t\ttest_git_directory_exists sub1\n \t\t)\n \t'\ndiff --git a/t/t0001-init.sh b/t/t0001-init.sh\nindex 4c865051e7..ca85aae51e 100755\n--- a/t/t0001-init.sh\n+++ b/t/t0001-init.sh\n@@ -408,7 +408,7 @@ is_hidden () {\n test_expect_success MINGW '.git hidden' '\n \trm -rf newdir &&\n \t(\n-\t\tunset GIT_DIR GIT_WORK_TREE\n+\t\tsane_unset GIT_DIR GIT_WORK_TREE &&\n \t\tmkdir newdir &&\n \t\tcd newdir &&\n \t\tgit init &&\n@@ -420,7 +420,7 @@ test_expect_success MINGW '.git hidden' '\n test_expect_success MINGW 'bare git dir not hidden' '\n \trm -rf newdir &&\n \t(\n-\t\tunset GIT_DIR GIT_WORK_TREE GIT_CONFIG\n+\t\tsane_unset GIT_DIR GIT_WORK_TREE GIT_CONFIG &&\n \t\tmkdir newdir &&\n \t\tcd newdir &&\n \t\tgit --bare init\ndiff --git a/t/t1008-read-tree-overlay.sh b/t/t1008-read-tree-overlay.sh\nindex e74b185b6c..cf96016844 100755\n--- a/t/t1008-read-tree-overlay.sh\n+++ b/t/t1008-read-tree-overlay.sh\n@@ -23,7 +23,7 @@ test_expect_success setup '\n \n test_expect_success 'multi-read' '\n \tread_tree_must_succeed initial master side &&\n-\t(echo a && echo b/c) >expect &&\n+\ttest_write_lines a b/c >expect &&\n \tgit ls-files >actual &&\n \ttest_cmp expect actual\n '\ndiff --git a/t/t3210-pack-refs.sh b/t/t3210-pack-refs.sh\nindex afa27ffe2d..724b4b9bc0 100755\n--- a/t/t3210-pack-refs.sh\n+++ b/t/t3210-pack-refs.sh\n@@ -231,9 +231,9 @@ test_expect_success 'timeout if packed-refs.lock exists' '\n test_expect_success 'retry acquiring packed-refs.lock' '\n \tLOCK=.git/packed-refs.lock &&\n \t>\"$LOCK\" &&\n-\ttest_when_finished \"wait; rm -f $LOCK\" &&\n+\ttest_when_finished \"wait && rm -f $LOCK\" &&\n \t{\n-\t\t( sleep 1 ; rm -f $LOCK ) &\n+\t\t( sleep 1 && rm -f $LOCK ) &\n \t} &&\n \tgit -c core.packedrefstimeout=3000 pack-refs --all --prune\n '\ndiff --git a/t/t4024-diff-optimize-common.sh b/t/t4024-diff-optimize-common.sh\nindex 7e76018296..6b44ce1493 100755\n--- a/t/t4024-diff-optimize-common.sh\n+++ b/t/t4024-diff-optimize-common.sh\n@@ -127,17 +127,17 @@ test_expect_success setup '\n \n \tfor n in $sample\n \tdo\n-\t\t( zs $n ; echo a ) >file-a$n &&\n-\t\t( echo b; zs $n; echo ) >file-b$n &&\n-\t\t( printf c; zs $n ) >file-c$n &&\n-\t\t( echo d; zs $n ) >file-d$n &&\n+\t\t( zs $n && echo a ) >file-a$n &&\n+\t\t( echo b && zs $n && echo ) >file-b$n &&\n+\t\t( printf c && zs $n ) >file-c$n &&\n+\t\t( echo d && zs $n ) >file-d$n &&\n \n \t\tgit add file-a$n file-b$n file-c$n file-d$n &&\n \n-\t\t( zs $n ; echo A ) >file-a$n &&\n-\t\t( echo B; zs $n; echo ) >file-b$n &&\n-\t\t( printf C; zs $n ) >file-c$n &&\n-\t\t( echo D; zs $n ) >file-d$n &&\n+\t\t( zs $n && echo A ) >file-a$n &&\n+\t\t( echo B && zs $n && echo ) >file-b$n &&\n+\t\t( printf C && zs $n ) >file-c$n &&\n+\t\t( echo D && zs $n ) >file-d$n &&\n \n \t\texpect_pattern $n || return 1\n \ndiff --git a/t/t5406-remote-rejects.sh b/t/t5406-remote-rejects.sh\nindex 350d2e6ea5..ff06f99649 100755\n--- a/t/t5406-remote-rejects.sh\n+++ b/t/t5406-remote-rejects.sh\n@@ -6,8 +6,9 @@ test_description='remote push rejects are reported by client'\n \n test_expect_success 'setup' '\n \tmkdir .git/hooks &&\n-\t(echo \"#!/bin/sh\" && echo \"exit 1\") >.git/hooks/update &&\n-\tchmod +x .git/hooks/update &&\n+\twrite_script .git/hooks/update <<-\\EOF &&\n+\texit 1\n+\tEOF\n \techo 1 >file &&\n \tgit add file &&\n \tgit commit -m 1 &&\ndiff --git a/t/t7406-submodule-update.sh b/t/t7406-submodule-update.sh\nindex b141145fc2..f604ef7a72 100755\n--- a/t/t7406-submodule-update.sh\n+++ b/t/t7406-submodule-update.sh\n@@ -886,7 +886,7 @@ test_expect_success 'submodule update properly revives a moved submodule' '\n \t git commit -am \"pre move\" &&\n \t H2=$(git rev-parse --short HEAD) &&\n \t git status | sed \"s/$H/XXX/\" >expect &&\n-\t H=$(cd submodule2; git rev-parse HEAD) &&\n+\t H=$(cd submodule2 && git rev-parse HEAD) &&\n \t git rm --cached submodule2 &&\n \t rm -rf submodule2 &&\n \t mkdir -p \"moved/sub module\" &&\ndiff --git a/t/t9146-git-svn-empty-dirs.sh b/t/t9146-git-svn-empty-dirs.sh\nindex 954948812c..5f91c0d68b 100755\n--- a/t/t9146-git-svn-empty-dirs.sh\n+++ b/t/t9146-git-svn-empty-dirs.sh\n@@ -21,7 +21,7 @@ test_expect_success 'empty directories exist' '\n \t\tdo\n \t\t\tif ! test -d \"$i\"\n \t\t\tthen\n-\t\t\t\techo >&2 \"$i does not exist\"\n+\t\t\t\techo >&2 \"$i does not exist\" &&\n \t\t\t\texit 1\n \t\t\tfi\n \t\tdone\n@@ -38,7 +38,7 @@ test_expect_success 'option automkdirs set to false' '\n \t\tdo\n \t\t\tif test -d \"$i\"\n \t\t\tthen\n-\t\t\t\techo >&2 \"$i exists\"\n+\t\t\t\techo >&2 \"$i exists\" &&\n \t\t\t\texit 1\n \t\t\tfi\n \t\tdone\n@@ -63,7 +63,7 @@ test_expect_success 'git svn mkdirs recreates empty directories' '\n \t\tdo\n \t\t\tif ! test -d \"$i\"\n \t\t\tthen\n-\t\t\t\techo >&2 \"$i does not exist\"\n+\t\t\t\techo >&2 \"$i does not exist\" &&\n \t\t\t\texit 1\n \t\t\tfi\n \t\tdone\n@@ -148,7 +148,7 @@ test_expect_success 'git svn gc-ed files work' '\n \t\t\tdo\n \t\t\t\tif ! test -d \"$i\"\n \t\t\t\tthen\n-\t\t\t\t\techo >&2 \"$i does not exist\"\n+\t\t\t\t\techo >&2 \"$i does not exist\" &&\n \t\t\t\t\texit 1\n \t\t\t\tfi\n \t\t\tdone\ndiff --git a/t/t9152-svn-empty-dirs-after-gc.sh b/t/t9152-svn-empty-dirs-after-gc.sh\nindex 301e779709..89f285d082 100755\n--- a/t/t9152-svn-empty-dirs-after-gc.sh\n+++ b/t/t9152-svn-empty-dirs-after-gc.sh\n@@ -30,7 +30,7 @@ test_expect_success 'git svn mkdirs recreates empty directories after git svn gc\n \t\tdo\n \t\t\tif ! test -d \"$i\"\n \t\t\tthen\n-\t\t\t\techo >&2 \"$i does not exist\"\n+\t\t\t\techo >&2 \"$i does not exist\" &&\n \t\t\t\texit 1\n \t\t\tfi\n \t\tdone\ndiff --git a/t/t9302-fast-import-unpack-limit.sh b/t/t9302-fast-import-unpack-limit.sh\nindex a04de14677..bb1c39cfcc 100755\n--- a/t/t9302-fast-import-unpack-limit.sh\n+++ b/t/t9302-fast-import-unpack-limit.sh\n@@ -80,7 +80,7 @@ test_expect_success 'lookups after checkpoint works' '\n \t\tdo\n \t\t\tif test $n -gt 30\n \t\t\tthen\n-\t\t\t\techo >&2 \"checkpoint did not update branch\"\n+\t\t\t\techo >&2 \"checkpoint did not update branch\" &&\n \t\t\t\texit 1\n \t\t\telse\n \t\t\t\tn=$(($n + 1))\ndiff --git a/t/t9400-git-cvsserver-server.sh b/t/t9400-git-cvsserver-server.sh\nindex 4207e9caa5..a5e5dca753 100755\n--- a/t/t9400-git-cvsserver-server.sh\n+++ b/t/t9400-git-cvsserver-server.sh\n@@ -328,7 +328,7 @@ test_expect_success 'cvs update (subdirectories)' \\\n   '(for dir in A A/B A/B/C A/D E; do\n       mkdir $dir &&\n       echo \"test file in $dir\" >\"$dir/file_in_$(echo $dir|sed -e \"s#/# #g\")\"  &&\n-      git add $dir;\n+      git add $dir\n    done) &&\n    git commit -q -m \"deep sub directory structure\" &&\n    git push gitcvs.git >/dev/null &&\ndiff --git a/t/t9814-git-p4-rename.sh b/t/t9814-git-p4-rename.sh\nindex 80aac5ab16..60baa06e27 100755\n--- a/t/t9814-git-p4-rename.sh\n+++ b/t/t9814-git-p4-rename.sh\n@@ -9,11 +9,11 @@ test_expect_success 'start p4d' '\n '\n \n # We rely on this behavior to detect for p4 move availability.\n-test_expect_success 'p4 help unknown returns 1' '\n+test_expect_success '\"p4 help unknown\" errors out' '\n \t(\n \t\tcd \"$cli\" &&\n \t\tp4 help client &&\n-\t\ttest_must_fail p4 help nosuchcommand\n+\t\t! p4 help nosuchcommand\n \t)\n '\n"},{"id":"351483","messageId":"20180702002405.3042-2-sunshine@sunshineco.com","threadId":"48813","inReplyTo":"20180702002405.3042-1-sunshine@sunshineco.com","subject":"[PATCH 01/25] t: use test_might_fail() instead of manipulating exit code manually","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2018-07-02T00:23:41Z","receivedAt":"2018-07-02T00:24:56Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"These tests manually coerce the exit code of invoked commands to\n\"success\" when they don't care if the command succeeds or fails since\nfailure of those commands should not cause the test to fail overall.\nIn doing so, they intentionally break the &&-chain. Modernize by\nreplacing manual exit code management with test_might_fail() and a\nnormal &&-chain.\n\nSigned-off-by: Eric Sunshine <sunshine@sunshineco.com>\n---\n t/t1507-rev-parse-upstream.sh | 6 +++---\n t/t1700-split-index.sh        | 2 +-\n t/t4012-diff-binary.sh        | 6 ++----\n t/t5400-send-pack.sh          | 4 ++--\n 4 files changed, 8 insertions(+), 10 deletions(-)\n\ndiff --git a/t/t1507-rev-parse-upstream.sh b/t/t1507-rev-parse-upstream.sh\nindex 93c77eac45..349f6e10af 100755\n--- a/t/t1507-rev-parse-upstream.sh\n+++ b/t/t1507-rev-parse-upstream.sh\n@@ -123,9 +123,9 @@ test_expect_success 'checkout -b new my-side@{u} forks from the same' '\n \n test_expect_success 'merge my-side@{u} records the correct name' '\n (\n-\tcd clone || exit\n-\tgit checkout master || exit\n-\tgit branch -D new ;# can fail but is ok\n+\tcd clone &&\n+\tgit checkout master &&\n+\ttest_might_fail git branch -D new &&\n \tgit branch -t new my-side@{u} &&\n \tgit merge -s ours new@{u} &&\n \tgit show -s --pretty=tformat:%s >actual &&\ndiff --git a/t/t1700-split-index.sh b/t/t1700-split-index.sh\nindex 1e81b33b2e..39133bcbc8 100755\n--- a/t/t1700-split-index.sh\n+++ b/t/t1700-split-index.sh\n@@ -435,7 +435,7 @@ test_expect_success 'writing split index with null sha1 does not write cache tre\n \tcommit=$(git commit-tree $tree -p HEAD <msg) &&\n \tgit update-ref HEAD \"$commit\" &&\n \tGIT_ALLOW_NULL_SHA1=1 git reset --hard &&\n-\t(test-tool dump-cache-tree >cache-tree.out || true) &&\n+\ttest_might_fail test-tool dump-cache-tree >cache-tree.out &&\n \ttest_line_count = 0 cache-tree.out\n '\n \ndiff --git a/t/t4012-diff-binary.sh b/t/t4012-diff-binary.sh\nindex 0a8af76aab..6579c81216 100755\n--- a/t/t4012-diff-binary.sh\n+++ b/t/t4012-diff-binary.sh\n@@ -102,10 +102,8 @@ test_expect_success 'apply binary patch' '\n \n test_expect_success 'diff --no-index with binary creation' '\n \techo Q | q_to_nul >binary &&\n-\t(: hide error code from diff, which just indicates differences\n-\t git diff --binary --no-index /dev/null binary >current ||\n-\t true\n-\t) &&\n+\t# hide error code from diff, which just indicates differences\n+\ttest_might_fail git diff --binary --no-index /dev/null binary >current &&\n \trm binary &&\n \tgit apply --binary <current &&\n \techo Q >expected &&\ndiff --git a/t/t5400-send-pack.sh b/t/t5400-send-pack.sh\nindex 911eae1bf7..f1932ea431 100755\n--- a/t/t5400-send-pack.sh\n+++ b/t/t5400-send-pack.sh\n@@ -86,7 +86,7 @@ test_expect_success 'push can be used to delete a ref' '\n test_expect_success 'refuse deleting push with denyDeletes' '\n \t(\n \t    cd victim &&\n-\t    ( git branch -D extra || : ) &&\n+\t    test_might_fail git branch -D extra &&\n \t    git config receive.denyDeletes true &&\n \t    git branch extra master\n \t) &&\n@@ -119,7 +119,7 @@ test_expect_success 'override denyDeletes with git -c receive-pack' '\n test_expect_success 'denyNonFastforwards trumps --force' '\n \t(\n \t    cd victim &&\n-\t    ( git branch -D extra || : ) &&\n+\t    test_might_fail git branch -D extra &&\n \t    git config receive.denyNonFastforwards true\n \t) &&\n \tvictim_orig=$(cd victim && git rev-parse --verify master) &&\n-- \n2.18.0.203.gfac676dfb9\n\n"},{"id":"351484","messageId":"20180702002405.3042-5-sunshine@sunshineco.com","threadId":"48813","inReplyTo":"20180702002405.3042-1-sunshine@sunshineco.com","subject":"[PATCH 04/25] t: drop unnecessary terminating semicolon in subshell","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2018-07-02T00:23:44Z","receivedAt":"2018-07-02T00:24:59Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>\n---\n t/t3102-ls-tree-wildcards.sh    | 2 +-\n t/t4010-diff-pathspec.sh        | 4 ++--\n t/t9400-git-cvsserver-server.sh | 2 +-\n 3 files changed, 4 insertions(+), 4 deletions(-)\n\ndiff --git a/t/t3102-ls-tree-wildcards.sh b/t/t3102-ls-tree-wildcards.sh\nindex e804377f1c..1e16c6b8ea 100755\n--- a/t/t3102-ls-tree-wildcards.sh\n+++ b/t/t3102-ls-tree-wildcards.sh\n@@ -23,7 +23,7 @@ test_expect_success 'ls-tree outside prefix' '\n \tcat >expect <<-EOF &&\n \t100644 blob $EMPTY_BLOB\t../a[a]/three\n \tEOF\n-\t( cd aa && git ls-tree -r HEAD \"../a[a]\"; ) >actual &&\n+\t( cd aa && git ls-tree -r HEAD \"../a[a]\" ) >actual &&\n \ttest_cmp expect actual\n '\n \ndiff --git a/t/t4010-diff-pathspec.sh b/t/t4010-diff-pathspec.sh\nindex 35b35a81c8..b7f25071cf 100755\n--- a/t/t4010-diff-pathspec.sh\n+++ b/t/t4010-diff-pathspec.sh\n@@ -111,10 +111,10 @@ test_expect_success 'diff-tree -r with wildcard' '\n test_expect_success 'setup submodules' '\n \ttest_tick &&\n \tgit init submod &&\n-\t( cd submod && test_commit first; ) &&\n+\t( cd submod && test_commit first ) &&\n \tgit add submod &&\n \tgit commit -m first &&\n-\t( cd submod && test_commit second; ) &&\n+\t( cd submod && test_commit second ) &&\n \tgit add submod &&\n \tgit commit -m second\n '\ndiff --git a/t/t9400-git-cvsserver-server.sh b/t/t9400-git-cvsserver-server.sh\nindex 06742748e9..6b09da79bf 100755\n--- a/t/t9400-git-cvsserver-server.sh\n+++ b/t/t9400-git-cvsserver-server.sh\n@@ -328,7 +328,7 @@ test_expect_success 'cvs update (subdirectories)' \\\n   '(for dir in A A/B A/B/C A/D E; do\n       mkdir $dir &&\n       echo \"test file in $dir\" >\"$dir/file_in_$(echo $dir|sed -e \"s#/# #g\")\"  &&\n-      git add $dir;\n+      git add $dir\n    done) &&\n    git commit -q -m \"deep sub directory structure\" &&\n    git push gitcvs.git >/dev/null &&\n-- \n2.18.0.203.gfac676dfb9\n\n"},{"id":"351485","messageId":"20180702002405.3042-6-sunshine@sunshineco.com","threadId":"48813","inReplyTo":"20180702002405.3042-1-sunshine@sunshineco.com","subject":"[PATCH 05/25] t/lib-submodule-update: fix \"absorbing\" test","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2018-07-02T00:23:45Z","receivedAt":"2018-07-02T00:25:01Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"This test has been dysfunctional since it was added by 259f3ee296\n(lib-submodule-update.sh: define tests for recursing into submodules,\n2017-03-14), however, the problem went unnoticed due to a broken\n&&-chain.\n\nThe test wants to verify that replacing a submodule containing a .git\ndirectory will absorb the .git directory into the .git/modules/ of the\nsuperproject, and then replace the working tree content appropriate to\nthe superproject. It is, therefore, incorrect to check if the\nsubmodule content still exists since the submodule will have been\nreplaced by the content of the superproject.\n\nFix this by removing the submodule content check, which also happens\nto be the line that broke the &&-chain.\n\nWhile at it, fix broken &&-chains in a couple neighboring tests.\n\nHelped-by: Stefan Beller <sbeller@google.com>\nSigned-off-by: Eric Sunshine <sunshine@sunshineco.com>\nSigned-off-by: Stefan Beller <sbeller@google.com>\nSigned-off-by: Eric Sunshine <sunshine@sunshineco.com>\n---\n t/lib-submodule-update.sh | 5 ++---\n 1 file changed, 2 insertions(+), 3 deletions(-)\n\ndiff --git a/t/lib-submodule-update.sh b/t/lib-submodule-update.sh\nindex 1f38a85371..e90ec79087 100755\n--- a/t/lib-submodule-update.sh\n+++ b/t/lib-submodule-update.sh\n@@ -755,7 +755,7 @@ test_submodule_recursing_with_args_common() {\n \t\t\t: >sub1/untrackedfile &&\n \t\t\ttest_must_fail $command replace_sub1_with_file &&\n \t\t\ttest_superproject_content origin/add_sub1 &&\n-\t\t\ttest_submodule_content sub1 origin/add_sub1\n+\t\t\ttest_submodule_content sub1 origin/add_sub1 &&\n \t\t\ttest -f sub1/untracked_file\n \t\t)\n \t'\n@@ -842,7 +842,7 @@ test_submodule_switch_recursing_with_args () {\n \t\t\tcd submodule_update &&\n \t\t\tgit branch -t add_sub1 origin/add_sub1 &&\n \t\t\t: >sub1 &&\n-\t\t\techo sub1 >.git/info/exclude\n+\t\t\techo sub1 >.git/info/exclude &&\n \t\t\t$command add_sub1 &&\n \t\t\ttest_superproject_content origin/add_sub1 &&\n \t\t\ttest_submodule_content sub1 origin/add_sub1\n@@ -969,7 +969,6 @@ test_submodule_forced_switch_recursing_with_args () {\n \t\t\trm -rf .git/modules/sub1 &&\n \t\t\t$command replace_sub1_with_directory &&\n \t\t\ttest_superproject_content origin/replace_sub1_with_directory &&\n-\t\t\ttest_submodule_content sub1 origin/modify_sub1\n \t\t\ttest_git_directory_exists sub1\n \t\t)\n \t'\n-- \n2.18.0.203.gfac676dfb9\n\n"},{"id":"351486","messageId":"20180702002405.3042-4-sunshine@sunshineco.com","threadId":"48813","inReplyTo":"20180702002405.3042-1-sunshine@sunshineco.com","subject":"[PATCH 03/25] t: use sane_unset() rather than 'unset' with broken &&-chain","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2018-07-02T00:23:43Z","receivedAt":"2018-07-02T00:25:02Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"These tests intentionally break the &&-chain after using 'unset' since\nthey don't know if 'unset' will succeed or fail and don't want a local\n'unset' failure to fail the test overall. We can do better by using\nsane_unset(), which can be linked into the &&-chain as usual.\n\nSigned-off-by: Eric Sunshine <sunshine@sunshineco.com>\n---\n t/t0001-init.sh   | 4 ++--\n t/t1300-config.sh | 2 +-\n 2 files changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git a/t/t0001-init.sh b/t/t0001-init.sh\nindex 4c865051e7..ca85aae51e 100755\n--- a/t/t0001-init.sh\n+++ b/t/t0001-init.sh\n@@ -408,7 +408,7 @@ is_hidden () {\n test_expect_success MINGW '.git hidden' '\n \trm -rf newdir &&\n \t(\n-\t\tunset GIT_DIR GIT_WORK_TREE\n+\t\tsane_unset GIT_DIR GIT_WORK_TREE &&\n \t\tmkdir newdir &&\n \t\tcd newdir &&\n \t\tgit init &&\n@@ -420,7 +420,7 @@ test_expect_success MINGW '.git hidden' '\n test_expect_success MINGW 'bare git dir not hidden' '\n \trm -rf newdir &&\n \t(\n-\t\tunset GIT_DIR GIT_WORK_TREE GIT_CONFIG\n+\t\tsane_unset GIT_DIR GIT_WORK_TREE GIT_CONFIG &&\n \t\tmkdir newdir &&\n \t\tcd newdir &&\n \t\tgit --bare init\ndiff --git a/t/t1300-config.sh b/t/t1300-config.sh\nindex 03c223708e..24706ba412 100755\n--- a/t/t1300-config.sh\n+++ b/t/t1300-config.sh\n@@ -888,7 +888,7 @@ EOF\n \n test_expect_success !MINGW 'get --path copes with unset $HOME' '\n \t(\n-\t\tunset HOME;\n+\t\tsane_unset HOME &&\n \t\ttest_must_fail git config --get --path path.home \\\n \t\t\t>result 2>msg &&\n \t\tgit config --get --path path.normal >>result &&\n-- \n2.18.0.203.gfac676dfb9\n\n"},{"id":"351487","messageId":"20180702002405.3042-3-sunshine@sunshineco.com","threadId":"48813","inReplyTo":"20180702002405.3042-1-sunshine@sunshineco.com","subject":"[PATCH 02/25] t: use test_write_lines() instead of series of 'echo' commands","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2018-07-02T00:23:42Z","receivedAt":"2018-07-02T00:25:05Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"These tests employ a noisy subshell (with missing &&-chain) to feed\ninput into Git commands or files:\n\n    (echo a; echo b; echo c) | git some-command ...\n\nSimplify by taking advantage of test_write_lines():\n\n    test_write_lines a b c | git some-command ...\n\nSigned-off-by: Eric Sunshine <sunshine@sunshineco.com>\n---\n t/t0090-cache-tree.sh         |  2 +-\n t/t1008-read-tree-overlay.sh  |  2 +-\n t/t2016-checkout-patch.sh     | 24 ++++++++++----------\n t/t3404-rebase-interactive.sh |  6 ++---\n t/t3701-add-interactive.sh    | 16 +++++++-------\n t/t3904-stash-patch.sh        |  8 +++----\n t/t7105-reset-patch.sh        | 12 +++++-----\n t/t7301-clean-interactive.sh  | 41 +++++++++++++++++------------------\n t/t7501-commit.sh             |  4 ++--\n t/t7610-mergetool.sh          |  8 +++----\n 10 files changed, 61 insertions(+), 62 deletions(-)\n\ndiff --git a/t/t0090-cache-tree.sh b/t/t0090-cache-tree.sh\nindex 0c61268fd2..28ea93f509 100755\n--- a/t/t0090-cache-tree.sh\n+++ b/t/t0090-cache-tree.sh\n@@ -156,7 +156,7 @@ test_expect_success PERL 'commit --interactive gives cache-tree on partial commi\n \t\treturn 44;\n \t}\n \tEOT\n-\t(echo p; echo 1; echo; echo s; echo n; echo y; echo q) |\n+\ttest_write_lines p 1 \"\" s n y q |\n \tgit commit --interactive -m foo &&\n \ttest_cache_tree\n '\ndiff --git a/t/t1008-read-tree-overlay.sh b/t/t1008-read-tree-overlay.sh\nindex 4c50ed955e..cf96016844 100755\n--- a/t/t1008-read-tree-overlay.sh\n+++ b/t/t1008-read-tree-overlay.sh\n@@ -23,7 +23,7 @@ test_expect_success setup '\n \n test_expect_success 'multi-read' '\n \tread_tree_must_succeed initial master side &&\n-\t(echo a; echo b/c) >expect &&\n+\ttest_write_lines a b/c >expect &&\n \tgit ls-files >actual &&\n \ttest_cmp expect actual\n '\ndiff --git a/t/t2016-checkout-patch.sh b/t/t2016-checkout-patch.sh\nindex 9cd0ac4ba3..47aeb0b167 100755\n--- a/t/t2016-checkout-patch.sh\n+++ b/t/t2016-checkout-patch.sh\n@@ -20,33 +20,33 @@ test_expect_success PERL 'setup' '\n \n test_expect_success PERL 'saying \"n\" does nothing' '\n \tset_and_save_state dir/foo work head &&\n-\t(echo n; echo n) | git checkout -p &&\n+\ttest_write_lines n n | git checkout -p &&\n \tverify_saved_state bar &&\n \tverify_saved_state dir/foo\n '\n \n test_expect_success PERL 'git checkout -p' '\n-\t(echo n; echo y) | git checkout -p &&\n+\ttest_write_lines n y | git checkout -p &&\n \tverify_saved_state bar &&\n \tverify_state dir/foo head head\n '\n \n test_expect_success PERL 'git checkout -p with staged changes' '\n \tset_state dir/foo work index &&\n-\t(echo n; echo y) | git checkout -p &&\n+\ttest_write_lines n y | git checkout -p &&\n \tverify_saved_state bar &&\n \tverify_state dir/foo index index\n '\n \n test_expect_success PERL 'git checkout -p HEAD with NO staged changes: abort' '\n \tset_and_save_state dir/foo work head &&\n-\t(echo n; echo y; echo n) | git checkout -p HEAD &&\n+\ttest_write_lines n y n | git checkout -p HEAD &&\n \tverify_saved_state bar &&\n \tverify_saved_state dir/foo\n '\n \n test_expect_success PERL 'git checkout -p HEAD with NO staged changes: apply' '\n-\t(echo n; echo y; echo y) | git checkout -p HEAD &&\n+\ttest_write_lines n y y | git checkout -p HEAD &&\n \tverify_saved_state bar &&\n \tverify_state dir/foo head head\n '\n@@ -54,14 +54,14 @@ test_expect_success PERL 'git checkout -p HEAD with NO staged changes: apply' '\n test_expect_success PERL 'git checkout -p HEAD with change already staged' '\n \tset_state dir/foo index index &&\n \t# the third n is to get out in case it mistakenly does not apply\n-\t(echo n; echo y; echo n) | git checkout -p HEAD &&\n+\ttest_write_lines n y n | git checkout -p HEAD &&\n \tverify_saved_state bar &&\n \tverify_state dir/foo head head\n '\n \n test_expect_success PERL 'git checkout -p HEAD^' '\n \t# the third n is to get out in case it mistakenly does not apply\n-\t(echo n; echo y; echo n) | git checkout -p HEAD^ &&\n+\ttest_write_lines n y n | git checkout -p HEAD^ &&\n \tverify_saved_state bar &&\n \tverify_state dir/foo parent parent\n '\n@@ -69,7 +69,7 @@ test_expect_success PERL 'git checkout -p HEAD^' '\n test_expect_success PERL 'git checkout -p handles deletion' '\n \tset_state dir/foo work index &&\n \trm dir/foo &&\n-\t(echo n; echo y) | git checkout -p &&\n+\ttest_write_lines n y | git checkout -p &&\n \tverify_saved_state bar &&\n \tverify_state dir/foo index index\n '\n@@ -81,21 +81,21 @@ test_expect_success PERL 'git checkout -p handles deletion' '\n \n test_expect_success PERL 'path limiting works: dir' '\n \tset_state dir/foo work head &&\n-\t(echo y; echo n) | git checkout -p dir &&\n+\ttest_write_lines y n | git checkout -p dir &&\n \tverify_saved_state bar &&\n \tverify_state dir/foo head head\n '\n \n test_expect_success PERL 'path limiting works: -- dir' '\n \tset_state dir/foo work head &&\n-\t(echo y; echo n) | git checkout -p -- dir &&\n+\ttest_write_lines y n | git checkout -p -- dir &&\n \tverify_saved_state bar &&\n \tverify_state dir/foo head head\n '\n \n test_expect_success PERL 'path limiting works: HEAD^ -- dir' '\n \t# the third n is to get out in case it mistakenly does not apply\n-\t(echo y; echo n; echo n) | git checkout -p HEAD^ -- dir &&\n+\ttest_write_lines y n n | git checkout -p HEAD^ -- dir &&\n \tverify_saved_state bar &&\n \tverify_state dir/foo parent parent\n '\n@@ -103,7 +103,7 @@ test_expect_success PERL 'path limiting works: HEAD^ -- dir' '\n test_expect_success PERL 'path limiting works: foo inside dir' '\n \tset_state dir/foo work head &&\n \t# the third n is to get out in case it mistakenly does not apply\n-\t(echo y; echo n; echo n) | (cd dir && git checkout -p foo) &&\n+\ttest_write_lines y n n | (cd dir && git checkout -p foo) &&\n \tverify_saved_state bar &&\n \tverify_state dir/foo head head\n '\ndiff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh\nindex 352a52e59d..85e99aac13 100755\n--- a/t/t3404-rebase-interactive.sh\n+++ b/t/t3404-rebase-interactive.sh\n@@ -509,7 +509,7 @@ test_expect_success 'interrupted squash works as expected' '\n \tone=$(git rev-parse HEAD~3) &&\n \tset_fake_editor &&\n \ttest_must_fail env FAKE_LINES=\"1 squash 3 2\" git rebase -i HEAD~3 &&\n-\t(echo one; echo two; echo four) > conflict &&\n+\ttest_write_lines one two four > conflict &&\n \tgit add conflict &&\n \ttest_must_fail git rebase --continue &&\n \techo resolved > conflict &&\n@@ -523,10 +523,10 @@ test_expect_success 'interrupted squash works as expected (case 2)' '\n \tone=$(git rev-parse HEAD~3) &&\n \tset_fake_editor &&\n \ttest_must_fail env FAKE_LINES=\"3 squash 1 2\" git rebase -i HEAD~3 &&\n-\t(echo one; echo four) > conflict &&\n+\ttest_write_lines one four > conflict &&\n \tgit add conflict &&\n \ttest_must_fail git rebase --continue &&\n-\t(echo one; echo two; echo four) > conflict &&\n+\ttest_write_lines one two four > conflict &&\n \tgit add conflict &&\n \ttest_must_fail git rebase --continue &&\n \techo resolved > conflict &&\ndiff --git a/t/t3701-add-interactive.sh b/t/t3701-add-interactive.sh\nindex 3e9139dca8..609fbfdc31 100755\n--- a/t/t3701-add-interactive.sh\n+++ b/t/t3701-add-interactive.sh\n@@ -46,13 +46,13 @@ test_expect_success 'setup expected' '\n '\n \n test_expect_success 'diff works (initial)' '\n-\t(echo d; echo 1) | git add -i >output &&\n+\ttest_write_lines d 1 | git add -i >output &&\n \tsed -ne \"/new file/,/content/p\" <output >diff &&\n \tdiff_cmp expected diff\n '\n test_expect_success 'revert works (initial)' '\n \tgit add file &&\n-\t(echo r; echo 1) | git add -i &&\n+\ttest_write_lines r 1 | git add -i &&\n \tgit ls-files >output &&\n \t! grep . output\n '\n@@ -83,13 +83,13 @@ test_expect_success 'setup expected' '\n '\n \n test_expect_success 'diff works (commit)' '\n-\t(echo d; echo 1) | git add -i >output &&\n+\ttest_write_lines d 1 | git add -i >output &&\n \tsed -ne \"/^index/,/content/p\" <output >diff &&\n \tdiff_cmp expected diff\n '\n test_expect_success 'revert works (commit)' '\n \tgit add file &&\n-\t(echo r; echo 1) | git add -i &&\n+\ttest_write_lines r 1 | git add -i &&\n \tgit add -i </dev/null >output &&\n \tgrep \"unchanged *+3/-0 file\" output\n '\n@@ -102,7 +102,7 @@ test_expect_success 'setup expected' '\n \n test_expect_success 'dummy edit works' '\n \ttest_set_editor : &&\n-\t(echo e; echo a) | git add -p &&\n+\ttest_write_lines e a | git add -p &&\n \tgit diff > diff &&\n \tdiff_cmp expected diff\n '\n@@ -127,7 +127,7 @@ test_expect_success 'setup fake editor' '\n \n test_expect_success 'bad edit rejected' '\n \tgit reset &&\n-\t(echo e; echo n; echo d) | git add -p >output &&\n+\ttest_write_lines e n d | git add -p >output &&\n \tgrep \"hunk does not apply\" output\n '\n \n@@ -140,7 +140,7 @@ test_expect_success 'setup patch' '\n \n test_expect_success 'garbage edit rejected' '\n \tgit reset &&\n-\t(echo e; echo n; echo d) | git add -p >output &&\n+\ttest_write_lines e n d | git add -p >output &&\n \tgrep \"hunk does not apply\" output\n '\n \n@@ -170,7 +170,7 @@ test_expect_success 'setup expected' '\n '\n \n test_expect_success 'real edit works' '\n-\t(echo e; echo n; echo d) | git add -p &&\n+\ttest_write_lines e n d | git add -p &&\n \tgit diff >output &&\n \tdiff_cmp expected output\n '\ndiff --git a/t/t3904-stash-patch.sh b/t/t3904-stash-patch.sh\nindex 83744f8c93..9546b6f8a4 100755\n--- a/t/t3904-stash-patch.sh\n+++ b/t/t3904-stash-patch.sh\n@@ -29,14 +29,14 @@ test_expect_success 'setup' '\n test_expect_success 'saying \"n\" does nothing' '\n \tset_state HEAD HEADfile_work HEADfile_index &&\n \tset_state dir/foo work index &&\n-\t(echo n; echo n; echo n) | test_must_fail git stash save -p &&\n+\ttest_write_lines n n n | test_must_fail git stash save -p &&\n \tverify_state HEAD HEADfile_work HEADfile_index &&\n \tverify_saved_state bar &&\n \tverify_state dir/foo work index\n '\n \n test_expect_success 'git stash -p' '\n-\t(echo y; echo n; echo y) | git stash save -p &&\n+\ttest_write_lines y n y | git stash save -p &&\n \tverify_state HEAD committed HEADfile_index &&\n \tverify_saved_state bar &&\n \tverify_state dir/foo head index &&\n@@ -51,7 +51,7 @@ test_expect_success 'git stash -p --no-keep-index' '\n \tset_state HEAD HEADfile_work HEADfile_index &&\n \tset_state bar bar_work bar_index &&\n \tset_state dir/foo work index &&\n-\t(echo y; echo n; echo y) | git stash save -p --no-keep-index &&\n+\ttest_write_lines y n y | git stash save -p --no-keep-index &&\n \tverify_state HEAD committed committed &&\n \tverify_state bar bar_work dummy &&\n \tverify_state dir/foo head head &&\n@@ -66,7 +66,7 @@ test_expect_success 'git stash --no-keep-index -p' '\n \tset_state HEAD HEADfile_work HEADfile_index &&\n \tset_state bar bar_work bar_index &&\n \tset_state dir/foo work index &&\n-\t(echo y; echo n; echo y) | git stash save --no-keep-index -p &&\n+\ttest_write_lines y n y | git stash save --no-keep-index -p &&\n \tverify_state HEAD committed committed &&\n \tverify_state dir/foo head head &&\n \tverify_state bar bar_work dummy &&\ndiff --git a/t/t7105-reset-patch.sh b/t/t7105-reset-patch.sh\nindex 98b7d7b969..bd10a96727 100755\n--- a/t/t7105-reset-patch.sh\n+++ b/t/t7105-reset-patch.sh\n@@ -19,20 +19,20 @@ test_expect_success PERL 'setup' '\n \n test_expect_success PERL 'saying \"n\" does nothing' '\n \tset_and_save_state dir/foo work work &&\n-\t(echo n; echo n) | git reset -p &&\n+\ttest_write_lines n n | git reset -p &&\n \tverify_saved_state dir/foo &&\n \tverify_saved_state bar\n '\n \n test_expect_success PERL 'git reset -p' '\n-\t(echo n; echo y) | git reset -p >output &&\n+\ttest_write_lines n y | git reset -p >output &&\n \tverify_state dir/foo work head &&\n \tverify_saved_state bar &&\n \ttest_i18ngrep \"Unstage\" output\n '\n \n test_expect_success PERL 'git reset -p HEAD^' '\n-\t(echo n; echo y) | git reset -p HEAD^ >output &&\n+\ttest_write_lines n y | git reset -p HEAD^ >output &&\n \tverify_state dir/foo work parent &&\n \tverify_saved_state bar &&\n \ttest_i18ngrep \"Apply\" output\n@@ -45,20 +45,20 @@ test_expect_success PERL 'git reset -p HEAD^' '\n \n test_expect_success PERL 'git reset -p dir' '\n \tset_state dir/foo work work &&\n-\t(echo y; echo n) | git reset -p dir &&\n+\ttest_write_lines y n | git reset -p dir &&\n \tverify_state dir/foo work head &&\n \tverify_saved_state bar\n '\n \n test_expect_success PERL 'git reset -p -- foo (inside dir)' '\n \tset_state dir/foo work work &&\n-\t(echo y; echo n) | (cd dir && git reset -p -- foo) &&\n+\ttest_write_lines y n | (cd dir && git reset -p -- foo) &&\n \tverify_state dir/foo work head &&\n \tverify_saved_state bar\n '\n \n test_expect_success PERL 'git reset -p HEAD^ -- dir' '\n-\t(echo y; echo n) | git reset -p HEAD^ -- dir &&\n+\ttest_write_lines y n | git reset -p HEAD^ -- dir &&\n \tverify_state dir/foo work parent &&\n \tverify_saved_state bar\n '\ndiff --git a/t/t7301-clean-interactive.sh b/t/t7301-clean-interactive.sh\nindex 1bf9789c8a..a07e8b86de 100755\n--- a/t/t7301-clean-interactive.sh\n+++ b/t/t7301-clean-interactive.sh\n@@ -107,7 +107,7 @@ test_expect_success 'git clean -id (filter all)' '\n \tmkdir -p build docs &&\n \ttouch a.out src/part3.c src/part3.h src/part4.c src/part4.h \\\n \tdocs/manual.txt obj.o build/lib.so &&\n-\t(echo f; echo \"*\"; echo; echo c) | \\\n+\ttest_write_lines f \"*\" \"\" c |\n \tgit clean -id &&\n \ttest -f Makefile &&\n \ttest -f README &&\n@@ -129,7 +129,7 @@ test_expect_success 'git clean -id (filter patterns)' '\n \tmkdir -p build docs &&\n \ttouch a.out src/part3.c src/part3.h src/part4.c src/part4.h \\\n \tdocs/manual.txt obj.o build/lib.so &&\n-\t(echo f; echo \"part3.* *.out\"; echo; echo c) | \\\n+\ttest_write_lines f \"part3.* *.out\" \"\" c |\n \tgit clean -id &&\n \ttest -f Makefile &&\n \ttest -f README &&\n@@ -151,7 +151,7 @@ test_expect_success 'git clean -id (filter patterns 2)' '\n \tmkdir -p build docs &&\n \ttouch a.out src/part3.c src/part3.h src/part4.c src/part4.h \\\n \tdocs/manual.txt obj.o build/lib.so &&\n-\t(echo f; echo \"* !*.out\"; echo; echo c) | \\\n+\ttest_write_lines f \"* !*.out\" \"\" c |\n \tgit clean -id &&\n \ttest -f Makefile &&\n \ttest -f README &&\n@@ -173,7 +173,7 @@ test_expect_success 'git clean -id (select - all)' '\n \tmkdir -p build docs &&\n \ttouch a.out src/part3.c src/part3.h src/part4.c src/part4.h \\\n \tdocs/manual.txt obj.o build/lib.so &&\n-\t(echo s; echo \"*\"; echo; echo c) | \\\n+\ttest_write_lines s \"*\" \"\" c |\n \tgit clean -id &&\n \ttest -f Makefile &&\n \ttest -f README &&\n@@ -195,7 +195,7 @@ test_expect_success 'git clean -id (select - none)' '\n \tmkdir -p build docs &&\n \ttouch a.out src/part3.c src/part3.h src/part4.c src/part4.h \\\n \tdocs/manual.txt obj.o build/lib.so &&\n-\t(echo s; echo; echo c) | \\\n+\ttest_write_lines s \"\" c |\n \tgit clean -id &&\n \ttest -f Makefile &&\n \ttest -f README &&\n@@ -217,7 +217,7 @@ test_expect_success 'git clean -id (select - number)' '\n \tmkdir -p build docs &&\n \ttouch a.out src/part3.c src/part3.h src/part4.c src/part4.h \\\n \tdocs/manual.txt obj.o build/lib.so &&\n-\t(echo s; echo 3; echo; echo c) | \\\n+\ttest_write_lines s 3 \"\" c |\n \tgit clean -id &&\n \ttest -f Makefile &&\n \ttest -f README &&\n@@ -239,7 +239,7 @@ test_expect_success 'git clean -id (select - number 2)' '\n \tmkdir -p build docs &&\n \ttouch a.out src/part3.c src/part3.h src/part4.c src/part4.h \\\n \tdocs/manual.txt obj.o build/lib.so &&\n-\t(echo s; echo 2 3; echo 5; echo; echo c) | \\\n+\ttest_write_lines s \"2 3\" 5 \"\" c |\n \tgit clean -id &&\n \ttest -f Makefile &&\n \ttest -f README &&\n@@ -261,7 +261,7 @@ test_expect_success 'git clean -id (select - number 3)' '\n \tmkdir -p build docs &&\n \ttouch a.out src/part3.c src/part3.h src/part4.c src/part4.h \\\n \tdocs/manual.txt obj.o build/lib.so &&\n-\t(echo s; echo 3,4 5; echo; echo c) | \\\n+\ttest_write_lines s \"3,4 5\" \"\" c |\n \tgit clean -id &&\n \ttest -f Makefile &&\n \ttest -f README &&\n@@ -282,7 +282,7 @@ test_expect_success 'git clean -id (select - filenames)' '\n \n \tmkdir -p build docs &&\n \ttouch a.out foo.txt bar.txt baz.txt &&\n-\t(echo s; echo a.out fo ba bar; echo; echo c) | \\\n+\ttest_write_lines s \"a.out fo ba bar\" \"\" c |\n \tgit clean -id &&\n \ttest -f Makefile &&\n \ttest ! -f a.out &&\n@@ -298,7 +298,7 @@ test_expect_success 'git clean -id (select - range)' '\n \tmkdir -p build docs &&\n \ttouch a.out src/part3.c src/part3.h src/part4.c src/part4.h \\\n \tdocs/manual.txt obj.o build/lib.so &&\n-\t(echo s; echo 1,3-4; echo 2; echo; echo c) | \\\n+\ttest_write_lines s \"1,3-4\" 2 \"\" c |\n \tgit clean -id &&\n \ttest -f Makefile &&\n \ttest -f README &&\n@@ -320,7 +320,7 @@ test_expect_success 'git clean -id (select - range 2)' '\n \tmkdir -p build docs &&\n \ttouch a.out src/part3.c src/part3.h src/part4.c src/part4.h \\\n \tdocs/manual.txt obj.o build/lib.so &&\n-\t(echo s; echo 4- 1; echo; echo c) | \\\n+\ttest_write_lines s \"4- 1\" \"\" c |\n \tgit clean -id &&\n \ttest -f Makefile &&\n \ttest -f README &&\n@@ -342,7 +342,7 @@ test_expect_success 'git clean -id (inverse select)' '\n \tmkdir -p build docs &&\n \ttouch a.out src/part3.c src/part3.h src/part4.c src/part4.h \\\n \tdocs/manual.txt obj.o build/lib.so &&\n-\t(echo s; echo \"*\"; echo -5- 1 -2; echo; echo c) | \\\n+\ttest_write_lines s \"*\" \"-5- 1 -2\" \"\" c |\n \tgit clean -id &&\n \ttest -f Makefile &&\n \ttest -f README &&\n@@ -364,7 +364,7 @@ test_expect_success 'git clean -id (ask)' '\n \tmkdir -p build docs &&\n \ttouch a.out src/part3.c src/part3.h src/part4.c src/part4.h \\\n \tdocs/manual.txt obj.o build/lib.so &&\n-\t(echo a; echo Y; echo y; echo no; echo yes; echo bad; echo) | \\\n+\ttest_write_lines a Y y no yes bad \"\" |\n \tgit clean -id &&\n \ttest -f Makefile &&\n \ttest -f README &&\n@@ -386,7 +386,7 @@ test_expect_success 'git clean -id (ask - Ctrl+D)' '\n \tmkdir -p build docs &&\n \ttouch a.out src/part3.c src/part3.h src/part4.c src/part4.h \\\n \tdocs/manual.txt obj.o build/lib.so &&\n-\t(echo a; echo Y; echo no; echo yes; echo \"\\04\") | \\\n+\ttest_write_lines a Y no yes \"\\04\" |\n \tgit clean -id &&\n \ttest -f Makefile &&\n \ttest -f README &&\n@@ -408,8 +408,8 @@ test_expect_success 'git clean -id with prefix and path (filter)' '\n \tmkdir -p build docs &&\n \ttouch a.out src/part3.c src/part3.h src/part4.c src/part4.h \\\n \tdocs/manual.txt obj.o build/lib.so &&\n-\t(cd build/ && \\\n-\t (echo f; echo \"docs\"; echo \"*.h\"; echo ; echo c) | \\\n+\t(cd build/ &&\n+\t test_write_lines f docs \"*.h\" \"\" c |\n \t git clean -id ..) &&\n \ttest -f Makefile &&\n \ttest -f README &&\n@@ -431,9 +431,8 @@ test_expect_success 'git clean -id with prefix and path (select by name)' '\n \tmkdir -p build docs &&\n \ttouch a.out src/part3.c src/part3.h src/part4.c src/part4.h \\\n \tdocs/manual.txt obj.o build/lib.so &&\n-\t(cd build/ && \\\n-\t (echo s; echo \"../docs/\"; echo \"../src/part3.c\"; \\\n-\t  echo \"../src/part4.c\";  echo; echo c) | \\\n+\t(cd build/ &&\n+\t test_write_lines s ../docs/ ../src/part3.c ../src/part4.c \"\" c |\n \t git clean -id ..) &&\n \ttest -f Makefile &&\n \ttest -f README &&\n@@ -455,8 +454,8 @@ test_expect_success 'git clean -id with prefix and path (ask)' '\n \tmkdir -p build docs &&\n \ttouch a.out src/part3.c src/part3.h src/part4.c src/part4.h \\\n \tdocs/manual.txt obj.o build/lib.so &&\n-\t(cd build/ && \\\n-\t (echo a; echo Y; echo y; echo no; echo yes; echo bad; echo) | \\\n+\t(cd build/ &&\n+\t test_write_lines a Y y no yes bad \"\" |\n \t git clean -id ..) &&\n \ttest -f Makefile &&\n \ttest -f README &&\ndiff --git a/t/t7501-commit.sh b/t/t7501-commit.sh\nindex 9dbbd01fc0..282ff42331 100755\n--- a/t/t7501-commit.sh\n+++ b/t/t7501-commit.sh\n@@ -47,7 +47,7 @@ test_expect_success 'paths and -a do not mix' '\n test_expect_success PERL 'can use paths with --interactive' '\n \techo bong-o-bong >file &&\n \t# 2: update, 1:st path, that is all, 7: quit\n-\t( echo 2; echo 1; echo; echo 7 ) |\n+\ttest_write_lines 2 1 \"\" 7 |\n \tgit commit -m foo --interactive file &&\n \tgit reset --hard HEAD^\n '\n@@ -293,7 +293,7 @@ test_expect_success PERL 'interactive add' '\n test_expect_success PERL \"commit --interactive doesn't change index if editor aborts\" '\n \techo zoo >file &&\n \ttest_must_fail git diff --exit-code >diff1 &&\n-\t(echo u ; echo \"*\" ; echo q) |\n+\ttest_write_lines u \"*\" q |\n \t(\n \t\tEDITOR=: &&\n \t\texport EDITOR &&\ndiff --git a/t/t7610-mergetool.sh b/t/t7610-mergetool.sh\nindex 1a430b9c40..047156e9d5 100755\n--- a/t/t7610-mergetool.sh\n+++ b/t/t7610-mergetool.sh\n@@ -57,18 +57,18 @@ test_expect_success 'setup' '\n \n \tgit checkout -b delete-base branch1 &&\n \tmkdir -p a/a &&\n-\t(echo one; echo two; echo 3; echo 4) >a/a/file.txt &&\n+\ttest_write_lines one two 3 4 >a/a/file.txt &&\n \tgit add a/a/file.txt &&\n \tgit commit -m\"base file\" &&\n \tgit checkout -b move-to-b delete-base &&\n \tmkdir -p b/b &&\n \tgit mv a/a/file.txt b/b/file.txt &&\n-\t(echo one; echo two; echo 4) >b/b/file.txt &&\n+\ttest_write_lines one two 4 >b/b/file.txt &&\n \tgit commit -a -m\"move to b\" &&\n \tgit checkout -b move-to-c delete-base &&\n \tmkdir -p c/c &&\n \tgit mv a/a/file.txt c/c/file.txt &&\n-\t(echo one; echo two; echo 3) >c/c/file.txt &&\n+\ttest_write_lines one two 3 >c/c/file.txt &&\n \tgit commit -a -m\"move to c\" &&\n \n \tgit checkout -b stash1 master &&\n@@ -349,7 +349,7 @@ test_expect_success 'mergetool keeps tempfiles when aborting delete/delete' '\n \tgit checkout -b test$test_count move-to-c &&\n \ttest_config mergetool.keepTemporaries true &&\n \ttest_must_fail git merge move-to-b &&\n-\t! (echo a; echo n) | git mergetool a/a/file.txt &&\n+\t! test_write_lines a n | git mergetool a/a/file.txt &&\n \ttest -d a/a &&\n \tcat >expect <<-\\EOF &&\n \tfile_BASE_.txt\n-- \n2.18.0.203.gfac676dfb9\n\n"},{"id":"351488","messageId":"20180702002405.3042-9-sunshine@sunshineco.com","threadId":"48813","inReplyTo":"20180702002405.3042-1-sunshine@sunshineco.com","subject":"[PATCH 08/25] t5505: modernize and simplify hard-to-digest test","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2018-07-02T00:23:48Z","receivedAt":"2018-07-02T00:25:10Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"This test uses a subshell within a subshell but is formatted in such a\nway as to suggests that the inner subshell is a sibling rather than a\nchild, which makes it difficult to digest the test's structure and\nintent.\n\nWorse, the inner subshell performs cleanup of actions from earlier in\nthe test, however, a failure between the initial actions and the cleanup\nwill prevent the cleanup from taking place.\n\nFix these problems by modernizing and simplifying the test and by using\ntest_when_finished() for the cleanup action.\n\nSigned-off-by: Eric Sunshine <sunshine@sunshineco.com>\n---\n t/t5505-remote.sh | 8 ++------\n 1 file changed, 2 insertions(+), 6 deletions(-)\n\ndiff --git a/t/t5505-remote.sh b/t/t5505-remote.sh\nindex a6c0178f3a..3552b51b4c 100755\n--- a/t/t5505-remote.sh\n+++ b/t/t5505-remote.sh\n@@ -348,17 +348,13 @@ URL: $(pwd)/one\n EOF\n \n test_expect_success 'prune --dry-run' '\n-\t(\n-\t\tcd one &&\n-\t\tgit branch -m side2 side) &&\n+\tgit -C one branch -m side2 side &&\n+\ttest_when_finished \"git -C one branch -m side side2\" &&\n \t(\n \t\tcd test &&\n \t\tgit remote prune --dry-run origin >output &&\n \t\tgit rev-parse refs/remotes/origin/side2 &&\n \t\ttest_must_fail git rev-parse refs/remotes/origin/side &&\n-\t(\n-\t\tcd ../one &&\n-\t\tgit branch -m side side2) &&\n \t\ttest_i18ncmp expect output\n \t)\n '\n-- \n2.18.0.203.gfac676dfb9\n\n"},{"id":"351489","messageId":"20180702002405.3042-8-sunshine@sunshineco.com","threadId":"48813","inReplyTo":"20180702002405.3042-1-sunshine@sunshineco.com","subject":"[PATCH 07/25] t5406: use write_script() instead of birthing shell script manually","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2018-07-02T00:23:47Z","receivedAt":"2018-07-02T00:25:13Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"Take advantage of write_script() to abstract-away details of shell\nscript creation, thus allowing the reader to focus on script content.\nReadability benefits, particularly in this case, since the script body\nwas buried in a noisy one-liner subshell responsible for emitting\nboilerplate and body.\n\nSigned-off-by: Eric Sunshine <sunshine@sunshineco.com>\n---\n t/t5406-remote-rejects.sh | 5 +++--\n 1 file changed, 3 insertions(+), 2 deletions(-)\n\ndiff --git a/t/t5406-remote-rejects.sh b/t/t5406-remote-rejects.sh\nindex 59e80a5ea2..ff06f99649 100755\n--- a/t/t5406-remote-rejects.sh\n+++ b/t/t5406-remote-rejects.sh\n@@ -6,8 +6,9 @@ test_description='remote push rejects are reported by client'\n \n test_expect_success 'setup' '\n \tmkdir .git/hooks &&\n-\t(echo \"#!/bin/sh\" ; echo \"exit 1\") >.git/hooks/update &&\n-\tchmod +x .git/hooks/update &&\n+\twrite_script .git/hooks/update <<-\\EOF &&\n+\texit 1\n+\tEOF\n \techo 1 >file &&\n \tgit add file &&\n \tgit commit -m 1 &&\n-- \n2.18.0.203.gfac676dfb9\n\n"},{"id":"351490","messageId":"20180702002405.3042-11-sunshine@sunshineco.com","threadId":"48813","inReplyTo":"20180702002405.3042-1-sunshine@sunshineco.com","subject":"[PATCH 10/25] t7201: drop pointless \"exit 0\" at end of subshell","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2018-07-02T00:23:50Z","receivedAt":"2018-07-02T00:25:14Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"This test employs a for-loop inside a subshell and correctly aborts the\nloop and fails the test overall (via \"exit 1\") if any iteration of the\nfor-loop fails. Otherwise, it exits the subshell with an explicit but\nentirely unnecessary \"exit 0\", presumably to indicate that all\niterations of the loop succeeded. The &&-chain is broken between the\nfor-loop and the \"exit 0\". Rather than fixing the &&-chain, just drop\nthe pointless \"exit 0\".\n\nSigned-off-by: Eric Sunshine <sunshine@sunshineco.com>\n---\n t/t7201-co.sh | 1 -\n 1 file changed, 1 deletion(-)\n\ndiff --git a/t/t7201-co.sh b/t/t7201-co.sh\nindex ab9da61da3..8d8a63a24b 100755\n--- a/t/t7201-co.sh\n+++ b/t/t7201-co.sh\n@@ -673,7 +673,6 @@ test_expect_success 'custom merge driver with checkout -m' '\n \t\tdo\n \t\t\tgrep $t arm || exit 1\n \t\tdone\n-\t\texit 0\n \t) &&\n \n \tmv arm expect &&\n-- \n2.18.0.203.gfac676dfb9\n\n"},{"id":"351491","messageId":"20180702002405.3042-12-sunshine@sunshineco.com","threadId":"48813","inReplyTo":"20180702002405.3042-1-sunshine@sunshineco.com","subject":"[PATCH 11/25] t7400: fix broken \"submodule add/reconfigure --force\" test","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2018-07-02T00:23:51Z","receivedAt":"2018-07-02T00:25:17Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"This test has been dysfunctional since it was added by 619acfc78c\n(submodule add: extend force flag to add existing repos, 2016-10-06),\nhowever, two problems early in the test went unnoticed due to a broken\n&&-chain later in the test.\n\nFirst, it tries configuring the submodule with repository \"bogus-url\",\nhowever, \"git submodule add\" insists that the repository be either an\nabsolute URL or a relative pathname requiring prefix \"./\" or \"../\" (this\nis true even with --force), but \"bogus-url\" does not meet those\ncriteria, thus the command fails.\n\nSecond, it then tries configuring a submodule with a path which is\n.gitignore'd, which is disallowed. This restriction can be overridden\nwith --force, but the test neglects to use that option.\n\nFix both problems, as well as the broken &&-chain behind which they hid.\n\nReviewed-by: Stefan Beller <sbeller@google.com>\nSigned-off-by: Eric Sunshine <sunshine@sunshineco.com>\n---\n t/t7400-submodule-basic.sh | 10 +++++-----\n 1 file changed, 5 insertions(+), 5 deletions(-)\n\ndiff --git a/t/t7400-submodule-basic.sh b/t/t7400-submodule-basic.sh\nindex 812db137b8..401adaed32 100755\n--- a/t/t7400-submodule-basic.sh\n+++ b/t/t7400-submodule-basic.sh\n@@ -171,12 +171,12 @@ test_expect_success 'submodule add to .gitignored path with --force' '\n test_expect_success 'submodule add to reconfigure existing submodule with --force' '\n \t(\n \t\tcd addtest-ignore &&\n-\t\tgit submodule add --force bogus-url submod &&\n-\t\tgit submodule add -b initial \"$submodurl\" submod-branch &&\n-\t\ttest \"bogus-url\" = \"$(git config -f .gitmodules submodule.submod.url)\" &&\n-\t\ttest \"bogus-url\" = \"$(git config submodule.submod.url)\" &&\n+\t\tgit submodule add --force /bogus-url submod &&\n+\t\tgit submodule add --force -b initial \"$submodurl\" submod-branch &&\n+\t\ttest \"/bogus-url\" = \"$(git config -f .gitmodules submodule.submod.url)\" &&\n+\t\ttest \"/bogus-url\" = \"$(git config submodule.submod.url)\" &&\n \t\t# Restore the url\n-\t\tgit submodule add --force \"$submodurl\" submod\n+\t\tgit submodule add --force \"$submodurl\" submod &&\n \t\ttest \"$submodurl\" = \"$(git config -f .gitmodules submodule.submod.url)\" &&\n \t\ttest \"$submodurl\" = \"$(git config submodule.submod.url)\"\n \t)\n-- \n2.18.0.203.gfac676dfb9\n\n"},{"id":"351492","messageId":"20180702002405.3042-13-sunshine@sunshineco.com","threadId":"48813","inReplyTo":"20180702002405.3042-1-sunshine@sunshineco.com","subject":"[PATCH 12/25] t7810: use test_expect_code() instead of hand-rolled comparison","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2018-07-02T00:23:52Z","receivedAt":"2018-07-02T00:25:18Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"This test manually checks the exit code of git-grep for a particular\nvalue. In doing so, it intentionally breaks the &&-chain. Modernize the\ntest by taking advantage of test_expect_code() and a normal &&-chain.\n\nSigned-off-by: Eric Sunshine <sunshine@sunshineco.com>\n---\n t/t7810-grep.sh | 7 +++----\n 1 file changed, 3 insertions(+), 4 deletions(-)\n\ndiff --git a/t/t7810-grep.sh b/t/t7810-grep.sh\nindex 1797f632a3..fecee602c1 100755\n--- a/t/t7810-grep.sh\n+++ b/t/t7810-grep.sh\n@@ -845,10 +845,9 @@ test_expect_success 'grep from a subdirectory to search wider area (1)' '\n test_expect_success 'grep from a subdirectory to search wider area (2)' '\n \tmkdir -p s &&\n \t(\n-\t\tcd s || exit 1\n-\t\t( git grep xxyyzz .. >out ; echo $? >status )\n-\t\t! test -s out &&\n-\t\ttest 1 = $(cat status)\n+\t\tcd s &&\n+\t\ttest_expect_code 1 git grep xxyyzz .. >out &&\n+\t\t! test -s out\n \t)\n '\n \n-- \n2.18.0.203.gfac676dfb9\n\n"},{"id":"351493","messageId":"20180702002405.3042-16-sunshine@sunshineco.com","threadId":"48813","inReplyTo":"20180702002405.3042-1-sunshine@sunshineco.com","subject":"[PATCH 15/25] t0000-t0999: fix broken &&-chains","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2018-07-02T00:23:55Z","receivedAt":"2018-07-02T00:25:23Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>\n---\n t/t0000-basic.sh      |  2 +-\n t/t0003-attributes.sh | 24 ++++++++++++------------\n t/t0021-conversion.sh |  4 ++--\n 3 files changed, 15 insertions(+), 15 deletions(-)\n\ndiff --git a/t/t0000-basic.sh b/t/t0000-basic.sh\nindex af61d083b4..34859fe4a5 100755\n--- a/t/t0000-basic.sh\n+++ b/t/t0000-basic.sh\n@@ -1081,7 +1081,7 @@ test_expect_success 'very long name in the index handled sanely' '\n \t(\n \t\tgit ls-files -s path4 |\n \t\tsed -e \"s/\t.*/\t/\" |\n-\t\ttr -d \"\\012\"\n+\t\ttr -d \"\\012\" &&\n \t\techo \"$a\"\n \t) | git update-index --index-info &&\n \tlen=$(git ls-files \"a*\" | wc -c) &&\ndiff --git a/t/t0003-attributes.sh b/t/t0003-attributes.sh\nindex f19ae4f8cc..5c37c2e1f8 100755\n--- a/t/t0003-attributes.sh\n+++ b/t/t0003-attributes.sh\n@@ -34,15 +34,15 @@ test_expect_success 'open-quoted pathname' '\n test_expect_success 'setup' '\n \tmkdir -p a/b/d a/c b &&\n \t(\n-\t\techo \"[attr]notest !test\"\n-\t\techo \"\\\" d \\\"\ttest=d\"\n-\t\techo \" e\ttest=e\"\n-\t\techo \" e\\\"\ttest=e\"\n-\t\techo \"f\ttest=f\"\n-\t\techo \"a/i test=a/i\"\n-\t\techo \"onoff test -test\"\n-\t\techo \"offon -test test\"\n-\t\techo \"no notest\"\n+\t\techo \"[attr]notest !test\" &&\n+\t\techo \"\\\" d \\\"\ttest=d\" &&\n+\t\techo \" e\ttest=e\" &&\n+\t\techo \" e\\\"\ttest=e\" &&\n+\t\techo \"f\ttest=f\" &&\n+\t\techo \"a/i test=a/i\" &&\n+\t\techo \"onoff test -test\" &&\n+\t\techo \"offon -test test\" &&\n+\t\techo \"no notest\" &&\n \t\techo \"A/e/F test=A/e/F\"\n \t) >.gitattributes &&\n \t(\n@@ -51,7 +51,7 @@ test_expect_success 'setup' '\n \t) >a/.gitattributes &&\n \t(\n \t\techo \"h test=a/b/h\" &&\n-\t\techo \"d/* test=a/b/d/*\"\n+\t\techo \"d/* test=a/b/d/*\" &&\n \t\techo \"d/yes notest\"\n \t) >a/b/.gitattributes &&\n \t(\n@@ -287,7 +287,7 @@ test_expect_success 'bare repository: check that .gitattribute is ignored' '\n \t(\n \t\tcd bare.git &&\n \t\t(\n-\t\t\techo \"f\ttest=f\"\n+\t\t\techo \"f\ttest=f\" &&\n \t\t\techo \"a/i test=a/i\"\n \t\t) >.gitattributes &&\n \t\tattr_check f unspecified &&\n@@ -312,7 +312,7 @@ test_expect_success 'bare repository: test info/attributes' '\n \t(\n \t\tcd bare.git &&\n \t\t(\n-\t\t\techo \"f\ttest=f\"\n+\t\t\techo \"f\ttest=f\" &&\n \t\t\techo \"a/i test=a/i\"\n \t\t) >info/attributes &&\n \t\tattr_check f f &&\ndiff --git a/t/t0021-conversion.sh b/t/t0021-conversion.sh\nindex 9479a4aaab..6a213608cc 100755\n--- a/t/t0021-conversion.sh\n+++ b/t/t0021-conversion.sh\n@@ -785,7 +785,7 @@ test_expect_success PERL 'missing file in delayed checkout' '\n \t\tcd repo &&\n \t\tgit init &&\n \t\techo \"*.a filter=bug\" >.gitattributes &&\n-\t\tcp \"$TEST_ROOT/test.o\" missing-delay.a\n+\t\tcp \"$TEST_ROOT/test.o\" missing-delay.a &&\n \t\tgit add . &&\n \t\tgit commit -m \"test commit\"\n \t) &&\n@@ -807,7 +807,7 @@ test_expect_success PERL 'invalid file in delayed checkout' '\n \t\tgit init &&\n \t\techo \"*.a filter=bug\" >.gitattributes &&\n \t\tcp \"$TEST_ROOT/test.o\" invalid-delay.a &&\n-\t\tcp \"$TEST_ROOT/test.o\" unfiltered\n+\t\tcp \"$TEST_ROOT/test.o\" unfiltered &&\n \t\tgit add . &&\n \t\tgit commit -m \"test commit\"\n \t) &&\n-- \n2.18.0.203.gfac676dfb9\n\n"},{"id":"351494","messageId":"20180702002405.3042-17-sunshine@sunshineco.com","threadId":"48813","inReplyTo":"20180702002405.3042-1-sunshine@sunshineco.com","subject":"[PATCH 16/25] t1000-t1999: fix broken &&-chains","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2018-07-02T00:23:56Z","receivedAt":"2018-07-02T00:25:24Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>\n---\n t/t1004-read-tree-m-u-wf.sh         |  8 ++++----\n t/t1005-read-tree-reset.sh          | 10 +++++-----\n t/t1020-subdirectory.sh             |  2 +-\n t/t1050-large.sh                    |  6 +++---\n t/t1411-reflog-show.sh              |  6 +++---\n t/t1512-rev-parse-disambiguation.sh |  6 +++---\n 6 files changed, 19 insertions(+), 19 deletions(-)\n\ndiff --git a/t/t1004-read-tree-m-u-wf.sh b/t/t1004-read-tree-m-u-wf.sh\nindex 826cd32e23..c13578a635 100755\n--- a/t/t1004-read-tree-m-u-wf.sh\n+++ b/t/t1004-read-tree-m-u-wf.sh\n@@ -210,10 +210,10 @@ test_expect_success 'D/F' '\n \tread_tree_u_must_succeed -m -u branch-point side-b side-a &&\n \tgit ls-files -u >actual &&\n \t(\n-\t\ta=$(git rev-parse branch-point:subdir/file2)\n-\t\tb=$(git rev-parse side-a:subdir/file2/another)\n-\t\techo \"100644 $a 1\tsubdir/file2\"\n-\t\techo \"100644 $a 2\tsubdir/file2\"\n+\t\ta=$(git rev-parse branch-point:subdir/file2) &&\n+\t\tb=$(git rev-parse side-a:subdir/file2/another) &&\n+\t\techo \"100644 $a 1\tsubdir/file2\" &&\n+\t\techo \"100644 $a 2\tsubdir/file2\" &&\n \t\techo \"100644 $b 3\tsubdir/file2/another\"\n \t) >expect &&\n \ttest_cmp expect actual\ndiff --git a/t/t1005-read-tree-reset.sh b/t/t1005-read-tree-reset.sh\nindex 074568500a..83b09e1310 100755\n--- a/t/t1005-read-tree-reset.sh\n+++ b/t/t1005-read-tree-reset.sh\n@@ -33,7 +33,7 @@ test_expect_success 'reset should remove remnants from a failed merge' '\n \tgit ls-files -s >expect &&\n \tsha1=$(git rev-parse :new) &&\n \t(\n-\t\techo \"100644 $sha1 1\told\"\n+\t\techo \"100644 $sha1 1\told\" &&\n \t\techo \"100644 $sha1 3\told\"\n \t) | git update-index --index-info &&\n \t>old &&\n@@ -48,7 +48,7 @@ test_expect_success 'two-way reset should remove remnants too' '\n \tgit ls-files -s >expect &&\n \tsha1=$(git rev-parse :new) &&\n \t(\n-\t\techo \"100644 $sha1 1\told\"\n+\t\techo \"100644 $sha1 1\told\" &&\n \t\techo \"100644 $sha1 3\told\"\n \t) | git update-index --index-info &&\n \t>old &&\n@@ -63,7 +63,7 @@ test_expect_success 'Porcelain reset should remove remnants too' '\n \tgit ls-files -s >expect &&\n \tsha1=$(git rev-parse :new) &&\n \t(\n-\t\techo \"100644 $sha1 1\told\"\n+\t\techo \"100644 $sha1 1\told\" &&\n \t\techo \"100644 $sha1 3\told\"\n \t) | git update-index --index-info &&\n \t>old &&\n@@ -78,7 +78,7 @@ test_expect_success 'Porcelain checkout -f should remove remnants too' '\n \tgit ls-files -s >expect &&\n \tsha1=$(git rev-parse :new) &&\n \t(\n-\t\techo \"100644 $sha1 1\told\"\n+\t\techo \"100644 $sha1 1\told\" &&\n \t\techo \"100644 $sha1 3\told\"\n \t) | git update-index --index-info &&\n \t>old &&\n@@ -93,7 +93,7 @@ test_expect_success 'Porcelain checkout -f HEAD should remove remnants too' '\n \tgit ls-files -s >expect &&\n \tsha1=$(git rev-parse :new) &&\n \t(\n-\t\techo \"100644 $sha1 1\told\"\n+\t\techo \"100644 $sha1 1\told\" &&\n \t\techo \"100644 $sha1 3\told\"\n \t) | git update-index --index-info &&\n \t>old &&\ndiff --git a/t/t1020-subdirectory.sh b/t/t1020-subdirectory.sh\nindex df3183ea1a..c2df75e495 100755\n--- a/t/t1020-subdirectory.sh\n+++ b/t/t1020-subdirectory.sh\n@@ -148,7 +148,7 @@ test_expect_success 'GIT_PREFIX for built-ins' '\n \t(\n \t\tcd dir &&\n \t\techo \"change\" >two &&\n-\t\tGIT_EXTERNAL_DIFF=./diff git diff >../actual\n+\t\tGIT_EXTERNAL_DIFF=./diff git diff >../actual &&\n \t\tgit checkout -- two\n \t) &&\n \ttest_cmp expect actual\ndiff --git a/t/t1050-large.sh b/t/t1050-large.sh\nindex f9eb143f43..1a9b21b293 100755\n--- a/t/t1050-large.sh\n+++ b/t/t1050-large.sh\n@@ -108,7 +108,7 @@ test_expect_success 'packsize limit' '\n \t\ttest-tool genrandom \"c\" $(( 128 * 1024 )) >mid3 &&\n \t\tgit add mid1 mid2 mid3 &&\n \n-\t\tcount=0\n+\t\tcount=0 &&\n \t\tfor pi in .git/objects/pack/pack-*.idx\n \t\tdo\n \t\t\ttest -f \"$pi\" && count=$(( $count + 1 ))\n@@ -116,8 +116,8 @@ test_expect_success 'packsize limit' '\n \t\ttest $count = 2 &&\n \n \t\t(\n-\t\t\tgit hash-object --stdin <mid1\n-\t\t\tgit hash-object --stdin <mid2\n+\t\t\tgit hash-object --stdin <mid1 &&\n+\t\t\tgit hash-object --stdin <mid2 &&\n \t\t\tgit hash-object --stdin <mid3\n \t\t) |\n \t\tsort >expect &&\ndiff --git a/t/t1411-reflog-show.sh b/t/t1411-reflog-show.sh\nindex 596907758d..4d62ceef9c 100755\n--- a/t/t1411-reflog-show.sh\n+++ b/t/t1411-reflog-show.sh\n@@ -159,9 +159,9 @@ test_expect_success 'git log -g -p shows diffs vs. parents' '\n \tgit log -1 -p HEAD^ >log.one &&\n \tgit log -1 -p HEAD >log.two &&\n \t(\n-\t\tcat log.one; echo\n-\t\tcat log.two; echo\n-\t\tcat log.one; echo\n+\t\tcat log.one && echo &&\n+\t\tcat log.two && echo &&\n+\t\tcat log.one && echo &&\n \t\tcat log.two\n \t) >expect &&\n \ttest_cmp expect actual\ndiff --git a/t/t1512-rev-parse-disambiguation.sh b/t/t1512-rev-parse-disambiguation.sh\nindex 96fe3754c8..e4d5b56014 100755\n--- a/t/t1512-rev-parse-disambiguation.sh\n+++ b/t/t1512-rev-parse-disambiguation.sh\n@@ -34,8 +34,8 @@ test_expect_success 'blob and tree' '\n \t\tfor i in 0 1 2 3 4 5 6 7 8 9\n \t\tdo\n \t\t\techo $i\n-\t\tdone\n-\t\techo\n+\t\tdone &&\n+\t\techo &&\n \t\techo b1rwzyc3\n \t) >a0blgqsjc &&\n \n@@ -222,7 +222,7 @@ test_expect_success 'more history' '\n \n \ttest_might_fail git rm -f a0blgqsjc &&\n \t(\n-\t\tgit cat-file blob $side:f5518nwu\n+\t\tgit cat-file blob $side:f5518nwu &&\n \t\techo j3l0i9s6\n \t) >ab2gs879 &&\n \tgit add ab2gs879 &&\n-- \n2.18.0.203.gfac676dfb9\n\n"},{"id":"351495","messageId":"20180702002405.3042-18-sunshine@sunshineco.com","threadId":"48813","inReplyTo":"20180702002405.3042-1-sunshine@sunshineco.com","subject":"[PATCH 17/25] t2000-t2999: fix broken &&-chains","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2018-07-02T00:23:57Z","receivedAt":"2018-07-02T00:25:25Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>\n---\n t/t2103-update-index-ignore-missing.sh |  2 +-\n t/t2202-add-addremove.sh               | 14 +++++++-------\n 2 files changed, 8 insertions(+), 8 deletions(-)\n\ndiff --git a/t/t2103-update-index-ignore-missing.sh b/t/t2103-update-index-ignore-missing.sh\nindex 332694e7d3..0114f05228 100755\n--- a/t/t2103-update-index-ignore-missing.sh\n+++ b/t/t2103-update-index-ignore-missing.sh\n@@ -32,7 +32,7 @@ test_expect_success basics '\n \t\ttest_create_repo xyzzy &&\n \t\tcd xyzzy &&\n \t\t>file &&\n-\t\tgit add file\n+\t\tgit add file &&\n \t\tgit commit -m \"sub initial\"\n \t) &&\n \tgit add xyzzy &&\ndiff --git a/t/t2202-add-addremove.sh b/t/t2202-add-addremove.sh\nindex 6a5a3166b1..17744e8c57 100755\n--- a/t/t2202-add-addremove.sh\n+++ b/t/t2202-add-addremove.sh\n@@ -6,12 +6,12 @@ test_description='git add --all'\n \n test_expect_success setup '\n \t(\n-\t\techo .gitignore\n+\t\techo .gitignore &&\n \t\techo will-remove\n \t) >expect &&\n \t(\n-\t\techo actual\n-\t\techo expect\n+\t\techo actual &&\n+\t\techo expect &&\n \t\techo ignored\n \t) >.gitignore &&\n \tgit --literal-pathspecs add --all &&\n@@ -25,10 +25,10 @@ test_expect_success setup '\n \n test_expect_success 'git add --all' '\n \t(\n-\t\techo .gitignore\n-\t\techo not-ignored\n-\t\techo \"M\t.gitignore\"\n-\t\techo \"A\tnot-ignored\"\n+\t\techo .gitignore &&\n+\t\techo not-ignored &&\n+\t\techo \"M\t.gitignore\" &&\n+\t\techo \"A\tnot-ignored\" &&\n \t\techo \"D\twill-remove\"\n \t) >expect &&\n \t>ignored &&\n-- \n2.18.0.203.gfac676dfb9\n\n"},{"id":"351496","messageId":"20180702002405.3042-26-sunshine@sunshineco.com","threadId":"48813","inReplyTo":"20180702002405.3042-1-sunshine@sunshineco.com","subject":"[PATCH 25/25] t9119: fix broken &&-chains","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2018-07-02T00:24:05Z","receivedAt":"2018-07-02T00:25:29Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>\n---\n t/t9119-git-svn-info.sh | 120 ++++++++++++++++++++--------------------\n 1 file changed, 60 insertions(+), 60 deletions(-)\n\ndiff --git a/t/t9119-git-svn-info.sh b/t/t9119-git-svn-info.sh\nindex 88241baee3..8201c3e808 100755\n--- a/t/t9119-git-svn-info.sh\n+++ b/t/t9119-git-svn-info.sh\n@@ -22,8 +22,8 @@ esac\n # same value as \"svn info\" (i.e. the commit timestamp that touched the\n # path most recently); do not expect that field to match.\n test_cmp_info () {\n-\tsed -e '/^Text Last Updated:/d' \"$1\" >tmp.expect\n-\tsed -e '/^Text Last Updated:/d' \"$2\" >tmp.actual\n+\tsed -e '/^Text Last Updated:/d' \"$1\" >tmp.expect &&\n+\tsed -e '/^Text Last Updated:/d' \"$2\" >tmp.actual &&\n \ttest_cmp tmp.expect tmp.actual &&\n \trm -f tmp.expect tmp.actual\n }\n@@ -59,24 +59,24 @@ test_expect_success 'setup repository and import' '\n \t'\n \n test_expect_success 'info' \"\n-\t(cd svnwc; svn info) > expected.info &&\n-\t(cd gitwc; git svn info) > actual.info &&\n+\t(cd svnwc && svn info) > expected.info &&\n+\t(cd gitwc && git svn info) > actual.info &&\n \ttest_cmp_info expected.info actual.info\n \t\"\n \n test_expect_success 'info --url' '\n-\ttest \"$(cd gitwc; git svn info --url)\" = \"$quoted_svnrepo\"\n+\ttest \"$(cd gitwc && git svn info --url)\" = \"$quoted_svnrepo\"\n \t'\n \n test_expect_success 'info .' \"\n-\t(cd svnwc; svn info .) > expected.info-dot &&\n-\t(cd gitwc; git svn info .) > actual.info-dot &&\n+\t(cd svnwc && svn info .) > expected.info-dot &&\n+\t(cd gitwc && git svn info .) > actual.info-dot &&\n \ttest_cmp_info expected.info-dot actual.info-dot\n \t\"\n \n test_expect_success 'info $(pwd)' '\n-\t(cd svnwc; svn info \"$(pwd)\") >expected.info-pwd &&\n-\t(cd gitwc; git svn info \"$(pwd)\") >actual.info-pwd &&\n+\t(cd svnwc && svn info \"$(pwd)\") >expected.info-pwd &&\n+\t(cd gitwc && git svn info \"$(pwd)\") >actual.info-pwd &&\n \tgrep -v ^Path: <expected.info-pwd >expected.info-np &&\n \tgrep -v ^Path: <actual.info-pwd >actual.info-np &&\n \ttest_cmp_info expected.info-np actual.info-np &&\n@@ -85,8 +85,8 @@ test_expect_success 'info $(pwd)' '\n \t'\n \n test_expect_success 'info $(pwd)/../___wc' '\n-\t(cd svnwc; svn info \"$(pwd)/../svnwc\") >expected.info-pwd &&\n-\t(cd gitwc; git svn info \"$(pwd)/../gitwc\") >actual.info-pwd &&\n+\t(cd svnwc && svn info \"$(pwd)/../svnwc\") >expected.info-pwd &&\n+\t(cd gitwc && git svn info \"$(pwd)/../gitwc\") >actual.info-pwd &&\n \tgrep -v ^Path: <expected.info-pwd >expected.info-np &&\n \tgrep -v ^Path: <actual.info-pwd >actual.info-np &&\n \ttest_cmp_info expected.info-np actual.info-np &&\n@@ -95,8 +95,8 @@ test_expect_success 'info $(pwd)/../___wc' '\n \t'\n \n test_expect_success 'info $(pwd)/../___wc//file' '\n-\t(cd svnwc; svn info \"$(pwd)/../svnwc//file\") >expected.info-pwd &&\n-\t(cd gitwc; git svn info \"$(pwd)/../gitwc//file\") >actual.info-pwd &&\n+\t(cd svnwc && svn info \"$(pwd)/../svnwc//file\") >expected.info-pwd &&\n+\t(cd gitwc && git svn info \"$(pwd)/../gitwc//file\") >actual.info-pwd &&\n \tgrep -v ^Path: <expected.info-pwd >expected.info-np &&\n \tgrep -v ^Path: <actual.info-pwd >actual.info-np &&\n \ttest_cmp_info expected.info-np actual.info-np &&\n@@ -105,56 +105,56 @@ test_expect_success 'info $(pwd)/../___wc//file' '\n \t'\n \n test_expect_success 'info --url .' '\n-\ttest \"$(cd gitwc; git svn info --url .)\" = \"$quoted_svnrepo\"\n+\ttest \"$(cd gitwc && git svn info --url .)\" = \"$quoted_svnrepo\"\n \t'\n \n test_expect_success 'info file' \"\n-\t(cd svnwc; svn info file) > expected.info-file &&\n-\t(cd gitwc; git svn info file) > actual.info-file &&\n+\t(cd svnwc && svn info file) > expected.info-file &&\n+\t(cd gitwc && git svn info file) > actual.info-file &&\n \ttest_cmp_info expected.info-file actual.info-file\n \t\"\n \n test_expect_success 'info --url file' '\n-\ttest \"$(cd gitwc; git svn info --url file)\" = \"$quoted_svnrepo/file\"\n+\ttest \"$(cd gitwc && git svn info --url file)\" = \"$quoted_svnrepo/file\"\n \t'\n \n test_expect_success 'info directory' \"\n-\t(cd svnwc; svn info directory) > expected.info-directory &&\n-\t(cd gitwc; git svn info directory) > actual.info-directory &&\n+\t(cd svnwc && svn info directory) > expected.info-directory &&\n+\t(cd gitwc && git svn info directory) > actual.info-directory &&\n \ttest_cmp_info expected.info-directory actual.info-directory\n \t\"\n \n test_expect_success 'info inside directory' \"\n-\t(cd svnwc/directory; svn info) > expected.info-inside-directory &&\n-\t(cd gitwc/directory; git svn info) > actual.info-inside-directory &&\n+\t(cd svnwc/directory && svn info) > expected.info-inside-directory &&\n+\t(cd gitwc/directory && git svn info) > actual.info-inside-directory &&\n \ttest_cmp_info expected.info-inside-directory actual.info-inside-directory\n \t\"\n \n test_expect_success 'info --url directory' '\n-\ttest \"$(cd gitwc; git svn info --url directory)\" = \"$quoted_svnrepo/directory\"\n+\ttest \"$(cd gitwc && git svn info --url directory)\" = \"$quoted_svnrepo/directory\"\n \t'\n \n test_expect_success 'info symlink-file' \"\n-\t(cd svnwc; svn info symlink-file) > expected.info-symlink-file &&\n-\t(cd gitwc; git svn info symlink-file) > actual.info-symlink-file &&\n+\t(cd svnwc && svn info symlink-file) > expected.info-symlink-file &&\n+\t(cd gitwc && git svn info symlink-file) > actual.info-symlink-file &&\n \ttest_cmp_info expected.info-symlink-file actual.info-symlink-file\n \t\"\n \n test_expect_success 'info --url symlink-file' '\n-\ttest \"$(cd gitwc; git svn info --url symlink-file)\" \\\n+\ttest \"$(cd gitwc && git svn info --url symlink-file)\" \\\n \t     = \"$quoted_svnrepo/symlink-file\"\n \t'\n \n test_expect_success 'info symlink-directory' \"\n-\t(cd svnwc; svn info symlink-directory) \\\n+\t(cd svnwc && svn info symlink-directory) \\\n \t\t> expected.info-symlink-directory &&\n-\t(cd gitwc; git svn info symlink-directory) \\\n+\t(cd gitwc && git svn info symlink-directory) \\\n \t\t> actual.info-symlink-directory &&\n \ttest_cmp_info expected.info-symlink-directory actual.info-symlink-directory\n \t\"\n \n test_expect_success 'info --url symlink-directory' '\n-\ttest \"$(cd gitwc; git svn info --url symlink-directory)\" \\\n+\ttest \"$(cd gitwc && git svn info --url symlink-directory)\" \\\n \t     = \"$quoted_svnrepo/symlink-directory\"\n \t'\n \n@@ -169,13 +169,13 @@ test_expect_success 'info added-file' \"\n \t\tcd svnwc &&\n \t\tsvn_cmd add added-file > /dev/null\n \t) &&\n-\t(cd svnwc; svn info added-file) > expected.info-added-file &&\n-\t(cd gitwc; git svn info added-file) > actual.info-added-file &&\n+\t(cd svnwc && svn info added-file) > expected.info-added-file &&\n+\t(cd gitwc && git svn info added-file) > actual.info-added-file &&\n \ttest_cmp_info expected.info-added-file actual.info-added-file\n \t\"\n \n test_expect_success 'info --url added-file' '\n-\ttest \"$(cd gitwc; git svn info --url added-file)\" \\\n+\ttest \"$(cd gitwc && git svn info --url added-file)\" \\\n \t     = \"$quoted_svnrepo/added-file\"\n \t'\n \n@@ -190,15 +190,15 @@ test_expect_success 'info added-directory' \"\n \t\tcd gitwc &&\n \t\tgit add added-directory\n \t) &&\n-\t(cd svnwc; svn info added-directory) \\\n+\t(cd svnwc && svn info added-directory) \\\n \t\t> expected.info-added-directory &&\n-\t(cd gitwc; git svn info added-directory) \\\n+\t(cd gitwc && git svn info added-directory) \\\n \t\t> actual.info-added-directory &&\n \ttest_cmp_info expected.info-added-directory actual.info-added-directory\n \t\"\n \n test_expect_success 'info --url added-directory' '\n-\ttest \"$(cd gitwc; git svn info --url added-directory)\" \\\n+\ttest \"$(cd gitwc && git svn info --url added-directory)\" \\\n \t     = \"$quoted_svnrepo/added-directory\"\n \t'\n \n@@ -213,16 +213,16 @@ test_expect_success 'info added-symlink-file' \"\n \t\tln -s added-file added-symlink-file &&\n \t\tsvn_cmd add added-symlink-file > /dev/null\n \t) &&\n-\t(cd svnwc; svn info added-symlink-file) \\\n+\t(cd svnwc && svn info added-symlink-file) \\\n \t\t> expected.info-added-symlink-file &&\n-\t(cd gitwc; git svn info added-symlink-file) \\\n+\t(cd gitwc && git svn info added-symlink-file) \\\n \t\t> actual.info-added-symlink-file &&\n \ttest_cmp_info expected.info-added-symlink-file \\\n \t\tactual.info-added-symlink-file\n \t\"\n \n test_expect_success 'info --url added-symlink-file' '\n-\ttest \"$(cd gitwc; git svn info --url added-symlink-file)\" \\\n+\ttest \"$(cd gitwc && git svn info --url added-symlink-file)\" \\\n \t     = \"$quoted_svnrepo/added-symlink-file\"\n \t'\n \n@@ -237,16 +237,16 @@ test_expect_success 'info added-symlink-directory' \"\n \t\tln -s added-directory added-symlink-directory &&\n \t\tsvn_cmd add added-symlink-directory > /dev/null\n \t) &&\n-\t(cd svnwc; svn info added-symlink-directory) \\\n+\t(cd svnwc && svn info added-symlink-directory) \\\n \t\t> expected.info-added-symlink-directory &&\n-\t(cd gitwc; git svn info added-symlink-directory) \\\n+\t(cd gitwc && git svn info added-symlink-directory) \\\n \t\t> actual.info-added-symlink-directory &&\n \ttest_cmp_info expected.info-added-symlink-directory \\\n \t\tactual.info-added-symlink-directory\n \t\"\n \n test_expect_success 'info --url added-symlink-directory' '\n-\ttest \"$(cd gitwc; git svn info --url added-symlink-directory)\" \\\n+\ttest \"$(cd gitwc && git svn info --url added-symlink-directory)\" \\\n \t     = \"$quoted_svnrepo/added-symlink-directory\"\n \t'\n \n@@ -259,13 +259,13 @@ test_expect_success 'info deleted-file' \"\n \t\tcd svnwc &&\n \t\tsvn_cmd rm --force file > /dev/null\n \t) &&\n-\t(cd svnwc; svn info file) >expected.info-deleted-file &&\n-\t(cd gitwc; git svn info file) >actual.info-deleted-file &&\n+\t(cd svnwc && svn info file) >expected.info-deleted-file &&\n+\t(cd gitwc && git svn info file) >actual.info-deleted-file &&\n \ttest_cmp_info expected.info-deleted-file actual.info-deleted-file\n \t\"\n \n test_expect_success 'info --url file (deleted)' '\n-\ttest \"$(cd gitwc; git svn info --url file)\" \\\n+\ttest \"$(cd gitwc && git svn info --url file)\" \\\n \t     = \"$quoted_svnrepo/file\"\n \t'\n \n@@ -278,13 +278,13 @@ test_expect_success 'info deleted-directory' \"\n \t\tcd svnwc &&\n \t\tsvn_cmd rm --force directory > /dev/null\n \t) &&\n-\t(cd svnwc; svn info directory) >expected.info-deleted-directory &&\n-\t(cd gitwc; git svn info directory) >actual.info-deleted-directory &&\n+\t(cd svnwc && svn info directory) >expected.info-deleted-directory &&\n+\t(cd gitwc && git svn info directory) >actual.info-deleted-directory &&\n \ttest_cmp_info expected.info-deleted-directory actual.info-deleted-directory\n \t\"\n \n test_expect_success 'info --url directory (deleted)' '\n-\ttest \"$(cd gitwc; git svn info --url directory)\" \\\n+\ttest \"$(cd gitwc && git svn info --url directory)\" \\\n \t     = \"$quoted_svnrepo/directory\"\n \t'\n \n@@ -297,13 +297,13 @@ test_expect_success 'info deleted-symlink-file' \"\n \t\tcd svnwc &&\n \t\tsvn_cmd rm --force symlink-file > /dev/null\n \t) &&\n-\t(cd svnwc; svn info symlink-file) >expected.info-deleted-symlink-file &&\n-\t(cd gitwc; git svn info symlink-file) >actual.info-deleted-symlink-file &&\n+\t(cd svnwc && svn info symlink-file) >expected.info-deleted-symlink-file &&\n+\t(cd gitwc && git svn info symlink-file) >actual.info-deleted-symlink-file &&\n \ttest_cmp_info expected.info-deleted-symlink-file actual.info-deleted-symlink-file\n \t\"\n \n test_expect_success 'info --url symlink-file (deleted)' '\n-\ttest \"$(cd gitwc; git svn info --url symlink-file)\" \\\n+\ttest \"$(cd gitwc && git svn info --url symlink-file)\" \\\n \t     = \"$quoted_svnrepo/symlink-file\"\n \t'\n \n@@ -316,13 +316,13 @@ test_expect_success 'info deleted-symlink-directory' \"\n \t\tcd svnwc &&\n \t\tsvn_cmd rm --force symlink-directory > /dev/null\n \t) &&\n-\t(cd svnwc; svn info symlink-directory) >expected.info-deleted-symlink-directory &&\n-\t(cd gitwc; git svn info symlink-directory) >actual.info-deleted-symlink-directory &&\n+\t(cd svnwc && svn info symlink-directory) >expected.info-deleted-symlink-directory &&\n+\t(cd gitwc && git svn info symlink-directory) >actual.info-deleted-symlink-directory &&\n \ttest_cmp_info expected.info-deleted-symlink-directory actual.info-deleted-symlink-directory\n \t\"\n \n test_expect_success 'info --url symlink-directory (deleted)' '\n-\ttest \"$(cd gitwc; git svn info --url symlink-directory)\" \\\n+\ttest \"$(cd gitwc && git svn info --url symlink-directory)\" \\\n \t     = \"$quoted_svnrepo/symlink-directory\"\n \t'\n \n@@ -331,27 +331,27 @@ test_expect_success 'info --url symlink-directory (deleted)' '\n \n test_expect_success 'info unknown-file' \"\n \techo two > gitwc/unknown-file &&\n-\t(cd gitwc; test_must_fail git svn info unknown-file) \\\n+\t(cd gitwc && test_must_fail git svn info unknown-file) \\\n \t\t 2> actual.info-unknown-file &&\n \tgrep unknown-file actual.info-unknown-file\n \t\"\n \n test_expect_success 'info --url unknown-file' '\n \techo two > gitwc/unknown-file &&\n-\t(cd gitwc; test_must_fail git svn info --url unknown-file) \\\n+\t(cd gitwc && test_must_fail git svn info --url unknown-file) \\\n \t\t 2> actual.info-url-unknown-file &&\n \tgrep unknown-file actual.info-url-unknown-file\n \t'\n \n test_expect_success 'info unknown-directory' \"\n \tmkdir gitwc/unknown-directory svnwc/unknown-directory &&\n-\t(cd gitwc; test_must_fail git svn info unknown-directory) \\\n+\t(cd gitwc && test_must_fail git svn info unknown-directory) \\\n \t\t 2> actual.info-unknown-directory &&\n \tgrep unknown-directory actual.info-unknown-directory\n \t\"\n \n test_expect_success 'info --url unknown-directory' '\n-\t(cd gitwc; test_must_fail git svn info --url unknown-directory) \\\n+\t(cd gitwc && test_must_fail git svn info --url unknown-directory) \\\n \t\t 2> actual.info-url-unknown-directory &&\n \tgrep unknown-directory actual.info-url-unknown-directory\n \t'\n@@ -361,13 +361,13 @@ test_expect_success 'info unknown-symlink-file' \"\n \t\tcd gitwc &&\n \t\tln -s unknown-file unknown-symlink-file\n \t) &&\n-\t(cd gitwc; test_must_fail git svn info unknown-symlink-file) \\\n+\t(cd gitwc && test_must_fail git svn info unknown-symlink-file) \\\n \t\t 2> actual.info-unknown-symlink-file &&\n \tgrep unknown-symlink-file actual.info-unknown-symlink-file\n \t\"\n \n test_expect_success 'info --url unknown-symlink-file' '\n-\t(cd gitwc; test_must_fail git svn info --url unknown-symlink-file) \\\n+\t(cd gitwc && test_must_fail git svn info --url unknown-symlink-file) \\\n \t\t 2> actual.info-url-unknown-symlink-file &&\n \tgrep unknown-symlink-file actual.info-url-unknown-symlink-file\n \t'\n@@ -377,13 +377,13 @@ test_expect_success 'info unknown-symlink-directory' \"\n \t\tcd gitwc &&\n \t\tln -s unknown-directory unknown-symlink-directory\n \t) &&\n-\t(cd gitwc; test_must_fail git svn info unknown-symlink-directory) \\\n+\t(cd gitwc && test_must_fail git svn info unknown-symlink-directory) \\\n \t\t 2> actual.info-unknown-symlink-directory &&\n \tgrep unknown-symlink-directory actual.info-unknown-symlink-directory\n \t\"\n \n test_expect_success 'info --url unknown-symlink-directory' '\n-\t(cd gitwc; test_must_fail git svn info --url unknown-symlink-directory) \\\n+\t(cd gitwc && test_must_fail git svn info --url unknown-symlink-directory) \\\n \t\t 2> actual.info-url-unknown-symlink-directory &&\n \tgrep unknown-symlink-directory actual.info-url-unknown-symlink-directory\n \t'\n-- \n2.18.0.203.gfac676dfb9\n\n"},{"id":"351497","messageId":"20180702002405.3042-25-sunshine@sunshineco.com","threadId":"48813","inReplyTo":"20180702002405.3042-1-sunshine@sunshineco.com","subject":"[PATCH 24/25] t9000-t9999: fix broken &&-chains","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2018-07-02T00:24:04Z","receivedAt":"2018-07-02T00:25:35Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>\n---\n t/t9001-send-email.sh                         |  6 +++---\n t/t9100-git-svn-basic.sh                      |  2 +-\n t/t9101-git-svn-props.sh                      |  2 +-\n t/t9122-git-svn-author.sh                     |  6 +++---\n t/t9129-git-svn-i18n-commitencoding.sh        |  2 +-\n t/t9130-git-svn-authors-file.sh               |  4 ++--\n t/t9134-git-svn-ignore-paths.sh               |  6 +++---\n t/t9137-git-svn-dcommit-clobber-series.sh     |  2 +-\n t/t9138-git-svn-authors-prog.sh               |  6 +++---\n t/t9146-git-svn-empty-dirs.sh                 | 20 +++++++++----------\n t/t9147-git-svn-include-paths.sh              |  6 +++---\n t/t9152-svn-empty-dirs-after-gc.sh            |  2 +-\n t/t9164-git-svn-dcommit-concurrent.sh         |  2 +-\n ...65-git-svn-fetch-merge-branch-of-branch.sh |  2 +-\n t/t9200-git-cvsexportcommit.sh                |  6 +++---\n t/t9302-fast-import-unpack-limit.sh           |  2 +-\n t/t9400-git-cvsserver-server.sh               |  6 +++---\n t/t9600-cvsimport.sh                          |  2 +-\n t/t9806-git-p4-options.sh                     |  2 +-\n t/t9810-git-p4-rcs.sh                         |  2 +-\n t/t9811-git-p4-label-import.sh                |  2 +-\n t/t9815-git-p4-submit-fail.sh                 |  2 +-\n t/t9830-git-p4-symlink-dir.sh                 |  2 +-\n t/t9831-git-p4-triggers.sh                    |  2 +-\n t/t9902-completion.sh                         |  4 ++--\n t/t9903-bash-prompt.sh                        |  2 +-\n 26 files changed, 51 insertions(+), 51 deletions(-)\n\ndiff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh\nindex 776769fe0d..53314ff54e 100755\n--- a/t/t9001-send-email.sh\n+++ b/t/t9001-send-email.sh\n@@ -330,7 +330,7 @@ test_expect_success $PREREQ 'Show all headers' '\n \n test_expect_success $PREREQ 'Prompting works' '\n \tclean_fake_sendmail &&\n-\t(echo \"to@example.com\"\n+\t(echo \"to@example.com\" &&\n \t echo \"\"\n \t) | GIT_SEND_EMAIL_NOTTY=1 git send-email \\\n \t\t--smtp-server=\"$(pwd)/fake.sendmail\" \\\n@@ -470,8 +470,8 @@ test_expect_success $PREREQ 'Invalid In-Reply-To' '\n \n test_expect_success $PREREQ 'Valid In-Reply-To when prompting' '\n \tclean_fake_sendmail &&\n-\t(echo \"From Example <from@example.com>\"\n-\t echo \"To Example <to@example.com>\"\n+\t(echo \"From Example <from@example.com>\" &&\n+\t echo \"To Example <to@example.com>\" &&\n \t echo \"\"\n \t) | GIT_SEND_EMAIL_NOTTY=1 git send-email \\\n \t\t--smtp-server=\"$(pwd)/fake.sendmail\" \\\ndiff --git a/t/t9100-git-svn-basic.sh b/t/t9100-git-svn-basic.sh\nindex c937330a5f..9af6078844 100755\n--- a/t/t9100-git-svn-basic.sh\n+++ b/t/t9100-git-svn-basic.sh\n@@ -31,7 +31,7 @@ test_expect_success \\\n \t(\n \t\tcd import &&\n \t\techo foo >foo &&\n-\t\tln -s foo foo.link\n+\t\tln -s foo foo.link &&\n \t\tmkdir -p dir/a/b/c/d/e &&\n \t\techo \"deep dir\" >dir/a/b/c/d/e/file &&\n \t\tmkdir bar &&\ndiff --git a/t/t9101-git-svn-props.sh b/t/t9101-git-svn-props.sh\nindex 07bfb63777..8a5c8dc1aa 100755\n--- a/t/t9101-git-svn-props.sh\n+++ b/t/t9101-git-svn-props.sh\n@@ -149,7 +149,7 @@ test_expect_success 'test show-ignore' \"\n \t\tsvn_cmd up &&\n \t\tsvn_cmd propset -R svn:ignore '\n no-such-file*\n-' .\n+' . &&\n \t\tsvn_cmd commit -m 'propset svn:ignore'\n \t) &&\n \tgit svn show-ignore > show-ignore.got &&\ndiff --git a/t/t9122-git-svn-author.sh b/t/t9122-git-svn-author.sh\nindex 30013b7bb9..9e8fe38e7e 100755\n--- a/t/t9122-git-svn-author.sh\n+++ b/t/t9122-git-svn-author.sh\n@@ -7,8 +7,8 @@ test_expect_success 'setup svn repository' '\n \tsvn_cmd checkout \"$svnrepo\" work.svn &&\n \t(\n \t\tcd work.svn &&\n-\t\techo >file\n-\t\tsvn_cmd add file\n+\t\techo >file &&\n+\t\tsvn_cmd add file &&\n \t\tsvn_cmd commit -m \"first commit\" file\n \t)\n '\n@@ -17,7 +17,7 @@ test_expect_success 'interact with it via git svn' '\n \tmkdir work.git &&\n \t(\n \t\tcd work.git &&\n-\t\tgit svn init \"$svnrepo\"\n+\t\tgit svn init \"$svnrepo\" &&\n \t\tgit svn fetch &&\n \n \t\techo modification >file &&\ndiff --git a/t/t9129-git-svn-i18n-commitencoding.sh b/t/t9129-git-svn-i18n-commitencoding.sh\nindex 8dbd6476fa..2c213ae654 100755\n--- a/t/t9129-git-svn-i18n-commitencoding.sh\n+++ b/t/t9129-git-svn-i18n-commitencoding.sh\n@@ -51,7 +51,7 @@ do\n \t\tgit add F &&\n \t\tgit commit -a -F \"$TEST_DIRECTORY\"/t3900/$H.txt &&\n \t\tE=$(git cat-file commit HEAD | sed -ne \"s/^encoding //p\") &&\n-\t\ttest \"z$E\" = \"z$H\"\n+\t\ttest \"z$E\" = \"z$H\" &&\n \t\tcompare_git_head_with \"$TEST_DIRECTORY\"/t3900/$H.txt\n \t)\n \t'\ndiff --git a/t/t9130-git-svn-authors-file.sh b/t/t9130-git-svn-authors-file.sh\nindex d8262854bb..cb764bcadc 100755\n--- a/t/t9130-git-svn-authors-file.sh\n+++ b/t/t9130-git-svn-authors-file.sh\n@@ -25,7 +25,7 @@ test_expect_success 'start import with incomplete authors file' '\n \n test_expect_success 'imported 2 revisions successfully' '\n \t(\n-\t\tcd x\n+\t\tcd x &&\n \t\tgit rev-list refs/remotes/git-svn >actual &&\n \t\ttest_line_count = 2 actual &&\n \t\tgit rev-list -1 --pretty=raw refs/remotes/git-svn >actual &&\n@@ -42,7 +42,7 @@ EOF\n \n test_expect_success 'continues to import once authors have been added' '\n \t(\n-\t\tcd x\n+\t\tcd x &&\n \t\tgit svn fetch --authors-file=../svn-authors &&\n \t\tgit rev-list refs/remotes/git-svn >actual &&\n \t\ttest_line_count = 4 actual &&\ndiff --git a/t/t9134-git-svn-ignore-paths.sh b/t/t9134-git-svn-ignore-paths.sh\nindex 09ff10cd9b..fff49c4100 100755\n--- a/t/t9134-git-svn-ignore-paths.sh\n+++ b/t/t9134-git-svn-ignore-paths.sh\n@@ -82,7 +82,7 @@ test_expect_success 'update git svn-cloned repo (option ignore)' '\n test_expect_success 'SVN-side change inside of ignored www' '\n \t(\n \t\tcd s &&\n-\t\techo zaq >> www/test_www.txt\n+\t\techo zaq >> www/test_www.txt &&\n \t\tsvn_cmd commit -m \"SVN-side change inside of www/test_www.txt\" &&\n \t\tsvn_cmd up &&\n \t\tsvn_cmd log -v | fgrep \"SVN-side change inside of www/test_www.txt\"\n@@ -114,8 +114,8 @@ test_expect_success 'update git svn-cloned repo (option ignore)' '\n test_expect_success 'SVN-side change in and out of ignored www' '\n \t(\n \t\tcd s &&\n-\t\techo cvf >> www/test_www.txt\n-\t\techo ygg >> qqq/test_qqq.txt\n+\t\techo cvf >> www/test_www.txt &&\n+\t\techo ygg >> qqq/test_qqq.txt &&\n \t\tsvn_cmd commit -m \"SVN-side change in and out of ignored www\" &&\n \t\tsvn_cmd up &&\n \t\tsvn_cmd log -v | fgrep \"SVN-side change in and out of ignored www\"\ndiff --git a/t/t9137-git-svn-dcommit-clobber-series.sh b/t/t9137-git-svn-dcommit-clobber-series.sh\nindex 5fa07a369f..067b15bad2 100755\n--- a/t/t9137-git-svn-dcommit-clobber-series.sh\n+++ b/t/t9137-git-svn-dcommit-clobber-series.sh\n@@ -7,7 +7,7 @@ test_description='git svn dcommit clobber series'\n test_expect_success 'initialize repo' '\n \tmkdir import &&\n \t(cd import &&\n-\tawk \"BEGIN { for (i = 1; i < 64; i++) { print i } }\" > file\n+\tawk \"BEGIN { for (i = 1; i < 64; i++) { print i } }\" > file &&\n \tsvn_cmd import -m \"initial\" . \"$svnrepo\"\n \t) &&\n \tgit svn init \"$svnrepo\" &&\ndiff --git a/t/t9138-git-svn-authors-prog.sh b/t/t9138-git-svn-authors-prog.sh\nindex 93ef44fae8..027b416720 100755\n--- a/t/t9138-git-svn-authors-prog.sh\n+++ b/t/t9138-git-svn-authors-prog.sh\n@@ -38,7 +38,7 @@ test_expect_success 'import authors with prog and file' '\n \n test_expect_success 'imported 6 revisions successfully' '\n \t(\n-\t\tcd x\n+\t\tcd x &&\n \t\tgit rev-list refs/remotes/git-svn >actual &&\n \t\ttest_line_count = 6 actual\n \t)\n@@ -46,7 +46,7 @@ test_expect_success 'imported 6 revisions successfully' '\n \n test_expect_success 'authors-prog ran correctly' '\n \t(\n-\t\tcd x\n+\t\tcd x &&\n \t\tgit rev-list -1 --pretty=raw refs/remotes/git-svn~1 >actual &&\n \t\tgrep \"^author ee-foo <ee-foo@example\\.com> \" actual &&\n \t\tgit rev-list -1 --pretty=raw refs/remotes/git-svn~2 >actual &&\n@@ -62,7 +62,7 @@ test_expect_success 'authors-prog ran correctly' '\n \n test_expect_success 'authors-file overrode authors-prog' '\n \t(\n-\t\tcd x\n+\t\tcd x &&\n \t\tgit rev-list -1 --pretty=raw refs/remotes/git-svn >actual &&\n \t\tgrep \"^author FFFFFFF FFFFFFF <fFf@other\\.example\\.com> \" actual\n \t)\ndiff --git a/t/t9146-git-svn-empty-dirs.sh b/t/t9146-git-svn-empty-dirs.sh\nindex 6d3130e618..5f91c0d68b 100755\n--- a/t/t9146-git-svn-empty-dirs.sh\n+++ b/t/t9146-git-svn-empty-dirs.sh\n@@ -21,7 +21,7 @@ test_expect_success 'empty directories exist' '\n \t\tdo\n \t\t\tif ! test -d \"$i\"\n \t\t\tthen\n-\t\t\t\techo >&2 \"$i does not exist\"\n+\t\t\t\techo >&2 \"$i does not exist\" &&\n \t\t\t\texit 1\n \t\t\tfi\n \t\tdone\n@@ -38,7 +38,7 @@ test_expect_success 'option automkdirs set to false' '\n \t\tdo\n \t\t\tif test -d \"$i\"\n \t\t\tthen\n-\t\t\t\techo >&2 \"$i exists\"\n+\t\t\t\techo >&2 \"$i exists\" &&\n \t\t\t\texit 1\n \t\t\tfi\n \t\tdone\n@@ -63,7 +63,7 @@ test_expect_success 'git svn mkdirs recreates empty directories' '\n \t\tdo\n \t\t\tif ! test -d \"$i\"\n \t\t\tthen\n-\t\t\t\techo >&2 \"$i does not exist\"\n+\t\t\t\techo >&2 \"$i does not exist\" &&\n \t\t\t\texit 1\n \t\t\tfi\n \t\tdone\n@@ -79,21 +79,21 @@ test_expect_success 'git svn mkdirs -r works' '\n \t\tdo\n \t\t\tif ! test -d \"$i\"\n \t\t\tthen\n-\t\t\t\techo >&2 \"$i does not exist\"\n+\t\t\t\techo >&2 \"$i does not exist\" &&\n \t\t\t\texit 1\n \t\t\tfi\n-\t\tdone\n+\t\tdone &&\n \n \t\tif test -d \"! !\"\n \t\tthen\n-\t\t\techo >&2 \"$i should not exist\"\n+\t\t\techo >&2 \"$i should not exist\" &&\n \t\t\texit 1\n-\t\tfi\n+\t\tfi &&\n \n \t\tgit svn mkdirs -r8 &&\n \t\tif ! test -d \"! !\"\n \t\tthen\n-\t\t\techo >&2 \"$i not exist\"\n+\t\t\techo >&2 \"$i not exist\" &&\n \t\t\texit 1\n \t\tfi\n \t)\n@@ -115,7 +115,7 @@ test_expect_success 'empty directories in trunk exist' '\n \t\tdo\n \t\t\tif ! test -d \"$i\"\n \t\t\tthen\n-\t\t\t\techo >&2 \"$i does not exist\"\n+\t\t\t\techo >&2 \"$i does not exist\" &&\n \t\t\t\texit 1\n \t\t\tfi\n \t\tdone\n@@ -148,7 +148,7 @@ test_expect_success 'git svn gc-ed files work' '\n \t\t\tdo\n \t\t\t\tif ! test -d \"$i\"\n \t\t\t\tthen\n-\t\t\t\t\techo >&2 \"$i does not exist\"\n+\t\t\t\t\techo >&2 \"$i does not exist\" &&\n \t\t\t\t\texit 1\n \t\t\t\tfi\n \t\t\tdone\ndiff --git a/t/t9147-git-svn-include-paths.sh b/t/t9147-git-svn-include-paths.sh\nindex a90ff58629..d292bf9f55 100755\n--- a/t/t9147-git-svn-include-paths.sh\n+++ b/t/t9147-git-svn-include-paths.sh\n@@ -84,7 +84,7 @@ test_expect_success 'update git svn-cloned repo (option include)' '\n test_expect_success 'SVN-side change inside of ignored www' '\n \t(\n \t\tcd s &&\n-\t\techo zaq >> www/test_www.txt\n+\t\techo zaq >> www/test_www.txt &&\n \t\tsvn_cmd commit -m \"SVN-side change inside of www/test_www.txt\" &&\n \t\tsvn_cmd up &&\n \t\tsvn_cmd log -v | fgrep \"SVN-side change inside of www/test_www.txt\"\n@@ -116,8 +116,8 @@ test_expect_success 'update git svn-cloned repo (option include)' '\n test_expect_success 'SVN-side change in and out of included qqq' '\n \t(\n \t\tcd s &&\n-\t\techo cvf >> www/test_www.txt\n-\t\techo ygg >> qqq/test_qqq.txt\n+\t\techo cvf >> www/test_www.txt &&\n+\t\techo ygg >> qqq/test_qqq.txt &&\n \t\tsvn_cmd commit -m \"SVN-side change in and out of ignored www\" &&\n \t\tsvn_cmd up &&\n \t\tsvn_cmd log -v | fgrep \"SVN-side change in and out of ignored www\"\ndiff --git a/t/t9152-svn-empty-dirs-after-gc.sh b/t/t9152-svn-empty-dirs-after-gc.sh\nindex 301e779709..89f285d082 100755\n--- a/t/t9152-svn-empty-dirs-after-gc.sh\n+++ b/t/t9152-svn-empty-dirs-after-gc.sh\n@@ -30,7 +30,7 @@ test_expect_success 'git svn mkdirs recreates empty directories after git svn gc\n \t\tdo\n \t\t\tif ! test -d \"$i\"\n \t\t\tthen\n-\t\t\t\techo >&2 \"$i does not exist\"\n+\t\t\t\techo >&2 \"$i does not exist\" &&\n \t\t\t\texit 1\n \t\t\tfi\n \t\tdone\ndiff --git a/t/t9164-git-svn-dcommit-concurrent.sh b/t/t9164-git-svn-dcommit-concurrent.sh\nindex d8464d4218..90346ff4e9 100755\n--- a/t/t9164-git-svn-dcommit-concurrent.sh\n+++ b/t/t9164-git-svn-dcommit-concurrent.sh\n@@ -12,7 +12,7 @@ test_expect_success 'setup svn repository' '\n \tsvn_cmd checkout \"$svnrepo\" work.svn &&\n \t(\n \t\tcd work.svn &&\n-\t\techo >file && echo > auto_updated_file\n+\t\techo >file && echo > auto_updated_file &&\n \t\tsvn_cmd add file auto_updated_file &&\n \t\tsvn_cmd commit -m \"initial commit\"\n \t) &&\ndiff --git a/t/t9165-git-svn-fetch-merge-branch-of-branch.sh b/t/t9165-git-svn-fetch-merge-branch-of-branch.sh\nindex fa3ef3b1f7..a4813c2b09 100755\n--- a/t/t9165-git-svn-fetch-merge-branch-of-branch.sh\n+++ b/t/t9165-git-svn-fetch-merge-branch-of-branch.sh\n@@ -39,7 +39,7 @@ test_expect_success 'initialize source svn repo' '\n \t\tsvn_cmd commit -m trunk &&\n \t\tsvn_cmd switch \"$svnrepo\"/branches/branch2 &&\n \t\tsvn_cmd merge \"$svnrepo\"/trunk &&\n-\t\tsvn_cmd commit -m \"merge trunk\"\n+\t\tsvn_cmd commit -m \"merge trunk\" &&\n \t\tsvn_cmd switch \"$svnrepo\"/trunk &&\n \t\tsvn_cmd merge --reintegrate \"$svnrepo\"/branches/branch2 &&\n \t\tsvn_cmd commit -m \"merge branch2\"\ndiff --git a/t/t9200-git-cvsexportcommit.sh b/t/t9200-git-cvsexportcommit.sh\nindex 1319415ba8..cd61288aa1 100755\n--- a/t/t9200-git-cvsexportcommit.sh\n+++ b/t/t9200-git-cvsexportcommit.sh\n@@ -187,7 +187,7 @@ test_expect_success \\\n       git commit -a -m \"Update with spaces\" &&\n       id=$(git rev-list --max-count=1 HEAD) &&\n       (cd \"$CVSWORK\" &&\n-      git cvsexportcommit -c $id\n+      git cvsexportcommit -c $id &&\n       check_entries \"G g\" \"with spaces.png/1.2/-kb|with spaces.txt/1.2/\"\n       )'\n \n@@ -245,7 +245,7 @@ test_expect_success FILEMODE \\\n       git add G/off &&\n       git commit -a -m \"Execute test\" &&\n       (cd \"$CVSWORK\" &&\n-      git cvsexportcommit -c HEAD\n+      git cvsexportcommit -c HEAD &&\n       test -x G/on &&\n       ! test -x G/off\n       )'\n@@ -303,7 +303,7 @@ test_expect_success 're-commit a removed filename which remains in CVS attic' '\n     git add attic_gremlin &&\n     git commit -m \"Added attic_gremlin\" &&\n \tgit cvsexportcommit -w \"$CVSWORK\" -c HEAD &&\n-    (cd \"$CVSWORK\"; cvs -Q update -d) &&\n+    (cd \"$CVSWORK\" && cvs -Q update -d) &&\n     test -f \"$CVSWORK/attic_gremlin\"\n '\n \ndiff --git a/t/t9302-fast-import-unpack-limit.sh b/t/t9302-fast-import-unpack-limit.sh\nindex a04de14677..bb1c39cfcc 100755\n--- a/t/t9302-fast-import-unpack-limit.sh\n+++ b/t/t9302-fast-import-unpack-limit.sh\n@@ -80,7 +80,7 @@ test_expect_success 'lookups after checkpoint works' '\n \t\tdo\n \t\t\tif test $n -gt 30\n \t\t\tthen\n-\t\t\t\techo >&2 \"checkpoint did not update branch\"\n+\t\t\t\techo >&2 \"checkpoint did not update branch\" &&\n \t\t\t\texit 1\n \t\t\telse\n \t\t\t\tn=$(($n + 1))\ndiff --git a/t/t9400-git-cvsserver-server.sh b/t/t9400-git-cvsserver-server.sh\nindex 6b09da79bf..a5e5dca753 100755\n--- a/t/t9400-git-cvsserver-server.sh\n+++ b/t/t9400-git-cvsserver-server.sh\n@@ -371,7 +371,7 @@ test_expect_success 'cvs update (merge)' \\\n   'echo Line 0 >expected &&\n    for i in 1 2 3 4 5 6 7\n    do\n-     echo Line $i >>merge\n+     echo Line $i >>merge &&\n      echo Line $i >>expected\n    done &&\n    echo Line 8 >>expected &&\n@@ -382,7 +382,7 @@ test_expect_success 'cvs update (merge)' \\\n    GIT_CONFIG=\"$git_config\" cvs -Q update &&\n    test \"$(echo $(grep merge CVS/Entries|cut -d/ -f2,3,5))\" = \"merge/1.1/\" &&\n    test_cmp merge ../merge &&\n-   ( echo Line 0; cat merge ) >merge.tmp &&\n+   ( echo Line 0 && cat merge ) >merge.tmp &&\n    mv merge.tmp merge &&\n    cd \"$WORKDIR\" &&\n    echo Line 8 >>merge &&\n@@ -410,7 +410,7 @@ do\n done\n \n test_expect_success 'cvs update (conflict merge)' \\\n-  '( echo LINE 0; cat merge ) >merge.tmp &&\n+  '( echo LINE 0 && cat merge ) >merge.tmp &&\n    mv merge.tmp merge &&\n    git add merge &&\n    git commit -q -m \"Merge test (conflict)\" &&\ndiff --git a/t/t9600-cvsimport.sh b/t/t9600-cvsimport.sh\nindex 804ce3850f..5dfee07d9a 100755\n--- a/t/t9600-cvsimport.sh\n+++ b/t/t9600-cvsimport.sh\n@@ -135,7 +135,7 @@ test_expect_success PERL 'second update has correct .git/cvs-revisions' '\n \n \t(cd module-git &&\n \t git log --format=\"o_fortuna 1.1 %H\" -1 HEAD^^ &&\n-\t git log --format=\"o_fortuna 1.2 %H\" -1 HEAD^\n+\t git log --format=\"o_fortuna 1.2 %H\" -1 HEAD^ &&\n \t git log --format=\"tick 1.1 %H\" -1 HEAD) > expected &&\n \ttest_cmp expected module-git/.git/cvs-revisions\n '\ndiff --git a/t/t9806-git-p4-options.sh b/t/t9806-git-p4-options.sh\nindex 1ab76c4246..3f5291b857 100755\n--- a/t/t9806-git-p4-options.sh\n+++ b/t/t9806-git-p4-options.sh\n@@ -134,7 +134,7 @@ test_expect_success 'clone --changesfile' '\n \t(\n \t\tcd \"$git\" &&\n \t\tgit log --oneline p4/master >lines &&\n-\t\ttest_line_count = 2 lines\n+\t\ttest_line_count = 2 lines &&\n \t\ttest_path_is_file file1 &&\n \t\ttest_path_is_missing file2 &&\n \t\ttest_path_is_file file3\ndiff --git a/t/t9810-git-p4-rcs.sh b/t/t9810-git-p4-rcs.sh\nindex 8134ab439b..cc53debe19 100755\n--- a/t/t9810-git-p4-rcs.sh\n+++ b/t/t9810-git-p4-rcs.sh\n@@ -161,7 +161,7 @@ test_expect_success 'cleanup after failure' '\n test_expect_success 'ktext expansion should not expand multi-line $File::' '\n \t(\n \t\tcd \"$cli\" &&\n-\t\tcat >lv.pm <<-\\EOF\n+\t\tcat >lv.pm <<-\\EOF &&\n \t\tmy $wanted = sub { my $f = $File::Find::name;\n \t\t\t\t    if ( -f && $f =~ /foo/ ) {\n \t\tEOF\ndiff --git a/t/t9811-git-p4-label-import.sh b/t/t9811-git-p4-label-import.sh\nindex decb66ba30..602b0a5d5c 100755\n--- a/t/t9811-git-p4-label-import.sh\n+++ b/t/t9811-git-p4-label-import.sh\n@@ -133,7 +133,7 @@ test_expect_success 'export git tags to p4' '\n \t\tp4 labels ... | grep LIGHTWEIGHT_TAG &&\n \t\tp4 label -o GIT_TAG_1 | grep \"tag created in git:xyzzy\" &&\n \t\tp4 sync ...@GIT_TAG_1 &&\n-\t\t! test -f main/f10\n+\t\t! test -f main/f10 &&\n \t\tp4 sync ...@GIT_TAG_2 &&\n \t\ttest -f main/f10\n \t)\ndiff --git a/t/t9815-git-p4-submit-fail.sh b/t/t9815-git-p4-submit-fail.sh\nindex 37b42d03a2..eaf03a6563 100755\n--- a/t/t9815-git-p4-submit-fail.sh\n+++ b/t/t9815-git-p4-submit-fail.sh\n@@ -394,7 +394,7 @@ test_expect_success 'cleanup rename after submit cancel' '\n \t(\n \t\tcd \"$cli\" &&\n \t\ttest_path_is_missing text2 &&\n-\t\tp4 fstat -T action text2 2>&1 | grep \"no such file\"\n+\t\tp4 fstat -T action text2 2>&1 | grep \"no such file\" &&\n \t\ttest_path_is_file text &&\n \t\t! p4 fstat -T action text\n \t)\ndiff --git a/t/t9830-git-p4-symlink-dir.sh b/t/t9830-git-p4-symlink-dir.sh\nindex 3dc528bb1e..2ad1b0810d 100755\n--- a/t/t9830-git-p4-symlink-dir.sh\n+++ b/t/t9830-git-p4-symlink-dir.sh\n@@ -30,7 +30,7 @@ test_expect_success 'symlinked directory' '\n \t(\n \t\tcd \"$cli\" &&\n \t\tp4 sync &&\n-\t\ttest -L some/sub/directory/subdir2\n+\t\ttest -L some/sub/directory/subdir2 &&\n \t\ttest_path_is_file some/sub/directory/subdir2/file.t\n \t)\n \ndiff --git a/t/t9831-git-p4-triggers.sh b/t/t9831-git-p4-triggers.sh\nindex bbcf14c664..be44c9751a 100755\n--- a/t/t9831-git-p4-triggers.sh\n+++ b/t/t9831-git-p4-triggers.sh\n@@ -13,7 +13,7 @@ test_expect_success 'init depot' '\n \t\tcd \"$cli\" &&\n \t\techo file1 >file1 &&\n \t\tp4 add file1 &&\n-\t\tp4 submit -d \"change 1\"\n+\t\tp4 submit -d \"change 1\" &&\n \t\techo file2 >file2 &&\n \t\tp4 add file2 &&\n \t\tp4 submit -d \"change 2\"\ndiff --git a/t/t9902-completion.sh b/t/t9902-completion.sh\nindex 3b3a7b66e4..5ff43b9cbb 100755\n--- a/t/t9902-completion.sh\n+++ b/t/t9902-completion.sh\n@@ -1103,7 +1103,7 @@ test_expect_success '__git_complete_refs - remote' '\n \tmaster-in-other Z\n \tEOF\n \t(\n-\t\tcur=\n+\t\tcur= &&\n \t\t__git_complete_refs --remote=other &&\n \t\tprint_comp\n \t) &&\n@@ -1122,7 +1122,7 @@ test_expect_success '__git_complete_refs - track' '\n \tmaster-in-other Z\n \tEOF\n \t(\n-\t\tcur=\n+\t\tcur= &&\n \t\t__git_complete_refs --track &&\n \t\tprint_comp\n \t) &&\ndiff --git a/t/t9903-bash-prompt.sh b/t/t9903-bash-prompt.sh\nindex c3b89ae783..04440685a6 100755\n--- a/t/t9903-bash-prompt.sh\n+++ b/t/t9903-bash-prompt.sh\n@@ -529,7 +529,7 @@ test_expect_success 'prompt - bash color pc mode - branch name' '\n \tprintf \"BEFORE: (${c_green}\\${__git_ps1_branch_name}${c_clear}):AFTER\\\\nmaster\" >expected &&\n \t(\n \t\tGIT_PS1_SHOWCOLORHINTS=y &&\n-\t\t__git_ps1 \"BEFORE:\" \":AFTER\" >\"$actual\"\n+\t\t__git_ps1 \"BEFORE:\" \":AFTER\" >\"$actual\" &&\n \t\tprintf \"%s\\\\n%s\" \"$PS1\" \"${__git_ps1_branch_name}\" >\"$actual\"\n \t) &&\n \ttest_cmp expected \"$actual\"\n-- \n2.18.0.203.gfac676dfb9\n\n"},{"id":"351498","messageId":"20180702002405.3042-24-sunshine@sunshineco.com","threadId":"48813","inReplyTo":"20180702002405.3042-1-sunshine@sunshineco.com","subject":"[PATCH 23/25] t7000-t7999: fix broken &&-chains","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2018-07-02T00:24:03Z","receivedAt":"2018-07-02T00:25:38Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>\n---\n t/t7001-mv.sh                  |  2 +-\n t/t7201-co.sh                  | 40 +++++++++++++-------------\n t/t7400-submodule-basic.sh     |  2 +-\n t/t7406-submodule-update.sh    |  6 ++--\n t/t7408-submodule-reference.sh |  2 +-\n t/t7501-commit.sh              | 52 +++++++++++++++++-----------------\n t/t7506-status-submodule.sh    | 10 +++----\n 7 files changed, 57 insertions(+), 57 deletions(-)\n\ndiff --git a/t/t7001-mv.sh b/t/t7001-mv.sh\nindex cc3fd2baf2..9e59e5a5dd 100755\n--- a/t/t7001-mv.sh\n+++ b/t/t7001-mv.sh\n@@ -509,7 +509,7 @@ test_expect_success 'moving nested submodules' '\n \t\ttouch nested_level1 &&\n \t\tgit init &&\n \t\tgit add . &&\n-\t\tgit commit -m \"nested level 1\"\n+\t\tgit commit -m \"nested level 1\" &&\n \t\tgit submodule add ../sub_nested_nested &&\n \t\tgit commit -m \"add nested level 2\"\n \t) &&\ndiff --git a/t/t7201-co.sh b/t/t7201-co.sh\nindex 8d8a63a24b..94cb039a03 100755\n--- a/t/t7201-co.sh\n+++ b/t/t7201-co.sh\n@@ -528,10 +528,10 @@ test_expect_success 'checkout with --merge' '\n \tcat sample >filf &&\n \tgit checkout -m -- fild file filf &&\n \t(\n-\t\techo \"<<<<<<< ours\"\n-\t\techo ourside\n-\t\techo \"=======\"\n-\t\techo theirside\n+\t\techo \"<<<<<<< ours\" &&\n+\t\techo ourside &&\n+\t\techo \"=======\" &&\n+\t\techo theirside &&\n \t\techo \">>>>>>> theirs\"\n \t) >merged &&\n \ttest_cmp expect fild &&\n@@ -549,12 +549,12 @@ test_expect_success 'checkout with --merge, in diff3 -m style' '\n \tcat sample >filf &&\n \tgit checkout -m -- fild file filf &&\n \t(\n-\t\techo \"<<<<<<< ours\"\n-\t\techo ourside\n-\t\techo \"||||||| base\"\n-\t\techo original\n-\t\techo \"=======\"\n-\t\techo theirside\n+\t\techo \"<<<<<<< ours\" &&\n+\t\techo ourside &&\n+\t\techo \"||||||| base\" &&\n+\t\techo original &&\n+\t\techo \"=======\" &&\n+\t\techo theirside &&\n \t\techo \">>>>>>> theirs\"\n \t) >merged &&\n \ttest_cmp expect fild &&\n@@ -572,10 +572,10 @@ test_expect_success 'checkout --conflict=merge, overriding config' '\n \tcat sample >filf &&\n \tgit checkout --conflict=merge -- fild file filf &&\n \t(\n-\t\techo \"<<<<<<< ours\"\n-\t\techo ourside\n-\t\techo \"=======\"\n-\t\techo theirside\n+\t\techo \"<<<<<<< ours\" &&\n+\t\techo ourside &&\n+\t\techo \"=======\" &&\n+\t\techo theirside &&\n \t\techo \">>>>>>> theirs\"\n \t) >merged &&\n \ttest_cmp expect fild &&\n@@ -593,12 +593,12 @@ test_expect_success 'checkout --conflict=diff3' '\n \tcat sample >filf &&\n \tgit checkout --conflict=diff3 -- fild file filf &&\n \t(\n-\t\techo \"<<<<<<< ours\"\n-\t\techo ourside\n-\t\techo \"||||||| base\"\n-\t\techo original\n-\t\techo \"=======\"\n-\t\techo theirside\n+\t\techo \"<<<<<<< ours\" &&\n+\t\techo ourside &&\n+\t\techo \"||||||| base\" &&\n+\t\techo original &&\n+\t\techo \"=======\" &&\n+\t\techo theirside &&\n \t\techo \">>>>>>> theirs\"\n \t) >merged &&\n \ttest_cmp expect fild &&\ndiff --git a/t/t7400-submodule-basic.sh b/t/t7400-submodule-basic.sh\nindex 401adaed32..76cf522a08 100755\n--- a/t/t7400-submodule-basic.sh\n+++ b/t/t7400-submodule-basic.sh\n@@ -818,7 +818,7 @@ test_expect_success '../bar/a/b/c works with relative local path - ../foo/bar.gi\n \t\tcp pristine-.git-config .git/config &&\n \t\tcp pristine-.gitmodules .gitmodules &&\n \t\tmkdir -p a/b/c &&\n-\t\t(cd a/b/c; git init) &&\n+\t\t(cd a/b/c && git init) &&\n \t\tgit config remote.origin.url ../foo/bar.git &&\n \t\tgit submodule add ../bar/a/b/c ./a/b/c &&\n \t\tgit submodule init &&\ndiff --git a/t/t7406-submodule-update.sh b/t/t7406-submodule-update.sh\nindex 9e0d31700e..f604ef7a72 100755\n--- a/t/t7406-submodule-update.sh\n+++ b/t/t7406-submodule-update.sh\n@@ -865,9 +865,9 @@ test_expect_success 'submodule update places git-dir in superprojects git-dir re\n \t (cd submodule/subsubmodule &&\n \t  git log > ../../expected\n \t ) &&\n-\t (cd .git/modules/submodule/modules/subsubmodule\n+\t (cd .git/modules/submodule/modules/subsubmodule &&\n \t  git log > ../../../../../actual\n-\t )\n+\t ) &&\n \t test_cmp actual expected\n \t)\n '\n@@ -886,7 +886,7 @@ test_expect_success 'submodule update properly revives a moved submodule' '\n \t git commit -am \"pre move\" &&\n \t H2=$(git rev-parse --short HEAD) &&\n \t git status | sed \"s/$H/XXX/\" >expect &&\n-\t H=$(cd submodule2; git rev-parse HEAD) &&\n+\t H=$(cd submodule2 && git rev-parse HEAD) &&\n \t git rm --cached submodule2 &&\n \t rm -rf submodule2 &&\n \t mkdir -p \"moved/sub module\" &&\ndiff --git a/t/t7408-submodule-reference.sh b/t/t7408-submodule-reference.sh\nindex 08d9add05e..34ac28c056 100755\n--- a/t/t7408-submodule-reference.sh\n+++ b/t/t7408-submodule-reference.sh\n@@ -148,7 +148,7 @@ test_expect_success 'preparing second superproject with a nested submodule plus\n \t\tcd supersuper &&\n \t\techo \"I am super super.\" >file &&\n \t\tgit add file &&\n-\t\tgit commit -m B-super-super-initial\n+\t\tgit commit -m B-super-super-initial &&\n \t\tgit submodule add \"file://$base_dir/super\" subwithsub &&\n \t\tgit commit -m B-super-super-added &&\n \t\tgit submodule update --init --recursive &&\ndiff --git a/t/t7501-commit.sh b/t/t7501-commit.sh\nindex 282ff42331..51646d8019 100755\n--- a/t/t7501-commit.sh\n+++ b/t/t7501-commit.sh\n@@ -411,8 +411,8 @@ test_expect_success 'sign off (1)' '\n \tgit commit -s -m \"thank you\" &&\n \tgit cat-file commit HEAD | sed -e \"1,/^\\$/d\" >actual &&\n \t(\n-\t\techo thank you\n-\t\techo\n+\t\techo thank you &&\n+\t\techo &&\n \t\tgit var GIT_COMMITTER_IDENT |\n \t\tsed -e \"s/>.*/>/\" -e \"s/^/Signed-off-by: /\"\n \t) >expected &&\n@@ -430,9 +430,9 @@ test_expect_success 'sign off (2)' '\n $existing\" &&\n \tgit cat-file commit HEAD | sed -e \"1,/^\\$/d\" >actual &&\n \t(\n-\t\techo thank you\n-\t\techo\n-\t\techo $existing\n+\t\techo thank you &&\n+\t\techo &&\n+\t\techo $existing &&\n \t\tgit var GIT_COMMITTER_IDENT |\n \t\tsed -e \"s/>.*/>/\" -e \"s/^/Signed-off-by: /\"\n \t) >expected &&\n@@ -450,9 +450,9 @@ test_expect_success 'signoff gap' '\n $alt\" &&\n \tgit cat-file commit HEAD | sed -e \"1,/^\\$/d\" > actual &&\n \t(\n-\t\techo welcome\n-\t\techo\n-\t\techo $alt\n+\t\techo welcome &&\n+\t\techo &&\n+\t\techo $alt &&\n \t\tgit var GIT_COMMITTER_IDENT |\n \t\tsed -e \"s/>.*/>/\" -e \"s/^/Signed-off-by: /\"\n \t) >expected &&\n@@ -470,11 +470,11 @@ We have now\n $alt\" &&\n \tgit cat-file commit HEAD | sed -e \"1,/^\\$/d\" > actual &&\n \t(\n-\t\techo welcome\n-\t\techo\n-\t\techo We have now\n-\t\techo $alt\n-\t\techo\n+\t\techo welcome &&\n+\t\techo &&\n+\t\techo We have now &&\n+\t\techo $alt &&\n+\t\techo &&\n \t\tgit var GIT_COMMITTER_IDENT |\n \t\tsed -e \"s/>.*/>/\" -e \"s/^/Signed-off-by: /\"\n \t) >expected &&\n@@ -491,11 +491,11 @@ non-trailer line\n Myfooter: x\" &&\n \tgit cat-file commit HEAD | sed -e \"1,/^\\$/d\" > actual &&\n \t(\n-\t\techo subject\n-\t\techo\n-\t\techo non-trailer line\n-\t\techo Myfooter: x\n-\t\techo\n+\t\techo subject &&\n+\t\techo &&\n+\t\techo non-trailer line &&\n+\t\techo Myfooter: x &&\n+\t\techo &&\n \t\techo \"Signed-off-by: $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL>\"\n \t) >expected &&\n \ttest_cmp expected actual &&\n@@ -508,10 +508,10 @@ non-trailer line\n Myfooter: x\" &&\n \tgit cat-file commit HEAD | sed -e \"1,/^\\$/d\" > actual &&\n \t(\n-\t\techo subject\n-\t\techo\n-\t\techo non-trailer line\n-\t\techo Myfooter: x\n+\t\techo subject &&\n+\t\techo &&\n+\t\techo non-trailer line &&\n+\t\techo Myfooter: x &&\n \t\techo \"Signed-off-by: $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL>\"\n \t) >expected &&\n \ttest_cmp expected actual\n@@ -524,10 +524,10 @@ test_expect_success 'multiple -m' '\n \tgit commit -m \"one\" -m \"two\" -m \"three\" &&\n \tgit cat-file commit HEAD | sed -e \"1,/^\\$/d\" >actual &&\n \t(\n-\t\techo one\n-\t\techo\n-\t\techo two\n-\t\techo\n+\t\techo one &&\n+\t\techo &&\n+\t\techo two &&\n+\t\techo &&\n \t\techo three\n \t) >expected &&\n \ttest_cmp expected actual\ndiff --git a/t/t7506-status-submodule.sh b/t/t7506-status-submodule.sh\nindex b4b74dbe29..943708fb04 100755\n--- a/t/t7506-status-submodule.sh\n+++ b/t/t7506-status-submodule.sh\n@@ -193,9 +193,9 @@ test_expect_success 'status with added and untracked file in modified submodule\n \n test_expect_success 'setup .git file for sub' '\n \t(cd sub &&\n-\t rm -f new-file\n+\t rm -f new-file &&\n \t REAL=\"$(pwd)/../.real\" &&\n-\t mv .git \"$REAL\"\n+\t mv .git \"$REAL\" &&\n \t echo \"gitdir: $REAL\" >.git) &&\n \t echo .real >>.gitignore &&\n \t git commit -m \"added .real to .gitignore\" .gitignore\n@@ -209,12 +209,12 @@ test_expect_success 'status with added file in modified submodule with .git file\n \n test_expect_success 'status with a lot of untracked files in the submodule' '\n \t(\n-\t\tcd sub\n+\t\tcd sub &&\n \t\ti=0 &&\n \t\twhile test $i -lt 1024\n \t\tdo\n-\t\t\t>some-file-$i\n-\t\t\ti=$(( $i + 1 ))\n+\t\t\t>some-file-$i &&\n+\t\t\ti=$(( $i + 1 )) || exit 1\n \t\tdone\n \t) &&\n \tgit status --porcelain sub 2>err.actual &&\n-- \n2.18.0.203.gfac676dfb9\n\n"},{"id":"351499","messageId":"20180702002405.3042-23-sunshine@sunshineco.com","threadId":"48813","inReplyTo":"20180702002405.3042-1-sunshine@sunshineco.com","subject":"[PATCH 22/25] t6000-t6999: fix broken &&-chains","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2018-07-02T00:24:02Z","receivedAt":"2018-07-02T00:25:41Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>\n---\n t/t6010-merge-base.sh                |  2 +-\n t/t6029-merge-subtree.sh             | 16 ++++++++--------\n t/t6036-recursive-corner-cases.sh    |  6 +++---\n t/t6042-merge-rename-corner-cases.sh |  8 ++++----\n t/t6043-merge-rename-directories.sh  |  2 +-\n 5 files changed, 17 insertions(+), 17 deletions(-)\n\ndiff --git a/t/t6010-merge-base.sh b/t/t6010-merge-base.sh\nindex aa2d360ce3..44c726ea39 100755\n--- a/t/t6010-merge-base.sh\n+++ b/t/t6010-merge-base.sh\n@@ -245,7 +245,7 @@ test_expect_success 'using reflog to find the fork point' '\n \t\t\tgit commit --allow-empty -m \"Derived #$count\" &&\n \t\t\tgit rev-parse HEAD >derived$count &&\n \t\t\tgit checkout -B base $E || exit 1\n-\t\tdone\n+\t\tdone &&\n \n \t\tfor count in 1 2 3\n \t\tdo\ndiff --git a/t/t6029-merge-subtree.sh b/t/t6029-merge-subtree.sh\nindex 3e692454a7..7d5bc78472 100755\n--- a/t/t6029-merge-subtree.sh\n+++ b/t/t6029-merge-subtree.sh\n@@ -55,7 +55,7 @@ test_expect_success 'initial merge' '\n \tgit checkout -b work &&\n \tgit ls-files -s >actual &&\n \t(\n-\t\techo \"100644 $o1 0\tgit-gui/git-gui.sh\"\n+\t\techo \"100644 $o1 0\tgit-gui/git-gui.sh\" &&\n \t\techo \"100644 $o2 0\tgit.c\"\n \t) >expected &&\n \ttest_cmp expected actual\n@@ -72,7 +72,7 @@ test_expect_success 'merge update' '\n \tgit pull -s subtree gui master2 &&\n \tgit ls-files -s >actual &&\n \t(\n-\t\techo \"100644 $o3 0\tgit-gui/git-gui.sh\"\n+\t\techo \"100644 $o3 0\tgit-gui/git-gui.sh\" &&\n \t\techo \"100644 $o2 0\tgit.c\"\n \t) >expected &&\n \ttest_cmp expected actual\n@@ -88,8 +88,8 @@ test_expect_success 'initial ambiguous subtree' '\n \tgit checkout -b work2 &&\n \tgit ls-files -s >actual &&\n \t(\n-\t\techo \"100644 $o1 0\tgit-gui/git-gui.sh\"\n-\t\techo \"100644 $o1 0\tgit-gui2/git-gui.sh\"\n+\t\techo \"100644 $o1 0\tgit-gui/git-gui.sh\" &&\n+\t\techo \"100644 $o1 0\tgit-gui2/git-gui.sh\" &&\n \t\techo \"100644 $o2 0\tgit.c\"\n \t) >expected &&\n \ttest_cmp expected actual\n@@ -101,8 +101,8 @@ test_expect_success 'merge using explicit' '\n \tgit pull -Xsubtree=git-gui gui master2 &&\n \tgit ls-files -s >actual &&\n \t(\n-\t\techo \"100644 $o3 0\tgit-gui/git-gui.sh\"\n-\t\techo \"100644 $o1 0\tgit-gui2/git-gui.sh\"\n+\t\techo \"100644 $o3 0\tgit-gui/git-gui.sh\" &&\n+\t\techo \"100644 $o1 0\tgit-gui2/git-gui.sh\" &&\n \t\techo \"100644 $o2 0\tgit.c\"\n \t) >expected &&\n \ttest_cmp expected actual\n@@ -114,8 +114,8 @@ test_expect_success 'merge2 using explicit' '\n \tgit pull -Xsubtree=git-gui2 gui master2 &&\n \tgit ls-files -s >actual &&\n \t(\n-\t\techo \"100644 $o1 0\tgit-gui/git-gui.sh\"\n-\t\techo \"100644 $o3 0\tgit-gui2/git-gui.sh\"\n+\t\techo \"100644 $o1 0\tgit-gui/git-gui.sh\" &&\n+\t\techo \"100644 $o3 0\tgit-gui2/git-gui.sh\" &&\n \t\techo \"100644 $o2 0\tgit.c\"\n \t) >expected &&\n \ttest_cmp expected actual\ndiff --git a/t/t6036-recursive-corner-cases.sh b/t/t6036-recursive-corner-cases.sh\nindex b32ff8e1db..892cf08743 100755\n--- a/t/t6036-recursive-corner-cases.sh\n+++ b/t/t6036-recursive-corner-cases.sh\n@@ -72,7 +72,7 @@ test_expect_success 'merge simple rename+criss-cross with no modifications' '\n \t\tgit rev-parse   >actual     \\\n \t\t\t:2:three   :3:three &&\n \t\tgit hash-object >>actual    \\\n-\t\t\tthree~HEAD three~R2^0\n+\t\t\tthree~HEAD three~R2^0 &&\n \t\ttest_cmp expect actual\n \t)\n '\n@@ -148,7 +148,7 @@ test_expect_success 'merge criss-cross + rename merges with basic modification'\n \t\tgit rev-parse   >actual     \\\n \t\t\t:2:three   :3:three &&\n \t\tgit hash-object >>actual    \\\n-\t\t\tthree~HEAD three~R2^0\n+\t\t\tthree~HEAD three~R2^0 &&\n \t\ttest_cmp expect actual\n \t)\n '\n@@ -228,7 +228,7 @@ test_expect_success 'git detects differently handled merges conflict' '\n \t\t\tD:new_a  E:new_a &&\n \t\tgit rev-parse   >actual     \\\n \t\t\t:2:new_a :3:new_a &&\n-\t\ttest_cmp expect actual\n+\t\ttest_cmp expect actual &&\n \n \t\tgit cat-file -p B:new_a >ours &&\n \t\tgit cat-file -p C:new_a >theirs &&\ndiff --git a/t/t6042-merge-rename-corner-cases.sh b/t/t6042-merge-rename-corner-cases.sh\nindex 1cbd946fc2..661b633478 100755\n--- a/t/t6042-merge-rename-corner-cases.sh\n+++ b/t/t6042-merge-rename-corner-cases.sh\n@@ -352,7 +352,7 @@ test_expect_success 'rename/directory conflict + content merge conflict' '\n \t\t\tbase:file   left-conflict:newfile  right:file &&\n \t\tgit rev-parse >actual                                 \\\n \t\t\t:1:newfile  :2:newfile             :3:newfile &&\n-\t\ttest_cmp expect actual\n+\t\ttest_cmp expect actual &&\n \n \t\ttest_path_is_file newfile/realfile &&\n \t\ttest_path_is_file newfile~HEAD\n@@ -580,7 +580,7 @@ test_expect_failure 'detect conflict with rename/rename(1to2)/add-source merge'\n \t\t\tC:a   A:a   B:b   C:C &&\n \t\tgit rev-parse >actual          \\\n \t\t\t:3:a  :1:a  :2:b  :3:c &&\n-\t\ttest_cmp expect actual\n+\t\ttest_cmp expect actual &&\n \n \t\ttest_path_is_file a &&\n \t\ttest_path_is_file b &&\n@@ -680,13 +680,13 @@ test_expect_success 'rename/rename/add-dest merge still knows about conflicting\n \t\t\tA:a   C:b   B:b   C:c   B:c &&\n \t\tgit rev-parse >actual                \\\n \t\t\t:1:a  :2:b  :3:b  :2:c  :3:c &&\n-\t\ttest_cmp expect actual\n+\t\ttest_cmp expect actual &&\n \n \t\tgit rev-parse >expect               \\\n \t\t\tC:c     B:c     C:b     B:b &&\n \t\tgit hash-object >actual                \\\n \t\t\tc~HEAD  c~B\\^0  b~HEAD  b~B\\^0 &&\n-\t\ttest_cmp expect actual\n+\t\ttest_cmp expect actual &&\n \n \t\ttest_path_is_missing b &&\n \t\ttest_path_is_missing c\ndiff --git a/t/t6043-merge-rename-directories.sh b/t/t6043-merge-rename-directories.sh\nindex 2e28f2908d..4a71f17edd 100755\n--- a/t/t6043-merge-rename-directories.sh\n+++ b/t/t6043-merge-rename-directories.sh\n@@ -3583,7 +3583,7 @@ test_expect_success '11d-check: Avoid losing not-uptodate with rename + D/F conf\n \t\tgrep -q stuff z/c &&\n \t\ttest_seq 1 10 >expected &&\n \t\techo stuff >>expected &&\n-\t\ttest_cmp expected z/c\n+\t\ttest_cmp expected z/c &&\n \n \t\tgit ls-files -s >out &&\n \t\ttest_line_count = 4 out &&\n-- \n2.18.0.203.gfac676dfb9\n\n"},{"id":"351500","messageId":"20180702002405.3042-22-sunshine@sunshineco.com","threadId":"48813","inReplyTo":"20180702002405.3042-1-sunshine@sunshineco.com","subject":"[PATCH 21/25] t5000-t5999: fix broken &&-chains","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2018-07-02T00:24:01Z","receivedAt":"2018-07-02T00:25:42Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>\n---\n t/t5300-pack-object.sh         |  2 +-\n t/t5302-pack-index.sh          |  2 +-\n t/t5401-update-hooks.sh        |  4 ++--\n t/t5500-fetch-pack.sh          |  2 +-\n t/t5505-remote.sh              |  2 +-\n t/t5512-ls-remote.sh           |  4 ++--\n t/t5516-fetch-push.sh          | 10 +++++-----\n t/t5517-push-mirror.sh         | 10 +++++-----\n t/t5526-fetch-submodules.sh    |  2 +-\n t/t5531-deep-submodule-push.sh |  2 +-\n t/t5543-atomic-push.sh         |  2 +-\n t/t5601-clone.sh               |  2 +-\n t/t5605-clone-local.sh         |  2 +-\n t/t5801-remote-helpers.sh      |  2 +-\n 14 files changed, 24 insertions(+), 24 deletions(-)\n\ndiff --git a/t/t5300-pack-object.sh b/t/t5300-pack-object.sh\nindex 2336d09dcc..6c620cd540 100755\n--- a/t/t5300-pack-object.sh\n+++ b/t/t5300-pack-object.sh\n@@ -191,7 +191,7 @@ test_expect_success 'survive missing objects/pack directory' '\n \t\tmkdir missing-pack &&\n \t\tcd missing-pack &&\n \t\tgit init &&\n-\t\tGOP=.git/objects/pack\n+\t\tGOP=.git/objects/pack &&\n \t\trm -fr $GOP &&\n \t\tgit index-pack --stdin --keep=test <../test-3-${packname_3}.pack &&\n \t\ttest -f $GOP/pack-${packname_3}.pack &&\ndiff --git a/t/t5302-pack-index.sh b/t/t5302-pack-index.sh\nindex bb9b8bb309..91d51b35f9 100755\n--- a/t/t5302-pack-index.sh\n+++ b/t/t5302-pack-index.sh\n@@ -237,7 +237,7 @@ test_expect_success 'running index-pack in the object store' '\n     rm -f .git/objects/pack/* &&\n     cp test-1-${pack1}.pack .git/objects/pack/pack-${pack1}.pack &&\n     (\n-\tcd .git/objects/pack\n+\tcd .git/objects/pack &&\n \tgit index-pack pack-${pack1}.pack\n     ) &&\n     test -f .git/objects/pack/pack-${pack1}.idx\ndiff --git a/t/t5401-update-hooks.sh b/t/t5401-update-hooks.sh\nindex 7f278d8ce9..b5f886a0e2 100755\n--- a/t/t5401-update-hooks.sh\n+++ b/t/t5401-update-hooks.sh\n@@ -82,13 +82,13 @@ test_expect_success 'hooks ran' '\n '\n \n test_expect_success 'pre-receive hook input' '\n-\t(echo $commit0 $commit1 refs/heads/master;\n+\t(echo $commit0 $commit1 refs/heads/master &&\n \t echo $commit1 $commit0 refs/heads/tofail\n \t) | test_cmp - victim.git/pre-receive.stdin\n '\n \n test_expect_success 'update hook arguments' '\n-\t(echo refs/heads/master $commit0 $commit1;\n+\t(echo refs/heads/master $commit0 $commit1 &&\n \t echo refs/heads/tofail $commit1 $commit0\n \t) | test_cmp - victim.git/update.args\n '\ndiff --git a/t/t5500-fetch-pack.sh b/t/t5500-fetch-pack.sh\nindex ea6570e819..ebbbbfe054 100755\n--- a/t/t5500-fetch-pack.sh\n+++ b/t/t5500-fetch-pack.sh\n@@ -259,7 +259,7 @@ test_expect_success 'clone shallow object count' '\n test_expect_success 'pull in shallow repo with missing merge base' '\n \t(\n \t\tcd shallow &&\n-\t\tgit fetch --depth 4 .. A\n+\t\tgit fetch --depth 4 .. A &&\n \t\ttest_must_fail git merge --allow-unrelated-histories FETCH_HEAD\n \t)\n '\ndiff --git a/t/t5505-remote.sh b/t/t5505-remote.sh\nindex 3552b51b4c..11e14a1e0f 100755\n--- a/t/t5505-remote.sh\n+++ b/t/t5505-remote.sh\n@@ -844,7 +844,7 @@ test_expect_success 'migrate a remote from named file in $GIT_DIR/branches (2)'\n \t\tgit remote rename origin origin &&\n \t\ttest_path_is_missing .git/branches/origin &&\n \t\ttest \"$(git config remote.origin.url)\" = \"quux\" &&\n-\t\ttest \"$(git config remote.origin.fetch)\" = \"refs/heads/foom:refs/heads/origin\"\n+\t\ttest \"$(git config remote.origin.fetch)\" = \"refs/heads/foom:refs/heads/origin\" &&\n \t\ttest \"$(git config remote.origin.push)\" = \"HEAD:refs/heads/foom\"\n \t)\n '\ndiff --git a/t/t5512-ls-remote.sh b/t/t5512-ls-remote.sh\nindex 6a949484d0..ea020040e8 100755\n--- a/t/t5512-ls-remote.sh\n+++ b/t/t5512-ls-remote.sh\n@@ -15,7 +15,7 @@ test_expect_success setup '\n \tgit tag mark1.10 &&\n \tgit show-ref --tags -d | sed -e \"s/ /\t/\" >expected.tag &&\n \t(\n-\t\techo \"$(git rev-parse HEAD)\tHEAD\"\n+\t\techo \"$(git rev-parse HEAD)\tHEAD\" &&\n \t\tgit show-ref -d\t| sed -e \"s/ /\t/\"\n \t) >expected.all &&\n \n@@ -105,7 +105,7 @@ test_expect_success 'use branch.<name>.remote if possible' '\n \tgit clone . other.git &&\n \t(\n \t\tcd other.git &&\n-\t\techo \"$(git rev-parse HEAD)\tHEAD\"\n+\t\techo \"$(git rev-parse HEAD)\tHEAD\" &&\n \t\tgit show-ref\t| sed -e \"s/ /\t/\"\n \t) >exp &&\n \ndiff --git a/t/t5516-fetch-push.sh b/t/t5516-fetch-push.sh\nindex a5077d8b7c..bd8f23e430 100755\n--- a/t/t5516-fetch-push.sh\n+++ b/t/t5516-fetch-push.sh\n@@ -923,7 +923,7 @@ test_expect_success 'push into aliased refs (consistent)' '\n \t(\n \t\tcd child1 &&\n \t\tgit branch foo &&\n-\t\tgit symbolic-ref refs/heads/bar refs/heads/foo\n+\t\tgit symbolic-ref refs/heads/bar refs/heads/foo &&\n \t\tgit config receive.denyCurrentBranch false\n \t) &&\n \t(\n@@ -945,7 +945,7 @@ test_expect_success 'push into aliased refs (inconsistent)' '\n \t(\n \t\tcd child1 &&\n \t\tgit branch foo &&\n-\t\tgit symbolic-ref refs/heads/bar refs/heads/foo\n+\t\tgit symbolic-ref refs/heads/bar refs/heads/foo &&\n \t\tgit config receive.denyCurrentBranch false\n \t) &&\n \t(\n@@ -1011,7 +1011,7 @@ test_expect_success 'push --porcelain rejected' '\n \tmk_empty testrepo &&\n \tgit push testrepo refs/heads/master:refs/remotes/origin/master &&\n \t(cd testrepo &&\n-\t\tgit reset --hard origin/master^\n+\t\tgit reset --hard origin/master^ &&\n \t\tgit config receive.denyCurrentBranch true) &&\n \n \techo >.git/foo  \"To testrepo\"  &&\n@@ -1025,7 +1025,7 @@ test_expect_success 'push --porcelain --dry-run rejected' '\n \tmk_empty testrepo &&\n \tgit push testrepo refs/heads/master:refs/remotes/origin/master &&\n \t(cd testrepo &&\n-\t\tgit reset --hard origin/master\n+\t\tgit reset --hard origin/master &&\n \t\tgit config receive.denyCurrentBranch true) &&\n \n \techo >.git/foo  \"To testrepo\"  &&\n@@ -1333,7 +1333,7 @@ test_expect_success 'push --follow-tag only pushes relevant tags' '\n \t\tgit commit --allow-empty -m \"future commit\" &&\n \t\tgit tag -m \"future\" future &&\n \t\tgit checkout master &&\n-\t\tgit for-each-ref refs/heads/master refs/tags/tag >../expect\n+\t\tgit for-each-ref refs/heads/master refs/tags/tag >../expect &&\n \t\tgit push --follow-tag ../dst master\n \t) &&\n \t(\ndiff --git a/t/t5517-push-mirror.sh b/t/t5517-push-mirror.sh\nindex 02f160aae0..c05a661400 100755\n--- a/t/t5517-push-mirror.sh\n+++ b/t/t5517-push-mirror.sh\n@@ -71,7 +71,7 @@ test_expect_success 'push mirror force updates existing branches' '\n \t\tgit push --mirror up &&\n \t\techo two >foo && git add foo && git commit -m two &&\n \t\tgit push --mirror up &&\n-\t\tgit reset --hard HEAD^\n+\t\tgit reset --hard HEAD^ &&\n \t\tgit push --mirror up\n \t) &&\n \tmaster_master=$(cd master && git show-ref -s --verify refs/heads/master) &&\n@@ -88,7 +88,7 @@ test_expect_success 'push mirror removes branches' '\n \t\techo one >foo && git add foo && git commit -m one &&\n \t\tgit branch remove master &&\n \t\tgit push --mirror up &&\n-\t\tgit branch -D remove\n+\t\tgit branch -D remove &&\n \t\tgit push --mirror up\n \t) &&\n \t(\n@@ -170,7 +170,7 @@ test_expect_success 'push mirror force updates existing tags' '\n \t\techo two >foo && git add foo && git commit -m two &&\n \t\tgit tag -f tmaster master &&\n \t\tgit push --mirror up &&\n-\t\tgit reset --hard HEAD^\n+\t\tgit reset --hard HEAD^ &&\n \t\tgit tag -f tmaster master &&\n \t\tgit push --mirror up\n \t) &&\n@@ -188,7 +188,7 @@ test_expect_success 'push mirror removes tags' '\n \t\techo one >foo && git add foo && git commit -m one &&\n \t\tgit tag -f tremove master &&\n \t\tgit push --mirror up &&\n-\t\tgit tag -d tremove\n+\t\tgit tag -d tremove &&\n \t\tgit push --mirror up\n \t) &&\n \t(\n@@ -235,7 +235,7 @@ test_expect_success 'remote.foo.mirror adds and removes branches' '\n \t\tgit branch keep master &&\n \t\tgit branch remove master &&\n \t\tgit push up &&\n-\t\tgit branch -D remove\n+\t\tgit branch -D remove &&\n \t\tgit push up\n \t) &&\n \t(\ndiff --git a/t/t5526-fetch-submodules.sh b/t/t5526-fetch-submodules.sh\nindex 359e03ff83..0f730d7781 100755\n--- a/t/t5526-fetch-submodules.sh\n+++ b/t/t5526-fetch-submodules.sh\n@@ -379,7 +379,7 @@ test_expect_success \"'--recurse-submodules=on-demand' recurses as deep as necess\n \t\t\tgit config -f .gitmodules submodule.subdir/deepsubmodule.fetchRecursive false\n \t\t) &&\n \t\tgit fetch --recurse-submodules=on-demand >../actual.out 2>../actual.err &&\n-\t\tgit config --unset fetch.recurseSubmodules\n+\t\tgit config --unset fetch.recurseSubmodules &&\n \t\t(\n \t\t\tcd submodule &&\n \t\t\tgit config --unset -f .gitmodules submodule.subdir/deepsubmodule.fetchRecursive\ndiff --git a/t/t5531-deep-submodule-push.sh b/t/t5531-deep-submodule-push.sh\nindex 39cb2c1c34..e2c37fd978 100755\n--- a/t/t5531-deep-submodule-push.sh\n+++ b/t/t5531-deep-submodule-push.sh\n@@ -354,7 +354,7 @@ test_expect_success 'push succeeds if submodule has no remote and is on the firs\n \tgit clone a a1 &&\n \t(\n \t\tcd a1 &&\n-\t\tgit init b\n+\t\tgit init b &&\n \t\t(\n \t\t\tcd b &&\n \t\t\t>junk &&\ndiff --git a/t/t5543-atomic-push.sh b/t/t5543-atomic-push.sh\nindex 3480b33007..7079bcf9a0 100755\n--- a/t/t5543-atomic-push.sh\n+++ b/t/t5543-atomic-push.sh\n@@ -178,7 +178,7 @@ test_expect_success 'atomic push obeys update hook preventing a branch to be pus\n test_expect_success 'atomic push is not advertised if configured' '\n \tmk_repo_pair &&\n \t(\n-\t\tcd upstream\n+\t\tcd upstream &&\n \t\tgit config receive.advertiseatomic 0\n \t) &&\n \t(\ndiff --git a/t/t5601-clone.sh b/t/t5601-clone.sh\nindex 0b62037744..ddaa96ac4f 100755\n--- a/t/t5601-clone.sh\n+++ b/t/t5601-clone.sh\n@@ -618,7 +618,7 @@ hex2oct () {\n test_expect_success 'clone on case-insensitive fs' '\n \tgit init icasefs &&\n \t(\n-\t\tcd icasefs\n+\t\tcd icasefs &&\n \t\to=$(git hash-object -w --stdin </dev/null | hex2oct) &&\n \t\tt=$(printf \"100644 X\\0${o}100644 x\\0${o}\" |\n \t\t\tgit hash-object -w -t tree --stdin) &&\ndiff --git a/t/t5605-clone-local.sh b/t/t5605-clone-local.sh\nindex 3c087e907c..af23419ebf 100755\n--- a/t/t5605-clone-local.sh\n+++ b/t/t5605-clone-local.sh\n@@ -94,7 +94,7 @@ test_expect_success 'clone empty repository' '\n \t git config receive.denyCurrentBranch warn) &&\n \tgit clone empty empty-clone &&\n \ttest_tick &&\n-\t(cd empty-clone\n+\t(cd empty-clone &&\n \t echo \"content\" >> foo &&\n \t git add foo &&\n \t git commit -m \"Initial commit\" &&\ndiff --git a/t/t5801-remote-helpers.sh b/t/t5801-remote-helpers.sh\nindex 362b1581e0..ee5757966f 100755\n--- a/t/t5801-remote-helpers.sh\n+++ b/t/t5801-remote-helpers.sh\n@@ -96,7 +96,7 @@ test_expect_success 'push new branch with old:new refspec' '\n \n test_expect_success 'push new branch with HEAD:new refspec' '\n \t(cd local &&\n-\t git checkout new-name\n+\t git checkout new-name &&\n \t git push origin HEAD:new-refspec-2\n \t) &&\n \tcompare_refs local HEAD server refs/heads/new-refspec-2\n-- \n2.18.0.203.gfac676dfb9\n\n"},{"id":"351501","messageId":"20180702002405.3042-21-sunshine@sunshineco.com","threadId":"48813","inReplyTo":"20180702002405.3042-1-sunshine@sunshineco.com","subject":"[PATCH 20/25] t4000-t4999: fix broken &&-chains","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2018-07-02T00:24:00Z","receivedAt":"2018-07-02T00:25:48Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>\n---\n t/t4001-diff-rename.sh                       |  2 +-\n t/t4024-diff-optimize-common.sh              | 16 ++++++++--------\n t/t4025-hunk-header.sh                       |  8 ++++----\n t/t4041-diff-submodule-option.sh             |  4 ++--\n t/t4060-diff-submodule-option-diff-format.sh |  2 +-\n t/t4121-apply-diffs.sh                       |  2 +-\n 6 files changed, 17 insertions(+), 17 deletions(-)\n\ndiff --git a/t/t4001-diff-rename.sh b/t/t4001-diff-rename.sh\nindex bf4030371a..c16486a9d4 100755\n--- a/t/t4001-diff-rename.sh\n+++ b/t/t4001-diff-rename.sh\n@@ -180,7 +180,7 @@ test_expect_success 'setup for many rename source candidates' '\n \tgit add \"path??\" &&\n \ttest_tick &&\n \tgit commit -m \"hundred\" &&\n-\t(cat path1; echo new) >new-path &&\n+\t(cat path1 && echo new) >new-path &&\n \techo old >>path1 &&\n \tgit add new-path path1 &&\n \tgit diff -l 4 -C -C --cached --name-status >actual 2>actual.err &&\ndiff --git a/t/t4024-diff-optimize-common.sh b/t/t4024-diff-optimize-common.sh\nindex 7e76018296..6b44ce1493 100755\n--- a/t/t4024-diff-optimize-common.sh\n+++ b/t/t4024-diff-optimize-common.sh\n@@ -127,17 +127,17 @@ test_expect_success setup '\n \n \tfor n in $sample\n \tdo\n-\t\t( zs $n ; echo a ) >file-a$n &&\n-\t\t( echo b; zs $n; echo ) >file-b$n &&\n-\t\t( printf c; zs $n ) >file-c$n &&\n-\t\t( echo d; zs $n ) >file-d$n &&\n+\t\t( zs $n && echo a ) >file-a$n &&\n+\t\t( echo b && zs $n && echo ) >file-b$n &&\n+\t\t( printf c && zs $n ) >file-c$n &&\n+\t\t( echo d && zs $n ) >file-d$n &&\n \n \t\tgit add file-a$n file-b$n file-c$n file-d$n &&\n \n-\t\t( zs $n ; echo A ) >file-a$n &&\n-\t\t( echo B; zs $n; echo ) >file-b$n &&\n-\t\t( printf C; zs $n ) >file-c$n &&\n-\t\t( echo D; zs $n ) >file-d$n &&\n+\t\t( zs $n && echo A ) >file-a$n &&\n+\t\t( echo B && zs $n && echo ) >file-b$n &&\n+\t\t( printf C && zs $n ) >file-c$n &&\n+\t\t( echo D && zs $n ) >file-d$n &&\n \n \t\texpect_pattern $n || return 1\n \ndiff --git a/t/t4025-hunk-header.sh b/t/t4025-hunk-header.sh\nindex 7a3dbc1ea2..fa44e78869 100755\n--- a/t/t4025-hunk-header.sh\n+++ b/t/t4025-hunk-header.sh\n@@ -12,12 +12,12 @@ NS=\"$N$N$N$N$N$N$N$N$N$N$N$N$N\"\n test_expect_success setup '\n \n \t(\n-\t\techo \"A $NS\"\n+\t\techo \"A $NS\" &&\n \t\tfor c in B C D E F G H I J K\n \t\tdo\n \t\t\techo \"  $c\"\n-\t\tdone\n-\t\techo \"L  $NS\"\n+\t\tdone &&\n+\t\techo \"L  $NS\" &&\n \t\tfor c in M N O P Q R S T U V\n \t\tdo\n \t\t\techo \"  $c\"\n@@ -34,7 +34,7 @@ test_expect_success 'hunk header truncation with an overly long line' '\n \n \tgit diff | sed -n -e \"s/^.*@@//p\" >actual &&\n \t(\n-\t\techo \" A $N$N$N$N$N$N$N$N$N2\"\n+\t\techo \" A $N$N$N$N$N$N$N$N$N2\" &&\n \t\techo \" L  $N$N$N$N$N$N$N$N$N1\"\n \t) >expected &&\n \ttest_cmp actual expected\ndiff --git a/t/t4041-diff-submodule-option.sh b/t/t4041-diff-submodule-option.sh\nindex 058ee0829d..4e3499ef84 100755\n--- a/t/t4041-diff-submodule-option.sh\n+++ b/t/t4041-diff-submodule-option.sh\n@@ -498,7 +498,7 @@ test_expect_success 'given commit --submodule=short' '\n test_expect_success 'setup .git file for sm2' '\n \t(cd sm2 &&\n \t REAL=\"$(pwd)/../.real\" &&\n-\t mv .git \"$REAL\"\n+\t mv .git \"$REAL\" &&\n \t echo \"gitdir: $REAL\" >.git)\n '\n \n@@ -527,7 +527,7 @@ test_expect_success 'diff --submodule with objects referenced by alternates' '\n \t\tgit commit -m \"sub a\"\n \t) &&\n \t(cd sub_alt &&\n-\t\tsha1_before=$(git rev-parse --short HEAD)\n+\t\tsha1_before=$(git rev-parse --short HEAD) &&\n \t\techo b >b &&\n \t\tgit add b &&\n \t\tgit commit -m b &&\ndiff --git a/t/t4060-diff-submodule-option-diff-format.sh b/t/t4060-diff-submodule-option-diff-format.sh\nindex 4b168d0ed7..0eba4620f0 100755\n--- a/t/t4060-diff-submodule-option-diff-format.sh\n+++ b/t/t4060-diff-submodule-option-diff-format.sh\n@@ -721,7 +721,7 @@ test_expect_success 'given commit' '\n test_expect_success 'setup .git file for sm2' '\n \t(cd sm2 &&\n \t REAL=\"$(pwd)/../.real\" &&\n-\t mv .git \"$REAL\"\n+\t mv .git \"$REAL\" &&\n \t echo \"gitdir: $REAL\" >.git)\n '\n \ndiff --git a/t/t4121-apply-diffs.sh b/t/t4121-apply-diffs.sh\nindex aff551a1d7..66368effd5 100755\n--- a/t/t4121-apply-diffs.sh\n+++ b/t/t4121-apply-diffs.sh\n@@ -27,6 +27,6 @@ test_expect_success 'setup' \\\n \n test_expect_success \\\n \t'check if contextually independent diffs for the same file apply' \\\n-\t'( git diff test~2 test~1; git diff test~1 test~0 )| git apply'\n+\t'( git diff test~2 test~1 && git diff test~1 test~0 )| git apply'\n \n test_done\n-- \n2.18.0.203.gfac676dfb9\n\n"},{"id":"351502","messageId":"20180702002405.3042-20-sunshine@sunshineco.com","threadId":"48813","inReplyTo":"20180702002405.3042-1-sunshine@sunshineco.com","subject":"[PATCH 19/25] t3030: fix broken &&-chains","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2018-07-02T00:23:59Z","receivedAt":"2018-07-02T00:25:50Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>\n---\n t/t3030-merge-recursive.sh | 340 ++++++++++++++++++-------------------\n 1 file changed, 170 insertions(+), 170 deletions(-)\n\ndiff --git a/t/t3030-merge-recursive.sh b/t/t3030-merge-recursive.sh\nindex 3563e77b37..ff641b348a 100755\n--- a/t/t3030-merge-recursive.sh\n+++ b/t/t3030-merge-recursive.sh\n@@ -36,15 +36,15 @@ test_expect_success 'setup 1' '\n \ttest_tick &&\n \tgit commit -m \"master modifies a and d/e\" &&\n \tc1=$(git rev-parse --verify HEAD) &&\n-\t( git ls-tree -r HEAD ; git ls-files -s ) >actual &&\n+\t( git ls-tree -r HEAD && git ls-files -s ) >actual &&\n \t(\n-\t\techo \"100644 blob $o1\ta\"\n-\t\techo \"100644 blob $o0\tb\"\n-\t\techo \"100644 blob $o0\tc\"\n-\t\techo \"100644 blob $o1\td/e\"\n-\t\techo \"100644 $o1 0\ta\"\n-\t\techo \"100644 $o0 0\tb\"\n-\t\techo \"100644 $o0 0\tc\"\n+\t\techo \"100644 blob $o1\ta\" &&\n+\t\techo \"100644 blob $o0\tb\" &&\n+\t\techo \"100644 blob $o0\tc\" &&\n+\t\techo \"100644 blob $o1\td/e\" &&\n+\t\techo \"100644 $o1 0\ta\" &&\n+\t\techo \"100644 $o0 0\tb\" &&\n+\t\techo \"100644 $o0 0\tc\" &&\n \t\techo \"100644 $o1 0\td/e\"\n \t) >expected &&\n \ttest_cmp expected actual\n@@ -54,15 +54,15 @@ test_expect_success 'setup 2' '\n \n \trm -rf [abcd] &&\n \tgit checkout side &&\n-\t( git ls-tree -r HEAD ; git ls-files -s ) >actual &&\n+\t( git ls-tree -r HEAD && git ls-files -s ) >actual &&\n \t(\n-\t\techo \"100644 blob $o0\ta\"\n-\t\techo \"100644 blob $o0\tb\"\n-\t\techo \"100644 blob $o0\tc\"\n-\t\techo \"100644 blob $o0\td/e\"\n-\t\techo \"100644 $o0 0\ta\"\n-\t\techo \"100644 $o0 0\tb\"\n-\t\techo \"100644 $o0 0\tc\"\n+\t\techo \"100644 blob $o0\ta\" &&\n+\t\techo \"100644 blob $o0\tb\" &&\n+\t\techo \"100644 blob $o0\tc\" &&\n+\t\techo \"100644 blob $o0\td/e\" &&\n+\t\techo \"100644 $o0 0\ta\" &&\n+\t\techo \"100644 $o0 0\tb\" &&\n+\t\techo \"100644 $o0 0\tc\" &&\n \t\techo \"100644 $o0 0\td/e\"\n \t) >expected &&\n \ttest_cmp expected actual &&\n@@ -75,15 +75,15 @@ test_expect_success 'setup 2' '\n \ttest_tick &&\n \tgit commit -m \"side modifies a\" &&\n \tc2=$(git rev-parse --verify HEAD) &&\n-\t( git ls-tree -r HEAD ; git ls-files -s ) >actual &&\n+\t( git ls-tree -r HEAD && git ls-files -s ) >actual &&\n \t(\n-\t\techo \"100644 blob $o2\ta\"\n-\t\techo \"100644 blob $o0\tb\"\n-\t\techo \"100644 blob $o0\tc\"\n-\t\techo \"100644 blob $o0\td/e\"\n-\t\techo \"100644 $o2 0\ta\"\n-\t\techo \"100644 $o0 0\tb\"\n-\t\techo \"100644 $o0 0\tc\"\n+\t\techo \"100644 blob $o2\ta\" &&\n+\t\techo \"100644 blob $o0\tb\" &&\n+\t\techo \"100644 blob $o0\tc\" &&\n+\t\techo \"100644 blob $o0\td/e\" &&\n+\t\techo \"100644 $o2 0\ta\" &&\n+\t\techo \"100644 $o0 0\tb\" &&\n+\t\techo \"100644 $o0 0\tc\" &&\n \t\techo \"100644 $o0 0\td/e\"\n \t) >expected &&\n \ttest_cmp expected actual\n@@ -93,15 +93,15 @@ test_expect_success 'setup 3' '\n \n \trm -rf [abcd] &&\n \tgit checkout df-1 &&\n-\t( git ls-tree -r HEAD ; git ls-files -s ) >actual &&\n+\t( git ls-tree -r HEAD && git ls-files -s ) >actual &&\n \t(\n-\t\techo \"100644 blob $o0\ta\"\n-\t\techo \"100644 blob $o0\tb\"\n-\t\techo \"100644 blob $o0\tc\"\n-\t\techo \"100644 blob $o0\td/e\"\n-\t\techo \"100644 $o0 0\ta\"\n-\t\techo \"100644 $o0 0\tb\"\n-\t\techo \"100644 $o0 0\tc\"\n+\t\techo \"100644 blob $o0\ta\" &&\n+\t\techo \"100644 blob $o0\tb\" &&\n+\t\techo \"100644 blob $o0\tc\" &&\n+\t\techo \"100644 blob $o0\td/e\" &&\n+\t\techo \"100644 $o0 0\ta\" &&\n+\t\techo \"100644 $o0 0\tb\" &&\n+\t\techo \"100644 $o0 0\tc\" &&\n \t\techo \"100644 $o0 0\td/e\"\n \t) >expected &&\n \ttest_cmp expected actual &&\n@@ -112,15 +112,15 @@ test_expect_success 'setup 3' '\n \ttest_tick &&\n \tgit commit -m \"df-1 makes b/c\" &&\n \tc3=$(git rev-parse --verify HEAD) &&\n-\t( git ls-tree -r HEAD ; git ls-files -s ) >actual &&\n+\t( git ls-tree -r HEAD && git ls-files -s ) >actual &&\n \t(\n-\t\techo \"100644 blob $o0\ta\"\n-\t\techo \"100644 blob $o3\tb/c\"\n-\t\techo \"100644 blob $o0\tc\"\n-\t\techo \"100644 blob $o0\td/e\"\n-\t\techo \"100644 $o0 0\ta\"\n-\t\techo \"100644 $o3 0\tb/c\"\n-\t\techo \"100644 $o0 0\tc\"\n+\t\techo \"100644 blob $o0\ta\" &&\n+\t\techo \"100644 blob $o3\tb/c\" &&\n+\t\techo \"100644 blob $o0\tc\" &&\n+\t\techo \"100644 blob $o0\td/e\" &&\n+\t\techo \"100644 $o0 0\ta\" &&\n+\t\techo \"100644 $o3 0\tb/c\" &&\n+\t\techo \"100644 $o0 0\tc\" &&\n \t\techo \"100644 $o0 0\td/e\"\n \t) >expected &&\n \ttest_cmp expected actual\n@@ -130,15 +130,15 @@ test_expect_success 'setup 4' '\n \n \trm -rf [abcd] &&\n \tgit checkout df-2 &&\n-\t( git ls-tree -r HEAD ; git ls-files -s ) >actual &&\n+\t( git ls-tree -r HEAD && git ls-files -s ) >actual &&\n \t(\n-\t\techo \"100644 blob $o0\ta\"\n-\t\techo \"100644 blob $o0\tb\"\n-\t\techo \"100644 blob $o0\tc\"\n-\t\techo \"100644 blob $o0\td/e\"\n-\t\techo \"100644 $o0 0\ta\"\n-\t\techo \"100644 $o0 0\tb\"\n-\t\techo \"100644 $o0 0\tc\"\n+\t\techo \"100644 blob $o0\ta\" &&\n+\t\techo \"100644 blob $o0\tb\" &&\n+\t\techo \"100644 blob $o0\tc\" &&\n+\t\techo \"100644 blob $o0\td/e\" &&\n+\t\techo \"100644 $o0 0\ta\" &&\n+\t\techo \"100644 $o0 0\tb\" &&\n+\t\techo \"100644 $o0 0\tc\" &&\n \t\techo \"100644 $o0 0\td/e\"\n \t) >expected &&\n \ttest_cmp expected actual &&\n@@ -149,15 +149,15 @@ test_expect_success 'setup 4' '\n \ttest_tick &&\n \tgit commit -m \"df-2 makes a/c\" &&\n \tc4=$(git rev-parse --verify HEAD) &&\n-\t( git ls-tree -r HEAD ; git ls-files -s ) >actual &&\n+\t( git ls-tree -r HEAD && git ls-files -s ) >actual &&\n \t(\n-\t\techo \"100644 blob $o4\ta/c\"\n-\t\techo \"100644 blob $o0\tb\"\n-\t\techo \"100644 blob $o0\tc\"\n-\t\techo \"100644 blob $o0\td/e\"\n-\t\techo \"100644 $o4 0\ta/c\"\n-\t\techo \"100644 $o0 0\tb\"\n-\t\techo \"100644 $o0 0\tc\"\n+\t\techo \"100644 blob $o4\ta/c\" &&\n+\t\techo \"100644 blob $o0\tb\" &&\n+\t\techo \"100644 blob $o0\tc\" &&\n+\t\techo \"100644 blob $o0\td/e\" &&\n+\t\techo \"100644 $o4 0\ta/c\" &&\n+\t\techo \"100644 $o0 0\tb\" &&\n+\t\techo \"100644 $o0 0\tc\" &&\n \t\techo \"100644 $o0 0\td/e\"\n \t) >expected &&\n \ttest_cmp expected actual\n@@ -167,15 +167,15 @@ test_expect_success 'setup 5' '\n \n \trm -rf [abcd] &&\n \tgit checkout remove &&\n-\t( git ls-tree -r HEAD ; git ls-files -s ) >actual &&\n+\t( git ls-tree -r HEAD && git ls-files -s ) >actual &&\n \t(\n-\t\techo \"100644 blob $o0\ta\"\n-\t\techo \"100644 blob $o0\tb\"\n-\t\techo \"100644 blob $o0\tc\"\n-\t\techo \"100644 blob $o0\td/e\"\n-\t\techo \"100644 $o0 0\ta\"\n-\t\techo \"100644 $o0 0\tb\"\n-\t\techo \"100644 $o0 0\tc\"\n+\t\techo \"100644 blob $o0\ta\" &&\n+\t\techo \"100644 blob $o0\tb\" &&\n+\t\techo \"100644 blob $o0\tc\" &&\n+\t\techo \"100644 blob $o0\td/e\" &&\n+\t\techo \"100644 $o0 0\ta\" &&\n+\t\techo \"100644 $o0 0\tb\" &&\n+\t\techo \"100644 $o0 0\tc\" &&\n \t\techo \"100644 $o0 0\td/e\"\n \t) >expected &&\n \ttest_cmp expected actual &&\n@@ -190,13 +190,13 @@ test_expect_success 'setup 5' '\n \ttest_tick &&\n \tgit commit -m \"remove removes b and modifies a\" &&\n \tc5=$(git rev-parse --verify HEAD) &&\n-\t( git ls-tree -r HEAD ; git ls-files -s ) >actual &&\n+\t( git ls-tree -r HEAD && git ls-files -s ) >actual &&\n \t(\n-\t\techo \"100644 blob $o5\ta\"\n-\t\techo \"100644 blob $o0\tc\"\n-\t\techo \"100644 blob $o0\td/e\"\n-\t\techo \"100644 $o5 0\ta\"\n-\t\techo \"100644 $o0 0\tc\"\n+\t\techo \"100644 blob $o5\ta\" &&\n+\t\techo \"100644 blob $o0\tc\" &&\n+\t\techo \"100644 blob $o0\td/e\" &&\n+\t\techo \"100644 $o5 0\ta\" &&\n+\t\techo \"100644 $o0 0\tc\" &&\n \t\techo \"100644 $o0 0\td/e\"\n \t) >expected &&\n \ttest_cmp expected actual\n@@ -207,15 +207,15 @@ test_expect_success 'setup 6' '\n \n \trm -rf [abcd] &&\n \tgit checkout df-3 &&\n-\t( git ls-tree -r HEAD ; git ls-files -s ) >actual &&\n+\t( git ls-tree -r HEAD && git ls-files -s ) >actual &&\n \t(\n-\t\techo \"100644 blob $o0\ta\"\n-\t\techo \"100644 blob $o0\tb\"\n-\t\techo \"100644 blob $o0\tc\"\n-\t\techo \"100644 blob $o0\td/e\"\n-\t\techo \"100644 $o0 0\ta\"\n-\t\techo \"100644 $o0 0\tb\"\n-\t\techo \"100644 $o0 0\tc\"\n+\t\techo \"100644 blob $o0\ta\" &&\n+\t\techo \"100644 blob $o0\tb\" &&\n+\t\techo \"100644 blob $o0\tc\" &&\n+\t\techo \"100644 blob $o0\td/e\" &&\n+\t\techo \"100644 $o0 0\ta\" &&\n+\t\techo \"100644 $o0 0\tb\" &&\n+\t\techo \"100644 $o0 0\tc\" &&\n \t\techo \"100644 $o0 0\td/e\"\n \t) >expected &&\n \ttest_cmp expected actual &&\n@@ -226,15 +226,15 @@ test_expect_success 'setup 6' '\n \ttest_tick &&\n \tgit commit -m \"df-3 makes d\" &&\n \tc6=$(git rev-parse --verify HEAD) &&\n-\t( git ls-tree -r HEAD ; git ls-files -s ) >actual &&\n+\t( git ls-tree -r HEAD && git ls-files -s ) >actual &&\n \t(\n-\t\techo \"100644 blob $o0\ta\"\n-\t\techo \"100644 blob $o0\tb\"\n-\t\techo \"100644 blob $o0\tc\"\n-\t\techo \"100644 blob $o6\td\"\n-\t\techo \"100644 $o0 0\ta\"\n-\t\techo \"100644 $o0 0\tb\"\n-\t\techo \"100644 $o0 0\tc\"\n+\t\techo \"100644 blob $o0\ta\" &&\n+\t\techo \"100644 blob $o0\tb\" &&\n+\t\techo \"100644 blob $o0\tc\" &&\n+\t\techo \"100644 blob $o6\td\" &&\n+\t\techo \"100644 $o0 0\ta\" &&\n+\t\techo \"100644 $o0 0\tb\" &&\n+\t\techo \"100644 $o0 0\tc\" &&\n \t\techo \"100644 $o6 0\td\"\n \t) >expected &&\n \ttest_cmp expected actual\n@@ -286,11 +286,11 @@ test_expect_success 'merge-recursive result' '\n \n \tgit ls-files -s >actual &&\n \t(\n-\t\techo \"100644 $o0 1\ta\"\n-\t\techo \"100644 $o2 2\ta\"\n-\t\techo \"100644 $o1 3\ta\"\n-\t\techo \"100644 $o0 0\tb\"\n-\t\techo \"100644 $o0 0\tc\"\n+\t\techo \"100644 $o0 1\ta\" &&\n+\t\techo \"100644 $o2 2\ta\" &&\n+\t\techo \"100644 $o1 3\ta\" &&\n+\t\techo \"100644 $o0 0\tb\" &&\n+\t\techo \"100644 $o0 0\tc\" &&\n \t\techo \"100644 $o1 0\td/e\"\n \t) >expected &&\n \ttest_cmp expected actual\n@@ -325,10 +325,10 @@ test_expect_success 'merge-recursive remove conflict' '\n \n \tgit ls-files -s >actual &&\n \t(\n-\t\techo \"100644 $o0 1\ta\"\n-\t\techo \"100644 $o1 2\ta\"\n-\t\techo \"100644 $o5 3\ta\"\n-\t\techo \"100644 $o0 0\tc\"\n+\t\techo \"100644 $o0 1\ta\" &&\n+\t\techo \"100644 $o1 2\ta\" &&\n+\t\techo \"100644 $o5 3\ta\" &&\n+\t\techo \"100644 $o0 0\tc\" &&\n \t\techo \"100644 $o1 0\td/e\"\n \t) >expected &&\n \ttest_cmp expected actual\n@@ -347,9 +347,9 @@ test_expect_success 'merge-recursive result' '\n \n \tgit ls-files -s >actual &&\n \t(\n-\t\techo \"100644 $o1 0\ta\"\n-\t\techo \"100644 $o3 0\tb/c\"\n-\t\techo \"100644 $o0 0\tc\"\n+\t\techo \"100644 $o1 0\ta\" &&\n+\t\techo \"100644 $o3 0\tb/c\" &&\n+\t\techo \"100644 $o0 0\tc\" &&\n \t\techo \"100644 $o1 0\td/e\"\n \t) >expected &&\n \ttest_cmp expected actual\n@@ -369,11 +369,11 @@ test_expect_success 'merge-recursive d/f conflict result' '\n \n \tgit ls-files -s >actual &&\n \t(\n-\t\techo \"100644 $o0 1\ta\"\n-\t\techo \"100644 $o1 2\ta\"\n-\t\techo \"100644 $o4 0\ta/c\"\n-\t\techo \"100644 $o0 0\tb\"\n-\t\techo \"100644 $o0 0\tc\"\n+\t\techo \"100644 $o0 1\ta\" &&\n+\t\techo \"100644 $o1 2\ta\" &&\n+\t\techo \"100644 $o4 0\ta/c\" &&\n+\t\techo \"100644 $o0 0\tb\" &&\n+\t\techo \"100644 $o0 0\tc\" &&\n \t\techo \"100644 $o1 0\td/e\"\n \t) >expected &&\n \ttest_cmp expected actual\n@@ -393,11 +393,11 @@ test_expect_success 'merge-recursive d/f conflict result the other way' '\n \n \tgit ls-files -s >actual &&\n \t(\n-\t\techo \"100644 $o0 1\ta\"\n-\t\techo \"100644 $o1 3\ta\"\n-\t\techo \"100644 $o4 0\ta/c\"\n-\t\techo \"100644 $o0 0\tb\"\n-\t\techo \"100644 $o0 0\tc\"\n+\t\techo \"100644 $o0 1\ta\" &&\n+\t\techo \"100644 $o1 3\ta\" &&\n+\t\techo \"100644 $o4 0\ta/c\" &&\n+\t\techo \"100644 $o0 0\tb\" &&\n+\t\techo \"100644 $o0 0\tc\" &&\n \t\techo \"100644 $o1 0\td/e\"\n \t) >expected &&\n \ttest_cmp expected actual\n@@ -417,11 +417,11 @@ test_expect_success 'merge-recursive d/f conflict result' '\n \n \tgit ls-files -s >actual &&\n \t(\n-\t\techo \"100644 $o1 0\ta\"\n-\t\techo \"100644 $o0 0\tb\"\n-\t\techo \"100644 $o0 0\tc\"\n-\t\techo \"100644 $o6 3\td\"\n-\t\techo \"100644 $o0 1\td/e\"\n+\t\techo \"100644 $o1 0\ta\" &&\n+\t\techo \"100644 $o0 0\tb\" &&\n+\t\techo \"100644 $o0 0\tc\" &&\n+\t\techo \"100644 $o6 3\td\" &&\n+\t\techo \"100644 $o0 1\td/e\" &&\n \t\techo \"100644 $o1 2\td/e\"\n \t) >expected &&\n \ttest_cmp expected actual\n@@ -441,11 +441,11 @@ test_expect_success 'merge-recursive d/f conflict result' '\n \n \tgit ls-files -s >actual &&\n \t(\n-\t\techo \"100644 $o1 0\ta\"\n-\t\techo \"100644 $o0 0\tb\"\n-\t\techo \"100644 $o0 0\tc\"\n-\t\techo \"100644 $o6 2\td\"\n-\t\techo \"100644 $o0 1\td/e\"\n+\t\techo \"100644 $o1 0\ta\" &&\n+\t\techo \"100644 $o0 0\tb\" &&\n+\t\techo \"100644 $o0 0\tc\" &&\n+\t\techo \"100644 $o6 2\td\" &&\n+\t\techo \"100644 $o0 1\td/e\" &&\n \t\techo \"100644 $o1 3\td/e\"\n \t) >expected &&\n \ttest_cmp expected actual\n@@ -465,13 +465,13 @@ test_expect_success 'reset and bind merge' '\n \tgit read-tree --prefix=M/ master &&\n \tgit ls-files -s >actual &&\n \t(\n-\t\techo \"100644 $o1 0\tM/a\"\n-\t\techo \"100644 $o0 0\tM/b\"\n-\t\techo \"100644 $o0 0\tM/c\"\n-\t\techo \"100644 $o1 0\tM/d/e\"\n-\t\techo \"100644 $o1 0\ta\"\n-\t\techo \"100644 $o0 0\tb\"\n-\t\techo \"100644 $o0 0\tc\"\n+\t\techo \"100644 $o1 0\tM/a\" &&\n+\t\techo \"100644 $o0 0\tM/b\" &&\n+\t\techo \"100644 $o0 0\tM/c\" &&\n+\t\techo \"100644 $o1 0\tM/d/e\" &&\n+\t\techo \"100644 $o1 0\ta\" &&\n+\t\techo \"100644 $o0 0\tb\" &&\n+\t\techo \"100644 $o0 0\tc\" &&\n \t\techo \"100644 $o1 0\td/e\"\n \t) >expected &&\n \ttest_cmp expected actual &&\n@@ -479,17 +479,17 @@ test_expect_success 'reset and bind merge' '\n \tgit read-tree --prefix=a1/ master &&\n \tgit ls-files -s >actual &&\n \t(\n-\t\techo \"100644 $o1 0\tM/a\"\n-\t\techo \"100644 $o0 0\tM/b\"\n-\t\techo \"100644 $o0 0\tM/c\"\n-\t\techo \"100644 $o1 0\tM/d/e\"\n-\t\techo \"100644 $o1 0\ta\"\n-\t\techo \"100644 $o1 0\ta1/a\"\n-\t\techo \"100644 $o0 0\ta1/b\"\n-\t\techo \"100644 $o0 0\ta1/c\"\n-\t\techo \"100644 $o1 0\ta1/d/e\"\n-\t\techo \"100644 $o0 0\tb\"\n-\t\techo \"100644 $o0 0\tc\"\n+\t\techo \"100644 $o1 0\tM/a\" &&\n+\t\techo \"100644 $o0 0\tM/b\" &&\n+\t\techo \"100644 $o0 0\tM/c\" &&\n+\t\techo \"100644 $o1 0\tM/d/e\" &&\n+\t\techo \"100644 $o1 0\ta\" &&\n+\t\techo \"100644 $o1 0\ta1/a\" &&\n+\t\techo \"100644 $o0 0\ta1/b\" &&\n+\t\techo \"100644 $o0 0\ta1/c\" &&\n+\t\techo \"100644 $o1 0\ta1/d/e\" &&\n+\t\techo \"100644 $o0 0\tb\" &&\n+\t\techo \"100644 $o0 0\tc\" &&\n \t\techo \"100644 $o1 0\td/e\"\n \t) >expected &&\n \ttest_cmp expected actual &&\n@@ -497,21 +497,21 @@ test_expect_success 'reset and bind merge' '\n \tgit read-tree --prefix=z/ master &&\n \tgit ls-files -s >actual &&\n \t(\n-\t\techo \"100644 $o1 0\tM/a\"\n-\t\techo \"100644 $o0 0\tM/b\"\n-\t\techo \"100644 $o0 0\tM/c\"\n-\t\techo \"100644 $o1 0\tM/d/e\"\n-\t\techo \"100644 $o1 0\ta\"\n-\t\techo \"100644 $o1 0\ta1/a\"\n-\t\techo \"100644 $o0 0\ta1/b\"\n-\t\techo \"100644 $o0 0\ta1/c\"\n-\t\techo \"100644 $o1 0\ta1/d/e\"\n-\t\techo \"100644 $o0 0\tb\"\n-\t\techo \"100644 $o0 0\tc\"\n-\t\techo \"100644 $o1 0\td/e\"\n-\t\techo \"100644 $o1 0\tz/a\"\n-\t\techo \"100644 $o0 0\tz/b\"\n-\t\techo \"100644 $o0 0\tz/c\"\n+\t\techo \"100644 $o1 0\tM/a\" &&\n+\t\techo \"100644 $o0 0\tM/b\" &&\n+\t\techo \"100644 $o0 0\tM/c\" &&\n+\t\techo \"100644 $o1 0\tM/d/e\" &&\n+\t\techo \"100644 $o1 0\ta\" &&\n+\t\techo \"100644 $o1 0\ta1/a\" &&\n+\t\techo \"100644 $o0 0\ta1/b\" &&\n+\t\techo \"100644 $o0 0\ta1/c\" &&\n+\t\techo \"100644 $o1 0\ta1/d/e\" &&\n+\t\techo \"100644 $o0 0\tb\" &&\n+\t\techo \"100644 $o0 0\tc\" &&\n+\t\techo \"100644 $o1 0\td/e\" &&\n+\t\techo \"100644 $o1 0\tz/a\" &&\n+\t\techo \"100644 $o0 0\tz/b\" &&\n+\t\techo \"100644 $o0 0\tz/c\" &&\n \t\techo \"100644 $o1 0\tz/d/e\"\n \t) >expected &&\n \ttest_cmp expected actual\n@@ -589,8 +589,8 @@ test_expect_success 'merge-recursive simple w/submodule result' '\n \n \tgit ls-files -s >actual &&\n \t(\n-\t\techo \"100644 $o5 0\ta\"\n-\t\techo \"100644 $o0 0\tc\"\n+\t\techo \"100644 $o5 0\ta\" &&\n+\t\techo \"100644 $o0 0\tc\" &&\n \t\techo \"160000 $c1 0\td\"\n \t) >expected &&\n \ttest_cmp expected actual\n@@ -601,13 +601,13 @@ test_expect_success 'merge-recursive copy vs. rename' '\n \tgit merge rename &&\n \t( git ls-tree -r HEAD && git ls-files -s ) >actual &&\n \t(\n-\t\techo \"100644 blob $o0\tb\"\n-\t\techo \"100644 blob $o0\tc\"\n-\t\techo \"100644 blob $o0\td/e\"\n-\t\techo \"100644 blob $o0\te\"\n-\t\techo \"100644 $o0 0\tb\"\n-\t\techo \"100644 $o0 0\tc\"\n-\t\techo \"100644 $o0 0\td/e\"\n+\t\techo \"100644 blob $o0\tb\" &&\n+\t\techo \"100644 blob $o0\tc\" &&\n+\t\techo \"100644 blob $o0\td/e\" &&\n+\t\techo \"100644 blob $o0\te\" &&\n+\t\techo \"100644 $o0 0\tb\" &&\n+\t\techo \"100644 $o0 0\tc\" &&\n+\t\techo \"100644 $o0 0\td/e\" &&\n \t\techo \"100644 $o0 0\te\"\n \t) >expected &&\n \ttest_cmp expected actual\n@@ -617,17 +617,17 @@ test_expect_failure 'merge-recursive rename vs. rename/symlink' '\n \n \tgit checkout -f rename &&\n \tgit merge rename-ln &&\n-\t( git ls-tree -r HEAD ; git ls-files -s ) >actual &&\n+\t( git ls-tree -r HEAD && git ls-files -s ) >actual &&\n \t(\n-\t\techo \"120000 blob $oln\ta\"\n-\t\techo \"100644 blob $o0\tb\"\n-\t\techo \"100644 blob $o0\tc\"\n-\t\techo \"100644 blob $o0\td/e\"\n-\t\techo \"100644 blob $o0\te\"\n-\t\techo \"120000 $oln 0\ta\"\n-\t\techo \"100644 $o0 0\tb\"\n-\t\techo \"100644 $o0 0\tc\"\n-\t\techo \"100644 $o0 0\td/e\"\n+\t\techo \"120000 blob $oln\ta\" &&\n+\t\techo \"100644 blob $o0\tb\" &&\n+\t\techo \"100644 blob $o0\tc\" &&\n+\t\techo \"100644 blob $o0\td/e\" &&\n+\t\techo \"100644 blob $o0\te\" &&\n+\t\techo \"120000 $oln 0\ta\" &&\n+\t\techo \"100644 $o0 0\tb\" &&\n+\t\techo \"100644 $o0 0\tc\" &&\n+\t\techo \"100644 $o0 0\td/e\" &&\n \t\techo \"100644 $o0 0\te\"\n \t) >expected &&\n \ttest_cmp expected actual\n-- \n2.18.0.203.gfac676dfb9\n\n"},{"id":"351503","messageId":"20180702002405.3042-19-sunshine@sunshineco.com","threadId":"48813","inReplyTo":"20180702002405.3042-1-sunshine@sunshineco.com","subject":"[PATCH 18/25] t3000-t3999: fix broken &&-chains","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2018-07-02T00:23:58Z","receivedAt":"2018-07-02T00:25:52Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>\n---\n t/t3000-ls-files-others.sh              | 2 +-\n t/t3006-ls-files-long.sh                | 2 +-\n t/t3008-ls-files-lazy-init-name-hash.sh | 8 ++++----\n t/t3050-subprojects-fetch.sh            | 8 ++++----\n t/t3210-pack-refs.sh                    | 4 ++--\n t/t3301-notes.sh                        | 8 ++++----\n t/t3400-rebase.sh                       | 8 ++++----\n t/t3402-rebase-merge.sh                 | 4 ++--\n t/t3418-rebase-continue.sh              | 4 ++--\n t/t3700-add.sh                          | 8 ++++----\n 10 files changed, 28 insertions(+), 28 deletions(-)\n\ndiff --git a/t/t3000-ls-files-others.sh b/t/t3000-ls-files-others.sh\nindex c525656b2c..afd4756134 100755\n--- a/t/t3000-ls-files-others.sh\n+++ b/t/t3000-ls-files-others.sh\n@@ -84,7 +84,7 @@ test_expect_success SYMLINKS 'ls-files --others with symlinked submodule' '\n \t) &&\n \t(\n \t\tcd super &&\n-\t\t\"$SHELL_PATH\" \"$TEST_DIRECTORY/../contrib/workdir/git-new-workdir\" ../sub sub\n+\t\t\"$SHELL_PATH\" \"$TEST_DIRECTORY/../contrib/workdir/git-new-workdir\" ../sub sub &&\n \t\tgit ls-files --others --exclude-standard >../actual\n \t) &&\n \techo sub/ >expect &&\ndiff --git a/t/t3006-ls-files-long.sh b/t/t3006-ls-files-long.sh\nindex 202ad658b8..e109c3fbfb 100755\n--- a/t/t3006-ls-files-long.sh\n+++ b/t/t3006-ls-files-long.sh\n@@ -29,7 +29,7 @@ test_expect_success 'overly-long path does not replace another by mistake' '\n \tprintf \"$pat\" \"$blob_a\" \"$path_a\" \"$blob_z\" \"$path_z\" |\n \tgit update-index --add --index-info &&\n \t(\n-\t\techo \"$path_a\"\n+\t\techo \"$path_a\" &&\n \t\techo \"$path_z\"\n \t) >expect &&\n \tgit ls-files >actual &&\ndiff --git a/t/t3008-ls-files-lazy-init-name-hash.sh b/t/t3008-ls-files-lazy-init-name-hash.sh\nindex 08af596ba6..64f047332b 100755\n--- a/t/t3008-ls-files-lazy-init-name-hash.sh\n+++ b/t/t3008-ls-files-lazy-init-name-hash.sh\n@@ -14,10 +14,10 @@ LAZY_THREAD_COST=2000\n \n test_expect_success 'no buffer overflow in lazy_init_name_hash' '\n \t(\n-\t    test_seq $LAZY_THREAD_COST | sed \"s/^/a_/\"\n-\t    echo b/b/b\n-\t    test_seq $LAZY_THREAD_COST | sed \"s/^/c_/\"\n-\t    test_seq 50 | sed \"s/^/d_/\" | tr \"\\n\" \"/\"; echo d\n+\t    test_seq $LAZY_THREAD_COST | sed \"s/^/a_/\" &&\n+\t    echo b/b/b &&\n+\t    test_seq $LAZY_THREAD_COST | sed \"s/^/c_/\" &&\n+\t    test_seq 50 | sed \"s/^/d_/\" | tr \"\\n\" \"/\" && echo d\n \t) |\n \tsed \"s/^/100644 $EMPTY_BLOB\t/\" |\n \tgit update-index --index-info &&\ndiff --git a/t/t3050-subprojects-fetch.sh b/t/t3050-subprojects-fetch.sh\nindex 2f5f41a012..f1f09abdd9 100755\n--- a/t/t3050-subprojects-fetch.sh\n+++ b/t/t3050-subprojects-fetch.sh\n@@ -21,10 +21,10 @@ test_expect_success setup '\n \n test_expect_success clone '\n \tgit clone \"file://$(pwd)/.git\" cloned &&\n-\t(git rev-parse HEAD; git ls-files -s) >expected &&\n+\t(git rev-parse HEAD && git ls-files -s) >expected &&\n \t(\n \t\tcd cloned &&\n-\t\t(git rev-parse HEAD; git ls-files -s) >../actual\n+\t\t(git rev-parse HEAD && git ls-files -s) >../actual\n \t) &&\n \ttest_cmp expected actual\n '\n@@ -40,11 +40,11 @@ test_expect_success advance '\n '\n \n test_expect_success fetch '\n-\t(git rev-parse HEAD; git ls-files -s) >expected &&\n+\t(git rev-parse HEAD && git ls-files -s) >expected &&\n \t(\n \t\tcd cloned &&\n \t\tgit pull &&\n-\t\t(git rev-parse HEAD; git ls-files -s) >../actual\n+\t\t(git rev-parse HEAD && git ls-files -s) >../actual\n \t) &&\n \ttest_cmp expected actual\n '\ndiff --git a/t/t3210-pack-refs.sh b/t/t3210-pack-refs.sh\nindex afa27ffe2d..724b4b9bc0 100755\n--- a/t/t3210-pack-refs.sh\n+++ b/t/t3210-pack-refs.sh\n@@ -231,9 +231,9 @@ test_expect_success 'timeout if packed-refs.lock exists' '\n test_expect_success 'retry acquiring packed-refs.lock' '\n \tLOCK=.git/packed-refs.lock &&\n \t>\"$LOCK\" &&\n-\ttest_when_finished \"wait; rm -f $LOCK\" &&\n+\ttest_when_finished \"wait && rm -f $LOCK\" &&\n \t{\n-\t\t( sleep 1 ; rm -f $LOCK ) &\n+\t\t( sleep 1 && rm -f $LOCK ) &\n \t} &&\n \tgit -c core.packedrefstimeout=3000 pack-refs --all --prune\n '\ndiff --git a/t/t3301-notes.sh b/t/t3301-notes.sh\nindex 2d200fdf36..ac62dc0e8f 100755\n--- a/t/t3301-notes.sh\n+++ b/t/t3301-notes.sh\n@@ -914,7 +914,7 @@ test_expect_success 'git notes copy --stdin' '\n \t\t${indent}\n \t\t${indent}yet another note\n \tEOF\n-\t(echo $(git rev-parse HEAD~3) $(git rev-parse HEAD^); \\\n+\t(echo $(git rev-parse HEAD~3) $(git rev-parse HEAD^) &&\n \techo $(git rev-parse HEAD~2) $(git rev-parse HEAD)) |\n \tgit notes copy --stdin &&\n \tgit log -2 >actual &&\n@@ -939,7 +939,7 @@ test_expect_success 'git notes copy --for-rewrite (unconfigured)' '\n \tEOF\n \ttest_commit 14th &&\n \ttest_commit 15th &&\n-\t(echo $(git rev-parse HEAD~3) $(git rev-parse HEAD^); \\\n+\t(echo $(git rev-parse HEAD~3) $(git rev-parse HEAD^) &&\n \techo $(git rev-parse HEAD~2) $(git rev-parse HEAD)) |\n \tgit notes copy --for-rewrite=foo &&\n \tgit log -2 >actual &&\n@@ -972,7 +972,7 @@ test_expect_success 'git notes copy --for-rewrite (enabled)' '\n \tEOF\n \ttest_config notes.rewriteMode overwrite &&\n \ttest_config notes.rewriteRef \"refs/notes/*\" &&\n-\t(echo $(git rev-parse HEAD~3) $(git rev-parse HEAD^); \\\n+\t(echo $(git rev-parse HEAD~3) $(git rev-parse HEAD^) &&\n \techo $(git rev-parse HEAD~2) $(git rev-parse HEAD)) |\n \tgit notes copy --for-rewrite=foo &&\n \tgit log -2 >actual &&\n@@ -1059,7 +1059,7 @@ test_expect_success 'git notes copy --for-rewrite (append two to one)' '\n \tgit notes add -f -m\"append 2\" HEAD^^ &&\n \ttest_config notes.rewriteMode concatenate &&\n \ttest_config notes.rewriteRef \"refs/notes/*\" &&\n-\t(echo $(git rev-parse HEAD^) $(git rev-parse HEAD);\n+\t(echo $(git rev-parse HEAD^) $(git rev-parse HEAD) &&\n \techo $(git rev-parse HEAD^^) $(git rev-parse HEAD)) |\n \tgit notes copy --for-rewrite=foo &&\n \tgit log -1 >actual &&\ndiff --git a/t/t3400-rebase.sh b/t/t3400-rebase.sh\nindex 72d9564747..3996ee0135 100755\n--- a/t/t3400-rebase.sh\n+++ b/t/t3400-rebase.sh\n@@ -200,10 +200,10 @@ test_expect_success 'rebase -q is quiet' '\n \n test_expect_success 'Rebase a commit that sprinkles CRs in' '\n \t(\n-\t\techo \"One\"\n-\t\techo \"TwoQ\"\n-\t\techo \"Three\"\n-\t\techo \"FQur\"\n+\t\techo \"One\" &&\n+\t\techo \"TwoQ\" &&\n+\t\techo \"Three\" &&\n+\t\techo \"FQur\" &&\n \t\techo \"Five\"\n \t) | q_to_cr >CR &&\n \tgit add CR &&\ndiff --git a/t/t3402-rebase-merge.sh b/t/t3402-rebase-merge.sh\nindex 488945e007..a1ec501a87 100755\n--- a/t/t3402-rebase-merge.sh\n+++ b/t/t3402-rebase-merge.sh\n@@ -25,7 +25,7 @@ test_expect_success setup '\n \tgit commit -a -m\"master updates a bit more.\" &&\n \n \tgit checkout side &&\n-\t(echo \"0 $T\" ; cat original) >renamed &&\n+\t(echo \"0 $T\" && cat original) >renamed &&\n \tgit add renamed &&\n \tgit update-index --force-remove original &&\n \tgit commit -a -m\"side renames and edits.\" &&\n@@ -143,7 +143,7 @@ test_expect_success 'rebase -s funny -Xopt' '\n \tgit checkout -b test-funny master^ &&\n \ttest_commit funny &&\n \t(\n-\t\tPATH=./test-bin:$PATH\n+\t\tPATH=./test-bin:$PATH &&\n \t\tgit rebase -s funny -Xopt master\n \t) &&\n \ttest -f funny.was.run\ndiff --git a/t/t3418-rebase-continue.sh b/t/t3418-rebase-continue.sh\nindex 03bf1b8a3b..853e015839 100755\n--- a/t/t3418-rebase-continue.sh\n+++ b/t/t3418-rebase-continue.sh\n@@ -60,7 +60,7 @@ test_expect_success 'rebase --continue remembers merge strategy and options' '\n \tEOF\n \tchmod +x test-bin/git-merge-funny &&\n \t(\n-\t\tPATH=./test-bin:$PATH\n+\t\tPATH=./test-bin:$PATH &&\n \t\ttest_must_fail git rebase -s funny -Xopt master topic\n \t) &&\n \ttest -f funny.was.run &&\n@@ -68,7 +68,7 @@ test_expect_success 'rebase --continue remembers merge strategy and options' '\n \techo \"Resolved\" >F2 &&\n \tgit add F2 &&\n \t(\n-\t\tPATH=./test-bin:$PATH\n+\t\tPATH=./test-bin:$PATH &&\n \t\tgit rebase --continue\n \t) &&\n \ttest -f funny.was.run\ndiff --git a/t/t3700-add.sh b/t/t3700-add.sh\nindex 07af05d7ae..618750167a 100755\n--- a/t/t3700-add.sh\n+++ b/t/t3700-add.sh\n@@ -156,9 +156,9 @@ test_expect_success 'git add with filemode=0, symlinks=0, and unmerged entries'\n test_expect_success 'git add with filemode=0, symlinks=0 prefers stage 2 over stage 1' '\n \tgit rm --cached -f file symlink &&\n \t(\n-\t\techo \"100644 $(git hash-object -w stage1) 1\tfile\"\n-\t\techo \"100755 $(git hash-object -w stage2) 2\tfile\"\n-\t\techo \"100644 $(printf 1 | git hash-object -w -t blob --stdin) 1\tsymlink\"\n+\t\techo \"100644 $(git hash-object -w stage1) 1\tfile\" &&\n+\t\techo \"100755 $(git hash-object -w stage2) 2\tfile\" &&\n+\t\techo \"100644 $(printf 1 | git hash-object -w -t blob --stdin) 1\tsymlink\" &&\n \t\techo \"120000 $(printf 2 | git hash-object -w -t blob --stdin) 2\tsymlink\"\n \t) | git update-index --index-info &&\n \tgit config core.filemode 0 &&\n@@ -265,7 +265,7 @@ test_expect_success 'git add to resolve conflicts on otherwise ignored path' '\n \tgit reset --hard &&\n \tH=$(git rev-parse :1/2/a) &&\n \t(\n-\t\techo \"100644 $H 1\ttrack-this\"\n+\t\techo \"100644 $H 1\ttrack-this\" &&\n \t\techo \"100644 $H 3\ttrack-this\"\n \t) | git update-index --index-info &&\n \techo track-this >>.gitignore &&\n-- \n2.18.0.203.gfac676dfb9\n\n"},{"id":"351504","messageId":"20180702002405.3042-15-sunshine@sunshineco.com","threadId":"48813","inReplyTo":"20180702002405.3042-1-sunshine@sunshineco.com","subject":"[PATCH 14/25] t9814: simplify convoluted check that command correctly errors out","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2018-07-02T00:23:54Z","receivedAt":"2018-07-02T00:25:56Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"This test uses a convoluted method to verify that \"p4 help\" errors\nout when asked for help about an unknown command. In doing so, it\nintentionally breaks the &&-chain. Simplify by employing the typical\n\"! command\" idiom and a normal &&-chain instead.\n\nSigned-off-by: Eric Sunshine <sunshine@sunshineco.com>\n---\n t/t9814-git-p4-rename.sh | 18 +++---------------\n 1 file changed, 3 insertions(+), 15 deletions(-)\n\ndiff --git a/t/t9814-git-p4-rename.sh b/t/t9814-git-p4-rename.sh\nindex e7e0268e98..60baa06e27 100755\n--- a/t/t9814-git-p4-rename.sh\n+++ b/t/t9814-git-p4-rename.sh\n@@ -9,23 +9,11 @@ test_expect_success 'start p4d' '\n '\n \n # We rely on this behavior to detect for p4 move availability.\n-test_expect_success 'p4 help unknown returns 1' '\n+test_expect_success '\"p4 help unknown\" errors out' '\n \t(\n \t\tcd \"$cli\" &&\n-\t\t(\n-\t\t\tp4 help client >errs 2>&1\n-\t\t\techo $? >retval\n-\t\t)\n-\t\techo 0 >expected &&\n-\t\ttest_cmp expected retval &&\n-\t\trm retval &&\n-\t\t(\n-\t\t\tp4 help nosuchcommand >errs 2>&1\n-\t\t\techo $? >retval\n-\t\t)\n-\t\techo 1 >expected &&\n-\t\ttest_cmp expected retval &&\n-\t\trm retval\n+\t\tp4 help client &&\n+\t\t! p4 help nosuchcommand\n \t)\n '\n \n-- \n2.18.0.203.gfac676dfb9\n\n"},{"id":"351505","messageId":"20180702002405.3042-10-sunshine@sunshineco.com","threadId":"48813","inReplyTo":"20180702002405.3042-1-sunshine@sunshineco.com","subject":"[PATCH 09/25] t6036: fix broken \"merge fails but has appropriate contents\" tests","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2018-07-02T00:23:49Z","receivedAt":"2018-07-02T00:25:59Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"These tests reference non-existent object \"c\" when they really mean to\nbe referencing \"C\", however, these errors went unnoticed due to a broken\n&&-chain later in the tests. Fix these errors, as well as the broken\n&&-chains behind which they hid.\n\nReviewed-by: Elijah Newren <newren@gmail.com>\nSigned-off-by: Eric Sunshine <sunshine@sunshineco.com>\n---\n t/t6036-recursive-corner-cases.sh | 8 ++++----\n 1 file changed, 4 insertions(+), 4 deletions(-)\n\ndiff --git a/t/t6036-recursive-corner-cases.sh b/t/t6036-recursive-corner-cases.sh\nindex b5621303d6..b32ff8e1db 100755\n--- a/t/t6036-recursive-corner-cases.sh\n+++ b/t/t6036-recursive-corner-cases.sh\n@@ -506,10 +506,10 @@ test_expect_success 'merge of D & E2 fails but has appropriate contents' '\n \t\ttest_line_count = 2 out &&\n \n \t\tgit rev-parse >expect    \\\n-\t\t\tB:a   E2:a/file  c:a/file   A:ignore-me &&\n+\t\t\tB:a   E2:a/file  C:a/file   A:ignore-me &&\n \t\tgit rev-parse   >actual   \\\n \t\t\t:2:a  :3:a/file  :1:a/file  :0:ignore-me &&\n-\t\ttest_cmp expect actual\n+\t\ttest_cmp expect actual &&\n \n \t\ttest_path_is_file a~HEAD\n \t)\n@@ -533,10 +533,10 @@ test_expect_success 'merge of E2 & D fails but has appropriate contents' '\n \t\ttest_line_count = 2 out &&\n \n \t\tgit rev-parse >expect    \\\n-\t\t\tB:a   E2:a/file  c:a/file   A:ignore-me &&\n+\t\t\tB:a   E2:a/file  C:a/file   A:ignore-me &&\n \t\tgit rev-parse   >actual   \\\n \t\t\t:3:a  :2:a/file  :1:a/file  :0:ignore-me &&\n-\t\ttest_cmp expect actual\n+\t\ttest_cmp expect actual &&\n \n \t\ttest_path_is_file a~D^0\n \t)\n-- \n2.18.0.203.gfac676dfb9\n\n"},{"id":"351506","messageId":"20180702002405.3042-7-sunshine@sunshineco.com","threadId":"48813","inReplyTo":"20180702002405.3042-1-sunshine@sunshineco.com","subject":"[PATCH 06/25] t5405: use test_must_fail() instead of checking exit code manually","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2018-07-02T00:23:46Z","receivedAt":"2018-07-02T00:26:02Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"This test expects \"git push\" to fail, thus it manually inverts that\nlocal expected failure into a successful exit code for the test overall.\nIn doing so, it intentionally breaks the &&-chain. Modernize by\nreplacing manual exit code management with test_must_fail() and a normal\n&&-chain.\n\nSigned-off-by: Eric Sunshine <sunshine@sunshineco.com>\n---\n t/t5405-send-pack-rewind.sh | 3 +--\n 1 file changed, 1 insertion(+), 2 deletions(-)\n\ndiff --git a/t/t5405-send-pack-rewind.sh b/t/t5405-send-pack-rewind.sh\nindex 4bda18a662..235fb7686a 100755\n--- a/t/t5405-send-pack-rewind.sh\n+++ b/t/t5405-send-pack-rewind.sh\n@@ -25,8 +25,7 @@ test_expect_success 'non forced push should die not segfault' '\n \n \t(\n \t\tcd another &&\n-\t\tgit push .. master:master\n-\t\ttest $? = 1\n+\t\ttest_must_fail git push .. master:master\n \t)\n \n '\n-- \n2.18.0.203.gfac676dfb9\n\n"},{"id":"351507","messageId":"20180702002405.3042-14-sunshine@sunshineco.com","threadId":"48813","inReplyTo":"20180702002405.3042-1-sunshine@sunshineco.com","subject":"[PATCH 13/25] t9001: fix broken \"invoke hook\" test","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2018-07-02T00:23:53Z","receivedAt":"2018-07-02T00:26:05Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"This test has been dysfunctional since it was added by 6489660b4b\n(send-email: support validate hook, 2017-05-12), however, the problem\nwent unnoticed due to a broken &&-chain late in the test.\n\nThe test wants to verify that a non-zero exit code from the\n'sendemail-validate' hook causes git-send-email to abort with a\nparticular error message. A command which is expected to fail should be\nrun with 'test_must_fail', however, the test neglects to do so.\n\nFix this problem, as well as the broken &&-chain behind which the\nproblem hid.\n\nSigned-off-by: Eric Sunshine <sunshine@sunshineco.com>\n---\n t/t9001-send-email.sh | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh\nindex e80eacbb1b..776769fe0d 100755\n--- a/t/t9001-send-email.sh\n+++ b/t/t9001-send-email.sh\n@@ -1966,11 +1966,11 @@ test_expect_success $PREREQ 'invoke hook' '\n \n \t\t# Verify error message when a patch is rejected by the hook\n \t\tsed -e \"s/add master/x/\" ../0001-add-master.patch >../another.patch &&\n-\t\tgit send-email \\\n+\t\ttest_must_fail git send-email \\\n \t\t\t--from=\"Example <nobody@example.com>\" \\\n \t\t\t--to=nobody@example.com \\\n \t\t\t--smtp-server=\"$(pwd)/../fake.sendmail\" \\\n-\t\t\t../another.patch 2>err\n+\t\t\t../another.patch 2>err &&\n \t\ttest_i18ngrep \"rejected by sendemail-validate hook\" err\n \t)\n '\n-- \n2.18.0.203.gfac676dfb9\n\n"},{"id":"351535","messageId":"CAGZ79kah+mFH0YZ1L0R+f=fRVku1mesigm86oHTHKRRFc3y+0A@mail.gmail.com","threadId":"48813","inReplyTo":"20180702002405.3042-2-sunshine@sunshineco.com","subject":"Re: [PATCH 01/25] t: use test_might_fail() instead of manipulating exit code manually","fromName":"Stefan Beller","fromEmail":"sbeller@google.com","sentAt":"2018-07-02T17:44:16Z","receivedAt":"2018-07-02T17:44:32Z","isPatch":true,"sender":{"key":"stefanbeller@gmail.com","avatar":"https://avatars.githubusercontent.com/u/455868?v=4"},"body":"> diff --git a/t/t4012-diff-binary.sh b/t/t4012-diff-binary.sh\n> index 0a8af76aab..6579c81216 100755\n> --- a/t/t4012-diff-binary.sh\n> +++ b/t/t4012-diff-binary.sh\n> @@ -102,10 +102,8 @@ test_expect_success 'apply binary patch' '\n>\n>  test_expect_success 'diff --no-index with binary creation' '\n>         echo Q | q_to_nul >binary &&\n> -       (: hide error code from diff, which just indicates differences\n> -        git diff --binary --no-index /dev/null binary >current ||\n> -        true\n> -       ) &&\n> +       # hide error code from diff, which just indicates differences\n> +       test_might_fail git diff --binary --no-index /dev/null binary >current &&\n\nI am not sure why we need to be non-deterministic here, i.e. I would rather\ntest for success or non-success error code and not just *any* error code.\n\nThis code was introduced in\n71b989e7dd1 (fix bogus \"diff --git\" header from \"diff --no-index\", 2008-10-05)\nwhereas the test_must_fail was introduced in\n74359821020 (tests: introduce test_must_fail, 2008-02-28).\nHowever this code was authored without Junios involvement\n(he was AFK 2008-09-23..2008-10-08), so\nmaybe test_must_fail was not so popular back then?\n\nWhile I think this patch is a strict improvement for the test suite,\nI do wonder if we can tighten the exit code check here (maybe in\na follow up series?).\n\nThanks,\nStefan\n"},{"id":"351536","messageId":"CAGZ79kamB-bid=RhDj1_vviHtD=5KCWaRJAFXh1RtwGdXgPTWA@mail.gmail.com","threadId":"48813","inReplyTo":"20180702002405.3042-3-sunshine@sunshineco.com","subject":"Re: [PATCH 02/25] t: use test_write_lines() instead of series of 'echo' commands","fromName":"Stefan Beller","fromEmail":"sbeller@google.com","sentAt":"2018-07-02T17:53:09Z","receivedAt":"2018-07-02T17:53:23Z","isPatch":true,"sender":{"key":"stefanbeller@gmail.com","avatar":"https://avatars.githubusercontent.com/u/455868?v=4"},"body":"On Sun, Jul 1, 2018 at 5:24 PM Eric Sunshine <sunshine@sunshineco.com> wrote:\n>\n> These tests employ a noisy subshell (with missing &&-chain) to feed\n> input into Git commands or files:\n>\n>     (echo a; echo b; echo c) | git some-command ...\n>\n> Simplify by taking advantage of test_write_lines():\n>\n>     test_write_lines a b c | git some-command ...\n\n...\nand as piped commands only return the exit code of\nthe last command in the piping structure this is ok,\nas all git commands are the last command here.\n\nIf any of the non-last commands are failing (which\nare the test_write_lines after this patch), we would\nonly care if the git command fails any way, as there is\nno benefit in testing the correctness of test_write_lines.\n\nThis is why we chose to go this route instead of\nwriting the output to a file and then taking the file\nas input for the git command. Although this alternative\nmight be easier to debug, we choose to not use that\nas it would complicate this patch even more and these\ntests did not need debugging for a long time.\n\nMakes sense.\n\nStefan\n"},{"id":"351539","messageId":"CAGZ79kZXhZyhDL_+cFK6BzL-RL7Ac0zKeKux97v9shc+qm+nOA@mail.gmail.com","threadId":"48813","inReplyTo":"20180702002405.3042-1-sunshine@sunshineco.com","subject":"Re: [PATCH 00/25] fix buggy tests, modernize tests, fix broken &&-chains","fromName":"Stefan Beller","fromEmail":"sbeller@google.com","sentAt":"2018-07-02T18:27:14Z","receivedAt":"2018-07-02T18:27:30Z","isPatch":true,"sender":{"key":"stefanbeller@gmail.com","avatar":"https://avatars.githubusercontent.com/u/455868?v=4"},"body":"On Sun, Jul 1, 2018 at 5:24 PM Eric Sunshine <sunshine@sunshineco.com> wrote:\n>\n> This series fixes several buggy tests which went undetected due to\n> broken &&-chains in subshells, modernizes some tests to take advantage\n> of test functions (test_might_fail(), test_write_lines(), etc.), and\n> fixes a lot of broken &&-chains in subshells. It applies atop\n> 'master'. Happily, there are no broken &&-chains in subshells in any\n> in-flight topic.\n>\n> It is split out from an earlier series[1] which additionally extended\n> --chain-lint to work within subshells. I decided to make this an\n> independent series because these (hopefully) non-controversial changes\n> all stand on their own merit, and because I don't want to flood the list\n> repeatedly with this lengthy series as I re-roll the \"extend\n> --chain-lint to work in subshells\" functionality from [1].\n>\n> To ease review burden, I largely avoided noisy modernizations and\n> cleanups, and limited changes to merely adding \"&&\" even when some other\n> transformation would have made the fix nicer overall. (For example, I\n> resisted the urge to replace a series of 'echo' statements with a simple\n> here-doc.)\n>\n> Changes since [1]:\n>\n> * Found and fixed more &&-chain breakage, and converted a couple more\n>   'unset' instances (which were hidden behind a MINGW prerequisite) to\n>   sane_unset().\n>\n> * Rewrote commit messages to sell changes on their own merit rather than\n>   leaning on --chain-lint as a crutch. (junio, jrnieder)\n>\n> * Changed a modernization/cleanup to use \"! non-git-command\" rather than\n>   test_must_fail(), moving it to its own patch in the process. (j6t)\n>\n> * Changed \"printf '%s\\n'\" idiom to test_write_lines(). (junio)\n>\n> * Incorporated Stefan's fix[2] for a broken 't/lib-submodule-update'\n>   test since my interpretation of the problem was incorrect.\n>\n> * Converted a subshell 'echo' sequence to write_script().\n>\n> * Dropped patches which existed primarily to pacify --chain-lint; they\n>   are no longer needed since I re-wrote the \"linter\" to detect &&-chain\n>   breakage itself (by pure textual inspection) rather than by\n>   incorporating subshell bodies into the main &&-chain:\n>\n>   t0001: use \"{...}\" block around \"||\" expression rather than subshell\n>   t3303: use standard here-doc tag \"EOF\" to avoid fooling --chain-lint\n>   t9104: use \"{...}\" block around \"||\" expression rather than subshell\n>   t9401: drop unnecessary nested subshell\n>\n> * Dropped a patch which pretty much duplicated Junio's 037714252f\n>   (tests: clean after SANITY tests, 2018-06-15), which graduated to\n>   'master':\n>\n>   t7508: use test_when_finished() instead of managing exit code manually\n>\n> An interdiff against [1] is below, although I stripped out all the noisy\n> \"printf '%s\\n'\" to test_write_lines() differences, of which there were a\n> lot, since they drowned out the other more significant changes.\n>\n> Thanks to Elijah, Hannes, Jonathan Nieder, Jonathan Tan, Junio, Luke,\n> Peff, and Stefan for comments on [1].\n\nThanks for this series,\nI think it is good to include it as is and build on top if needed. I had some\ncomments on the earlier part of the series, but that is really just the cherry\non top of the cake.\n\nThanks,\nStefan\n"},{"id":"351541","messageId":"CAGZ79kZFSAe1NL3EVKtbSm6E9PvhajWdrrbwDNMm2K5FRH7m-Q@mail.gmail.com","threadId":"48813","inReplyTo":"20180702002405.3042-13-sunshine@sunshineco.com","subject":"Re: [PATCH 12/25] t7810: use test_expect_code() instead of hand-rolled comparison","fromName":"Stefan Beller","fromEmail":"sbeller@google.com","sentAt":"2018-07-02T18:05:48Z","receivedAt":"2018-07-02T18:30:13Z","isPatch":true,"sender":{"key":"stefanbeller@gmail.com","avatar":"https://avatars.githubusercontent.com/u/455868?v=4"},"body":"On Sun, Jul 1, 2018 at 5:25 PM Eric Sunshine <sunshine@sunshineco.com> wrote:\n>\n> This test manually checks the exit code of git-grep for a particular\n> value. In doing so, it intentionally breaks the &&-chain. Modernize the\n> test by taking advantage of test_expect_code() and a normal &&-chain.\n>\n> Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>\n> ---\n>  t/t7810-grep.sh | 7 +++----\n>  1 file changed, 3 insertions(+), 4 deletions(-)\n>\n> diff --git a/t/t7810-grep.sh b/t/t7810-grep.sh\n> index 1797f632a3..fecee602c1 100755\n> --- a/t/t7810-grep.sh\n> +++ b/t/t7810-grep.sh\n> @@ -845,10 +845,9 @@ test_expect_success 'grep from a subdirectory to search wider area (1)' '\n>  test_expect_success 'grep from a subdirectory to search wider area (2)' '\n>         mkdir -p s &&\n>         (\n> -               cd s || exit 1\n> -               ( git grep xxyyzz .. >out ; echo $? >status )\n> -               ! test -s out &&\n> -               test 1 = $(cat status)\n> +               cd s &&\n> +               test_expect_code 1 git grep xxyyzz .. >out &&\n> +               ! test -s out\n>         )\n\nFurther optimisation would be possible if I understand the code correctly:\n\n    test_expect_code git -C s grep xxyyzz .. >../out\n    test_must_be_empty out\n\n(dropping the subshell entirely)\n\n\n>  '\n>\n> --\n> 2.18.0.203.gfac676dfb9\n>\n"},{"id":"351560","messageId":"CAPig+cSpDi8o6s2dQoDqb5_fbZ1ROY0guPxptQ=6syK6r9Shcg@mail.gmail.com","threadId":"48813","inReplyTo":"CAGZ79kah+mFH0YZ1L0R+f=fRVku1mesigm86oHTHKRRFc3y+0A@mail.gmail.com","subject":"Re: [PATCH 01/25] t: use test_might_fail() instead of manipulating exit code manually","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2018-07-02T20:58:13Z","receivedAt":"2018-07-02T20:58:28Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Mon, Jul 2, 2018 at 1:44 PM Stefan Beller <sbeller@google.com> wrote:\n> > diff --git a/t/t4012-diff-binary.sh b/t/t4012-diff-binary.sh\n> >  test_expect_success 'diff --no-index with binary creation' '\n> >         echo Q | q_to_nul >binary &&\n> > -       (: hide error code from diff, which just indicates differences\n> > -        git diff --binary --no-index /dev/null binary >current ||\n> > -        true\n> > -       ) &&\n> > +       # hide error code from diff, which just indicates differences\n> > +       test_might_fail git diff --binary --no-index /dev/null binary >current &&\n>\n> I am not sure why we need to be non-deterministic here, i.e. I would rather\n> test for success or non-success error code and not just *any* error code.\n>\n> While I think this patch is a strict improvement for the test suite,\n> I do wonder if we can tighten the exit code check here (maybe in\n> a follow up series?).\n\nI agree that such a change is out of the scope of this patch series.\n\nBut, do keep in mind that the exit code of git-diff doesn't indicate\nonly \"success\" or \"error\". Various exit codes represent different\nconditions; for instance, 1 means differences were found, 0 means no\ndifferences, and -1 means error. The outcome of this test is based\nupon output generated by git-diff, so the test itself will fail\noverall if git-diff doesn't produce expected results. Also, there is\nan entire test script (t4017-diff-retval.sh) concerned with verifying\ngit-diff exit code, so I'm not sure we need to worry about it too much\nhere.\n\n(I'm not arguing against a follow-up patch, though, just thinking\naloud about its potential value.)\n"},{"id":"351565","messageId":"CAPig+cTr_nCYkGn6DVtODOa+ufsr4V006FmdvqL63PzvpARvUA@mail.gmail.com","threadId":"48813","inReplyTo":"CAGZ79kZFSAe1NL3EVKtbSm6E9PvhajWdrrbwDNMm2K5FRH7m-Q@mail.gmail.com","subject":"Re: [PATCH 12/25] t7810: use test_expect_code() instead of hand-rolled comparison","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2018-07-02T21:12:49Z","receivedAt":"2018-07-02T21:13:03Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Mon, Jul 2, 2018 at 2:14 PM Stefan Beller <sbeller@google.com> wrote:\n> On Sun, Jul 1, 2018 at 5:25 PM Eric Sunshine <sunshine@sunshineco.com> wrote:\n> >  test_expect_success 'grep from a subdirectory to search wider area (2)' '\n> >         mkdir -p s &&\n> >         (\n> > -               cd s || exit 1\n> > -               ( git grep xxyyzz .. >out ; echo $? >status )\n> > -               ! test -s out &&\n> > -               test 1 = $(cat status)\n> > +               cd s &&\n> > +               test_expect_code 1 git grep xxyyzz .. >out &&\n> > +               ! test -s out\n> >         )\n>\n> Further optimisation would be possible if I understand the code correctly:\n>\n>     test_expect_code git -C s grep xxyyzz .. >../out\n>     test_must_be_empty out\n>\n> (dropping the subshell entirely)\n\nI did consider dropping the subshell in favor of -C, however, decided\nto keep it since the subshell has value by making it very explicit to\nthe reader that this git-grep command is running in a subdirectory\n(which is what this test is all about). Contrast that with -C which is\neasy to overlook and might not fully convince the reader that the\ncommand's entire execution is within the subdirectory, whereas there\nis no question that the entire execution of git-diff in \"(cd s &&\ngit-diff ...)\" occurs in the subdirectory.\n\nI can make the test_must_be_empty() change if I re-roll.\n"},{"id":"351566","messageId":"CAPig+cTUZ__JgvW4WZZPY0BG+jDgXS8FTU5pSghr0XUeObKDCQ@mail.gmail.com","threadId":"48813","inReplyTo":"CAGZ79kZXhZyhDL_+cFK6BzL-RL7Ac0zKeKux97v9shc+qm+nOA@mail.gmail.com","subject":"Re: [PATCH 00/25] fix buggy tests, modernize tests, fix broken &&-chains","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2018-07-02T21:20:42Z","receivedAt":"2018-07-02T21:20:59Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Mon, Jul 2, 2018 at 2:27 PM Stefan Beller <sbeller@google.com> wrote:\n> On Sun, Jul 1, 2018 at 5:24 PM Eric Sunshine <sunshine@sunshineco.com> wrote:\n> > This series fixes several buggy tests which went undetected due to\n> > broken &&-chains in subshells, modernizes some tests to take advantage\n> > of test functions (test_might_fail(), test_write_lines(), etc.), and\n> > fixes a lot of broken &&-chains in subshells. [...]\n>\n> I think it is good to include it as is and build on top if needed. I had some\n> comments on the earlier part of the series, but that is really just the cherry\n> on top of the cake.\n\nThanks for the review comments.\n"},{"id":"351641","messageId":"xmqqin5wqg7e.fsf@gitster-ct.c.googlers.com","threadId":"48813","inReplyTo":"20180702002405.3042-2-sunshine@sunshineco.com","subject":"Re: [PATCH 01/25] t: use test_might_fail() instead of manipulating exit code manually","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2018-07-03T19:20:21Z","receivedAt":"2018-07-03T19:20:26Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Eric Sunshine <sunshine@sunshineco.com> writes:\n\n>  test_expect_success 'merge my-side@{u} records the correct name' '\n>  (\n> -\tcd clone || exit\n> -\tgit checkout master || exit\n> -\tgit branch -D new ;# can fail but is ok\n> +\tcd clone &&\n> +\tgit checkout master &&\n> +\ttest_might_fail git branch -D new &&\n\nI wonder why we had these \"|| exit\" in the first place, but these\nare obviously good changes.\n\n> diff --git a/t/t1700-split-index.sh b/t/t1700-split-index.sh\n> index 1e81b33b2e..39133bcbc8 100755\n> --- a/t/t1700-split-index.sh\n> +++ b/t/t1700-split-index.sh\n> @@ -435,7 +435,7 @@ test_expect_success 'writing split index with null sha1 does not write cache tre\n>  \tcommit=$(git commit-tree $tree -p HEAD <msg) &&\n>  \tgit update-ref HEAD \"$commit\" &&\n>  \tGIT_ALLOW_NULL_SHA1=1 git reset --hard &&\n> -\t(test-tool dump-cache-tree >cache-tree.out || true) &&\n> +\ttest_might_fail test-tool dump-cache-tree >cache-tree.out &&\n>  \ttest_line_count = 0 cache-tree.out\n>  '\n\nI wonder where the unstable expectation for the exit status comes\nfrom.  4bddd983 (\"split-index: don't write cache tree with null oid\nentries\", 2018-01-07) is not exactly illuminating, either X-<.\n\n> diff --git a/t/t4012-diff-binary.sh b/t/t4012-diff-binary.sh\n> index 0a8af76aab..6579c81216 100755\n> --- a/t/t4012-diff-binary.sh\n> +++ b/t/t4012-diff-binary.sh\n> @@ -102,10 +102,8 @@ test_expect_success 'apply binary patch' '\n>  \n>  test_expect_success 'diff --no-index with binary creation' '\n>  \techo Q | q_to_nul >binary &&\n> -\t(: hide error code from diff, which just indicates differences\n> -\t git diff --binary --no-index /dev/null binary >current ||\n> -\t true\n> -\t) &&\n> +\t# hide error code from diff, which just indicates differences\n> +\ttest_might_fail git diff --binary --no-index /dev/null binary >current &&\n\nAs you said in downthread, we only care about the correct output in\nthe \"current\" file, which is verified by using it as input to the\n\"apply --binary\", so might-fail is fine here.  But we probably want\nto make sure \"diff --binary --no-index\" to *notice* that there is a\ndifference and report that with its exit status.  I wouldn't say so\nif this was about testing \"git apply\", but the test title tells us\nthat it is about \"diff --no-index\", so...\n\n"},{"id":"351642","messageId":"xmqqefgkqg1y.fsf@gitster-ct.c.googlers.com","threadId":"48813","inReplyTo":"20180702002405.3042-5-sunshine@sunshineco.com","subject":"Re: [PATCH 04/25] t: drop unnecessary terminating semicolon in subshell","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2018-07-03T19:23:37Z","receivedAt":"2018-07-03T19:23:42Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Eric Sunshine <sunshine@sunshineco.com> writes:\n\n> Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>\n> ---\n>  t/t3102-ls-tree-wildcards.sh    | 2 +-\n>  t/t4010-diff-pathspec.sh        | 4 ++--\n>  t/t9400-git-cvsserver-server.sh | 2 +-\n>  3 files changed, 4 insertions(+), 4 deletions(-)\n>\n> diff --git a/t/t3102-ls-tree-wildcards.sh b/t/t3102-ls-tree-wildcards.sh\n> index e804377f1c..1e16c6b8ea 100755\n> --- a/t/t3102-ls-tree-wildcards.sh\n> +++ b/t/t3102-ls-tree-wildcards.sh\n> @@ -23,7 +23,7 @@ test_expect_success 'ls-tree outside prefix' '\n>  \tcat >expect <<-EOF &&\n>  \t100644 blob $EMPTY_BLOB\t../a[a]/three\n>  \tEOF\n> -\t( cd aa && git ls-tree -r HEAD \"../a[a]\"; ) >actual &&\n> +\t( cd aa && git ls-tree -r HEAD \"../a[a]\" ) >actual &&\n>  \ttest_cmp expect actual\n>  '\n\nNice clean-up.  \n\nI still find it irritating that ( ...; ) is merely unnecessary but\nnot incorrect, while lack of semicolon in { ...; } is a hard error\n;-)\n"},{"id":"351643","messageId":"xmqqa7r8qf9f.fsf@gitster-ct.c.googlers.com","threadId":"48813","inReplyTo":"20180702002405.3042-1-sunshine@sunshineco.com","subject":"Re: [PATCH 00/25] fix buggy tests, modernize tests, fix broken &&-chains","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2018-07-03T19:40:44Z","receivedAt":"2018-07-03T19:40:52Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Eric Sunshine <sunshine@sunshineco.com> writes:\n\n> It is split out from an earlier series[1] which additionally extended\n> --chain-lint to work within subshells. I decided to make this an\n> independent series because these (hopefully) non-controversial changes\n> all stand on their own merit, and because I don't want to flood the list\n> repeatedly with this lengthy series as I re-roll the \"extend\n> --chain-lint to work in subshells\" functionality from [1].\n\nThanks for doing so; very much appreciated.\n\nNot that I vehemently oppose to the --chain-lint change, but I do\nlike the fact that I do not even have to worry about it when queuing\nthese 25 patches.\n\nWill queue.\n"},{"id":"352329","messageId":"20180712123729.17861-1-szeder.dev@gmail.com","threadId":"48813","inReplyTo":"20180702002405.3042-22-sunshine@sunshineco.com","subject":"Re: [PATCH 21/25] t5000-t5999: fix broken &&-chains","fromName":"SZEDER Gábor","fromEmail":"szeder.dev@gmail.com","sentAt":"2018-07-12T12:37:29Z","receivedAt":"2018-07-12T12:37:41Z","isPatch":true,"sender":{"key":"szeder.dev@gmail.com","avatar":"https://avatars.githubusercontent.com/u/116324?v=4"},"body":"\n> Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>\n> ---\n>  t/t5300-pack-object.sh         |  2 +-\n>  t/t5302-pack-index.sh          |  2 +-\n>  t/t5401-update-hooks.sh        |  4 ++--\n>  t/t5500-fetch-pack.sh          |  2 +-\n>  t/t5505-remote.sh              |  2 +-\n>  t/t5512-ls-remote.sh           |  4 ++--\n>  t/t5516-fetch-push.sh          | 10 +++++-----\n>  t/t5517-push-mirror.sh         | 10 +++++-----\n>  t/t5526-fetch-submodules.sh    |  2 +-\n>  t/t5531-deep-submodule-push.sh |  2 +-\n>  t/t5543-atomic-push.sh         |  2 +-\n>  t/t5601-clone.sh               |  2 +-\n>  t/t5605-clone-local.sh         |  2 +-\n>  t/t5801-remote-helpers.sh      |  2 +-\n>  14 files changed, 24 insertions(+), 24 deletions(-)\n\nThe change below should be squashed into this patch to fix a\npreviously unnoticed broken &&-chain.  I think you missed it, because\nthis test script is rather expensive and you didn't run it with\nGIT_TEST_CLONE_2GB=YesPlease.\n\n\ndiff --git a/t/t5608-clone-2gb.sh b/t/t5608-clone-2gb.sh\nindex df822d9a3e..2c6bc07344 100755\n--- a/t/t5608-clone-2gb.sh\n+++ b/t/t5608-clone-2gb.sh\n@@ -23,7 +23,7 @@ test_expect_success CLONE_2GB 'setup' '\n \t\tprintf \"blob\\nmark :$i\\ndata $blobsize\\n\" &&\n \t\t#test-tool genrandom $i $blobsize &&\n \t\tprintf \"%-${blobsize}s\" $i &&\n-\t\techo \"M 100644 :$i $i\" >> commit\n+\t\techo \"M 100644 :$i $i\" >> commit &&\n \t\ti=$(($i+1)) ||\n \t\techo $? > exit-status\n \t done &&\n\n"},{"id":"352374","messageId":"CAPig+cRYNo_KL02LN1LOa79Zm2oYZqbnBHJ=KDA3oaF4pVfjcA@mail.gmail.com","threadId":"48813","inReplyTo":"20180712123729.17861-1-szeder.dev@gmail.com","subject":"Re: [PATCH 21/25] t5000-t5999: fix broken &&-chains","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2018-07-12T17:44:49Z","receivedAt":"2018-07-12T17:45:03Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Thu, Jul 12, 2018 at 8:37 AM SZEDER Gábor <szeder.dev@gmail.com> wrote:\n> The change below should be squashed into this patch to fix a\n> previously unnoticed broken &&-chain.  I think you missed it, because\n> this test script is rather expensive and you didn't run it with\n> GIT_TEST_CLONE_2GB=YesPlease.\n>\n> diff --git a/t/t5608-clone-2gb.sh b/t/t5608-clone-2gb.sh\n> @@ -23,7 +23,7 @@ test_expect_success CLONE_2GB 'setup' '\n> -               echo \"M 100644 :$i $i\" >> commit\n> +               echo \"M 100644 :$i $i\" >> commit &&\n\nThanks for finding this. I tried to get as much coverage as possible\nby installing packages I don't normally have installed (Apache, cvs,\ncvsps, Subversion, Perforce, etc.) and even temporarily modified a\nscript or two to force it run when I simply couldn't meet some\nprerequisite, thus reducing the \"skipped\" messages to a minimum, but I\nwasn't even aware of this prerequisite since I never saw a \"skipped\"\nmessage for it.\n\nLooking at it more closely, I think the reason it didn't come to my\nattention is that this script doesn't use the standard skip_all=\"...\"\nmechanism for skipping the tests but instead \"rolls its own\", and\napparently 'prove' simply swallowed (or was unable to produce) an\noverall \"skipped\" message for this script.\n"},{"id":"352378","messageId":"20180712181955.GA13268@sigill.intra.peff.net","threadId":"48813","inReplyTo":"CAPig+cRYNo_KL02LN1LOa79Zm2oYZqbnBHJ=KDA3oaF4pVfjcA@mail.gmail.com","subject":"Re: [PATCH 21/25] t5000-t5999: fix broken &&-chains","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2018-07-12T18:19:55Z","receivedAt":"2018-07-12T18:19:59Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Thu, Jul 12, 2018 at 01:44:49PM -0400, Eric Sunshine wrote:\n\n> On Thu, Jul 12, 2018 at 8:37 AM SZEDER Gábor <szeder.dev@gmail.com> wrote:\n> > The change below should be squashed into this patch to fix a\n> > previously unnoticed broken &&-chain.  I think you missed it, because\n> > this test script is rather expensive and you didn't run it with\n> > GIT_TEST_CLONE_2GB=YesPlease.\n> >\n> > diff --git a/t/t5608-clone-2gb.sh b/t/t5608-clone-2gb.sh\n> > @@ -23,7 +23,7 @@ test_expect_success CLONE_2GB 'setup' '\n> > -               echo \"M 100644 :$i $i\" >> commit\n> > +               echo \"M 100644 :$i $i\" >> commit &&\n> \n> Thanks for finding this. I tried to get as much coverage as possible\n> by installing packages I don't normally have installed (Apache, cvs,\n> cvsps, Subversion, Perforce, etc.) and even temporarily modified a\n> script or two to force it run when I simply couldn't meet some\n> prerequisite, thus reducing the \"skipped\" messages to a minimum, but I\n> wasn't even aware of this prerequisite since I never saw a \"skipped\"\n> message for it.\n\nI think in theory we should be able to lint _every_ test, even if we're\nnot running it. After all, the point is that a proper linting runs zero\ncommands.\n\nThat said, it may not be worth the implementation effort. The linting\nhappens at a pretty low-level, and we've already decided to skip tests\nlong before then (even for single prereqs, let alone skip_all cases\nwhere we exit the script early).\n\n> Looking at it more closely, I think the reason it didn't come to my\n> attention is that this script doesn't use the standard skip_all=\"...\"\n> mechanism for skipping the tests but instead \"rolls its own\", and\n> apparently 'prove' simply swallowed (or was unable to produce) an\n> overall \"skipped\" message for this script.\n\nYeah, that is a bit funny. For a whole-test skip like this, I think\nskip_all is easier to read, as it is immediately apparent to the reader\nthat nothing that _doesn't_ meet that prereq should be in the file. So\nI'd be happy to see it switched (though it's not _that_ big a deal, so\nleaving it is fine, too).\n\nBy the way, \"prove --directives\" can help with finding individual\nskipped tests.\n\n-Peff\n"},{"id":"352380","messageId":"xmqqd0vsxq47.fsf@gitster-ct.c.googlers.com","threadId":"48813","inReplyTo":"CAPig+cRYNo_KL02LN1LOa79Zm2oYZqbnBHJ=KDA3oaF4pVfjcA@mail.gmail.com","subject":"Re: [PATCH 21/25] t5000-t5999: fix broken &&-chains","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2018-07-12T18:31:36Z","receivedAt":"2018-07-12T18:31:40Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Eric Sunshine <sunshine@sunshineco.com> writes:\n\n> On Thu, Jul 12, 2018 at 8:37 AM SZEDER Gábor <szeder.dev@gmail.com> wrote:\n>> The change below should be squashed into this patch to fix a\n>> previously unnoticed broken &&-chain.  I think you missed it, because\n>> this test script is rather expensive and you didn't run it with\n>> GIT_TEST_CLONE_2GB=YesPlease.\n>>\n>> diff --git a/t/t5608-clone-2gb.sh b/t/t5608-clone-2gb.sh\n>> @@ -23,7 +23,7 @@ test_expect_success CLONE_2GB 'setup' '\n>> -               echo \"M 100644 :$i $i\" >> commit\n>> +               echo \"M 100644 :$i $i\" >> commit &&\n>\n> Thanks for finding this. I tried to get as much coverage as possible\n> by installing packages I don't normally have installed (Apache, cvs,\n> cvsps, Subversion, Perforce, etc.) and even temporarily modified a\n> script or two to force it run ...\n\nThanks, both.  I think the &&-chain fix series is already large and\nalso otherwise seem to be pretty solid, so let's not reroll but\nqueue this addition on top.\n"},{"id":"352381","messageId":"xmqq8t6gxpxb.fsf@gitster-ct.c.googlers.com","threadId":"48813","inReplyTo":"xmqqd0vsxq47.fsf@gitster-ct.c.googlers.com","subject":"Re: [PATCH 21/25] t5000-t5999: fix broken &&-chains","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2018-07-12T18:35:44Z","receivedAt":"2018-07-12T18:35:50Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> Eric Sunshine <sunshine@sunshineco.com> writes:\n>\n>> On Thu, Jul 12, 2018 at 8:37 AM SZEDER Gábor <szeder.dev@gmail.com> wrote:\n>>> The change below should be squashed into this patch to fix a\n>>> previously unnoticed broken &&-chain.  I think you missed it, because\n>>> this test script is rather expensive and you didn't run it with\n>>> GIT_TEST_CLONE_2GB=YesPlease.\n>>>\n>>> diff --git a/t/t5608-clone-2gb.sh b/t/t5608-clone-2gb.sh\n>>> @@ -23,7 +23,7 @@ test_expect_success CLONE_2GB 'setup' '\n>>> -               echo \"M 100644 :$i $i\" >> commit\n>>> +               echo \"M 100644 :$i $i\" >> commit &&\n>>\n>> Thanks for finding this. I tried to get as much coverage as possible\n>> by installing packages I don't normally have installed (Apache, cvs,\n>> cvsps, Subversion, Perforce, etc.) and even temporarily modified a\n>> script or two to force it run ...\n>\n> Thanks, both.  I think the &&-chain fix series is already large and\n> also otherwise seem to be pretty solid, so let's not reroll but\n> queue this addition on top.\n\nOops, sent before completing the message.\n\n\tFor that to happen, we need a sign-off ;-)\n\nI guess this one would have been caught with the \"sed script on\nsubshell\" linter that does not execute?\n\n-- >8 --\nSubject: t5608: fix broken &&-chain\n\nThis is inside a loop that is run inside a subshell, in a test that\nis protected with CLONE_2GB prerequisite, one or more which is quite\nlikely reason why it wasn't caught durin the previous clean-up.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n t/t5608-clone-2gb.sh | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/t/t5608-clone-2gb.sh b/t/t5608-clone-2gb.sh\nindex df822d9a3e..2c6bc07344 100755\n--- a/t/t5608-clone-2gb.sh\n+++ b/t/t5608-clone-2gb.sh\n@@ -23,7 +23,7 @@ test_expect_success CLONE_2GB 'setup' '\n \t\tprintf \"blob\\nmark :$i\\ndata $blobsize\\n\" &&\n \t\t#test-tool genrandom $i $blobsize &&\n \t\tprintf \"%-${blobsize}s\" $i &&\n-\t\techo \"M 100644 :$i $i\" >> commit\n+\t\techo \"M 100644 :$i $i\" >> commit &&\n \t\ti=$(($i+1)) ||\n \t\techo $? > exit-status\n \t done &&\n"},{"id":"352382","messageId":"CAPig+cRZmx5_3-a0C=WdWnmcrh4J_1YHY_0FmXZh5LzcDq+6Uw@mail.gmail.com","threadId":"48813","inReplyTo":"xmqq8t6gxpxb.fsf@gitster-ct.c.googlers.com","subject":"Re: [PATCH 21/25] t5000-t5999: fix broken &&-chains","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2018-07-12T18:46:19Z","receivedAt":"2018-07-12T18:46:34Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Thu, Jul 12, 2018 at 2:35 PM Junio C Hamano <gitster@pobox.com> wrote:\n> Junio C Hamano <gitster@pobox.com> writes:\n> Oops, sent before completing the message.\n>\n>         For that to happen, we need a sign-off ;-)\n>\n> I guess this one would have been caught with the \"sed script on\n> subshell\" linter that does not execute?\n\nYes, this is correctly caught when the prerequisite is met.\n\n> -- >8 --\n> Subject: t5608: fix broken &&-chain\n>\n> This is inside a loop that is run inside a subshell, in a test that\n> is protected with CLONE_2GB prerequisite, one or more which is quite\n> likely reason why it wasn't caught durin the previous clean-up.\n\ns/durin/during/\n\nThe exact reason is that the prerequisite was not met (indeed, I\nwasn't even aware of that prerequisite), so the commit message can be\nmore direct:\n\n    This was missed by the previous clean-ups due to an unmet\n    CLONE_2GB prerequisite.\n\nThanks for saving a round-trip.\n\n> Signed-off-by: Junio C Hamano <gitster@pobox.com>\n"},{"id":"352384","messageId":"xmqqzhywwaoa.fsf@gitster-ct.c.googlers.com","threadId":"48813","inReplyTo":"CAPig+cRZmx5_3-a0C=WdWnmcrh4J_1YHY_0FmXZh5LzcDq+6Uw@mail.gmail.com","subject":"Re: [PATCH 21/25] t5000-t5999: fix broken &&-chains","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2018-07-12T18:50:29Z","receivedAt":"2018-07-12T18:50:34Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Eric Sunshine <sunshine@sunshineco.com> writes:\n\n> On Thu, Jul 12, 2018 at 2:35 PM Junio C Hamano <gitster@pobox.com> wrote:\n>> Junio C Hamano <gitster@pobox.com> writes:\n>> Oops, sent before completing the message.\n>>\n>>         For that to happen, we need a sign-off ;-)\n>>\n>> I guess this one would have been caught with the \"sed script on\n>> subshell\" linter that does not execute?\n>\n> Yes, this is correctly caught when the prerequisite is met.\n>\n>> -- >8 --\n>> Subject: t5608: fix broken &&-chain\n>>\n>> This is inside a loop that is run inside a subshell, in a test that\n>> is protected with CLONE_2GB prerequisite, one or more which is quite\n>> likely reason why it wasn't caught durin the previous clean-up.\n>\n> s/durin/during/\n>\n> The exact reason is that the prerequisite was not met (indeed, I\n> wasn't even aware of that prerequisite), so the commit message can be\n> more direct:\n>\n>     This was missed by the previous clean-ups due to an unmet\n>     CLONE_2GB prerequisite.\n>\n> Thanks for saving a round-trip.\n>\n>> Signed-off-by: Junio C Hamano <gitster@pobox.com>\n\nThere still need a sign-off, so ... ;-)\n"},{"id":"352385","messageId":"CAPig+cTZ7oJ=96LY0TU1HuwuObAb-EJhKDT4KD9yhAM_iGA2EQ@mail.gmail.com","threadId":"48813","inReplyTo":"xmqqzhywwaoa.fsf@gitster-ct.c.googlers.com","subject":"Re: [PATCH 21/25] t5000-t5999: fix broken &&-chains","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2018-07-12T18:53:16Z","receivedAt":"2018-07-12T18:53:29Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Thu, Jul 12, 2018 at 2:50 PM Junio C Hamano <gitster@pobox.com> wrote:\n> Eric Sunshine <sunshine@sunshineco.com> writes:\n> > The exact reason is that the prerequisite was not met (indeed, I\n> > wasn't even aware of that prerequisite), so the commit message can be\n> > more direct:\n> >\n> >     This was missed by the previous clean-ups due to an unmet\n> >     CLONE_2GB prerequisite.\n> >\n> > Thanks for saving a round-trip.\n> >\n> >> Signed-off-by: Junio C Hamano <gitster@pobox.com>\n>\n> There still need a sign-off, so ... ;-)\n\nFor whose sign-off are you waiting, SZEDER's or mine? (I presume SZEDER's.)\n"},{"id":"352628","messageId":"nycvar.QRO.7.76.6.1807161641140.71@tvgsbejvaqbjf.bet","threadId":"48813","inReplyTo":"20180702002405.3042-12-sunshine@sunshineco.com","subject":"Re: [PATCH 11/25] t7400: fix broken \"submodule add/reconfigure --force\" test","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2018-07-16T14:43:30Z","receivedAt":"2018-07-16T14:43:51Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Eric,\n\nOn Sun, 1 Jul 2018, Eric Sunshine wrote:\n\n> This test has been dysfunctional since it was added by 619acfc78c\n> (submodule add: extend force flag to add existing repos, 2016-10-06),\n> however, two problems early in the test went unnoticed due to a broken\n> &&-chain later in the test.\n> \n> First, it tries configuring the submodule with repository \"bogus-url\",\n> however, \"git submodule add\" insists that the repository be either an\n> absolute URL or a relative pathname requiring prefix \"./\" or \"../\" (this\n> is true even with --force), but \"bogus-url\" does not meet those\n> criteria, thus the command fails.\n> \n> Second, it then tries configuring a submodule with a path which is\n> .gitignore'd, which is disallowed. This restriction can be overridden\n> with --force, but the test neglects to use that option.\n> \n> Fix both problems, as well as the broken &&-chain behind which they hid.\n> \n> Reviewed-by: Stefan Beller <sbeller@google.com>\n> Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>\n> ---\n>  t/t7400-submodule-basic.sh | 10 +++++-----\n>  1 file changed, 5 insertions(+), 5 deletions(-)\n> \n> diff --git a/t/t7400-submodule-basic.sh b/t/t7400-submodule-basic.sh\n> index 812db137b8..401adaed32 100755\n> --- a/t/t7400-submodule-basic.sh\n> +++ b/t/t7400-submodule-basic.sh\n> @@ -171,12 +171,12 @@ test_expect_success 'submodule add to .gitignored path with --force' '\n>  test_expect_success 'submodule add to reconfigure existing submodule with --force' '\n>  \t(\n>  \t\tcd addtest-ignore &&\n> -\t\tgit submodule add --force bogus-url submod &&\n> -\t\tgit submodule add -b initial \"$submodurl\" submod-branch &&\n> -\t\ttest \"bogus-url\" = \"$(git config -f .gitmodules submodule.submod.url)\" &&\n> -\t\ttest \"bogus-url\" = \"$(git config submodule.submod.url)\" &&\n> +\t\tgit submodule add --force /bogus-url submod &&\n> +\t\tgit submodule add --force -b initial \"$submodurl\" submod-branch &&\n> +\t\ttest \"/bogus-url\" = \"$(git config -f .gitmodules submodule.submod.url)\" &&\n> +\t\ttest \"/bogus-url\" = \"$(git config submodule.submod.url)\" &&\n>  \t\t# Restore the url\n> -\t\tgit submodule add --force \"$submodurl\" submod\n> +\t\tgit submodule add --force \"$submodurl\" submod &&\n>  \t\ttest \"$submodurl\" = \"$(git config -f .gitmodules submodule.submod.url)\" &&\n>  \t\ttest \"$submodurl\" = \"$(git config submodule.submod.url)\"\n>  \t)\n\nThis breaks on Windows because of the absolute Unix-y path having to be\ntranslated to a Windows path:\n\n\thttps://git-for-windows.visualstudio.com/git/git%20Team/_build/results?buildId=12365&view=logs\n\n(In this case, it is prefixed with `C:/git-sdk-64-ci` because that is the\npseudo root when running in a Git for Windows SDK that is installed into\nthat directory.)\n\nI could imagine that using \"$(pwd)/bogus-url\" (which will generate a\nWindows-y absolute path on Windows) would work, though.\n\nCiao,\nDscho\n"},{"id":"352631","messageId":"nycvar.QRO.7.76.6.1807161749410.71@tvgsbejvaqbjf.bet","threadId":"48813","inReplyTo":"nycvar.QRO.7.76.6.1807161641140.71@tvgsbejvaqbjf.bet","subject":"Re: [PATCH 11/25] t7400: fix broken \"submodule add/reconfigure --force\" test","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2018-07-16T15:51:26Z","receivedAt":"2018-07-16T15:51:49Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Eric,\n\nOn Mon, 16 Jul 2018, Johannes Schindelin wrote:\n\n> On Sun, 1 Jul 2018, Eric Sunshine wrote:\n> \n> > This test has been dysfunctional since it was added by 619acfc78c\n> > (submodule add: extend force flag to add existing repos, 2016-10-06),\n> > however, two problems early in the test went unnoticed due to a broken\n> > &&-chain later in the test.\n> > \n> > First, it tries configuring the submodule with repository \"bogus-url\",\n> > however, \"git submodule add\" insists that the repository be either an\n> > absolute URL or a relative pathname requiring prefix \"./\" or \"../\" (this\n> > is true even with --force), but \"bogus-url\" does not meet those\n> > criteria, thus the command fails.\n> > \n> > Second, it then tries configuring a submodule with a path which is\n> > .gitignore'd, which is disallowed. This restriction can be overridden\n> > with --force, but the test neglects to use that option.\n> > \n> > Fix both problems, as well as the broken &&-chain behind which they hid.\n> > \n> > Reviewed-by: Stefan Beller <sbeller@google.com>\n> > Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>\n> > ---\n> >  t/t7400-submodule-basic.sh | 10 +++++-----\n> >  1 file changed, 5 insertions(+), 5 deletions(-)\n> > \n> > diff --git a/t/t7400-submodule-basic.sh b/t/t7400-submodule-basic.sh\n> > index 812db137b8..401adaed32 100755\n> > --- a/t/t7400-submodule-basic.sh\n> > +++ b/t/t7400-submodule-basic.sh\n> > @@ -171,12 +171,12 @@ test_expect_success 'submodule add to .gitignored path with --force' '\n> >  test_expect_success 'submodule add to reconfigure existing submodule with --force' '\n> >  \t(\n> >  \t\tcd addtest-ignore &&\n> > -\t\tgit submodule add --force bogus-url submod &&\n> > -\t\tgit submodule add -b initial \"$submodurl\" submod-branch &&\n> > -\t\ttest \"bogus-url\" = \"$(git config -f .gitmodules submodule.submod.url)\" &&\n> > -\t\ttest \"bogus-url\" = \"$(git config submodule.submod.url)\" &&\n> > +\t\tgit submodule add --force /bogus-url submod &&\n> > +\t\tgit submodule add --force -b initial \"$submodurl\" submod-branch &&\n> > +\t\ttest \"/bogus-url\" = \"$(git config -f .gitmodules submodule.submod.url)\" &&\n> > +\t\ttest \"/bogus-url\" = \"$(git config submodule.submod.url)\" &&\n> >  \t\t# Restore the url\n> > -\t\tgit submodule add --force \"$submodurl\" submod\n> > +\t\tgit submodule add --force \"$submodurl\" submod &&\n> >  \t\ttest \"$submodurl\" = \"$(git config -f .gitmodules submodule.submod.url)\" &&\n> >  \t\ttest \"$submodurl\" = \"$(git config submodule.submod.url)\"\n> >  \t)\n> \n> This breaks on Windows because of the absolute Unix-y path having to be\n> translated to a Windows path:\n> \n> \thttps://git-for-windows.visualstudio.com/git/git%20Team/_build/results?buildId=12365&view=logs\n> \n> (In this case, it is prefixed with `C:/git-sdk-64-ci` because that is the\n> pseudo root when running in a Git for Windows SDK that is installed into\n> that directory.)\n> \n> I could imagine that using \"$(pwd)/bogus-url\" (which will generate a\n> Windows-y absolute path on Windows) would work, though.\n\nYes, this works indeed, see the patch below. Could you please squash it in\nif you send another iteration of your patch series? Junio, could you\nplease add this as a SQUASH??? commit so that `pu` is fixed on Windows?\nThanks.\n\n-- snipsnap --\ndiff --git a/t/t7400-submodule-basic.sh b/t/t7400-submodule-basic.sh\nindex 5ffc2726aad..2c2c97e1441 100755\n--- a/t/t7400-submodule-basic.sh\n+++ b/t/t7400-submodule-basic.sh\n@@ -171,10 +171,11 @@ test_expect_success 'submodule add to .gitignored path with --force' '\n test_expect_success 'submodule add to reconfigure existing submodule with --force' '\n \t(\n \t\tcd addtest-ignore &&\n-\t\tgit submodule add --force /bogus-url submod &&\n+\t\tbogus_url=\"$(pwd)/bogus-url\" &&\n+\t\tgit submodule add --force \"$bogus_url\" submod &&\n \t\tgit submodule add --force -b initial \"$submodurl\" submod-branch &&\n-\t\ttest \"/bogus-url\" = \"$(git config -f .gitmodules submodule.submod.url)\" &&\n-\t\ttest \"/bogus-url\" = \"$(git config submodule.submod.url)\" &&\n+\t\ttest \"$bogus_url\" = \"$(git config -f .gitmodules submodule.submod.url)\" &&\n+\t\ttest \"$bogus_url\" = \"$(git config submodule.submod.url)\" &&\n \t\t# Restore the url\n \t\tgit submodule add --force \"$submodurl\" submod &&\n \t\ttest \"$submodurl\" = \"$(git config -f .gitmodules submodule.submod.url)\" &&\n"},{"id":"352650","messageId":"CAPig+cRFeNt9FVDGnbGcp8Bvfh0ohay+p+tLhfx=EFvJg=Q1Sg@mail.gmail.com","threadId":"48813","inReplyTo":"nycvar.QRO.7.76.6.1807161749410.71@tvgsbejvaqbjf.bet","subject":"Re: [PATCH 11/25] t7400: fix broken \"submodule add/reconfigure --force\" test","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2018-07-16T18:50:23Z","receivedAt":"2018-07-16T18:50:36Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Mon, Jul 16, 2018 at 11:51 AM Johannes Schindelin\n<Johannes.Schindelin@gmx.de> wrote:\n> On Mon, 16 Jul 2018, Johannes Schindelin wrote:\n> > > -           git submodule add --force bogus-url submod &&\n> > > +           git submodule add --force /bogus-url submod &&\n> >\n> > This breaks on Windows because of the absolute Unix-y path having to be\n> > translated to a Windows path:\n> >\n> >       https://git-for-windows.visualstudio.com/git/git%20Team/_build/results?buildId=12365&view=logs\n> >\n> > I could imagine that using \"$(pwd)/bogus-url\" (which will generate a\n> > Windows-y absolute path on Windows) would work, though.\n>\n> Yes, this works indeed, see the patch below. Could you please squash it in\n> if you send another iteration of your patch series? Junio, could you\n> please add this as a SQUASH??? commit so that `pu` is fixed on Windows?\n\nThanks for reporting and diagnosing. I wondered briefly if we could\nget by with simply \"./bogus-url\" instead of having to use $(pwd),\nhowever, \"./bogus-url\" gets normalized internally into an absolute\npath, so $(pwd) is needed anyhow to make the test '\"$bogus_url\" =\n\"$(git config ...)\"' check work.\n\nSo, this SQUASH looks like the correct way forward. Hopefully, Junio\ncan just squash it so I don't have to flood the list again with this\nlong series.\n"},{"id":"352692","messageId":"xmqq7elusvz7.fsf@gitster-ct.c.googlers.com","threadId":"48813","inReplyTo":"CAPig+cRFeNt9FVDGnbGcp8Bvfh0ohay+p+tLhfx=EFvJg=Q1Sg@mail.gmail.com","subject":"Re: [PATCH 11/25] t7400: fix broken \"submodule add/reconfigure --force\" test","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2018-07-16T21:37:32Z","receivedAt":"2018-07-16T21:37:37Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Eric Sunshine <sunshine@sunshineco.com> writes:\n\n> On Mon, Jul 16, 2018 at 11:51 AM Johannes Schindelin\n> <Johannes.Schindelin@gmx.de> wrote:\n>> On Mon, 16 Jul 2018, Johannes Schindelin wrote:\n>> > > -           git submodule add --force bogus-url submod &&\n>> > > +           git submodule add --force /bogus-url submod &&\n>> >\n>> > This breaks on Windows because of the absolute Unix-y path having to be\n>> > translated to a Windows path:\n>> >\n>> >       https://git-for-windows.visualstudio.com/git/git%20Team/_build/results?buildId=12365&view=logs\n>> >\n>> > I could imagine that using \"$(pwd)/bogus-url\" (which will generate a\n>> > Windows-y absolute path on Windows) would work, though.\n>>\n>> Yes, this works indeed, see the patch below. Could you please squash it in\n>> if you send another iteration of your patch series? Junio, could you\n>> please add this as a SQUASH??? commit so that `pu` is fixed on Windows?\n>\n> Thanks for reporting and diagnosing. I wondered briefly if we could\n> get by with simply \"./bogus-url\" instead of having to use $(pwd),\n> however, \"./bogus-url\" gets normalized internally into an absolute\n> path, so $(pwd) is needed anyhow to make the test '\"$bogus_url\" =\n> \"$(git config ...)\"' check work.\n>\n> So, this SQUASH looks like the correct way forward. Hopefully, Junio\n> can just squash it so I don't have to flood the list again with this\n> long series.\n\nThe topic already has another dependent topic so rerolling or\nsquashing would be a bit cumbersome.  I'll see what I could do but\nit may not be until tomorrow's pushout.\n"},{"id":"352712","messageId":"20180716230535.GA49654@flurp.local","threadId":"48813","inReplyTo":"xmqq7elusvz7.fsf@gitster-ct.c.googlers.com","subject":"Re: [PATCH 11/25] t7400: fix broken \"submodule add/reconfigure --force\" test","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2018-07-16T23:05:35Z","receivedAt":"2018-07-16T23:05:44Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Mon, Jul 16, 2018 at 02:37:32PM -0700, Junio C Hamano wrote:\n> Eric Sunshine <sunshine@sunshineco.com> writes:\n> > On Mon, Jul 16, 2018 at 11:51 AM Johannes Schindelin\n> > <Johannes.Schindelin@gmx.de> wrote:\n> >> On Mon, 16 Jul 2018, Johannes Schindelin wrote:\n> >> > > -           git submodule add --force bogus-url submod &&\n> >> > > +           git submodule add --force /bogus-url submod &&\n> >> > This breaks on Windows because of the absolute Unix-y path having to be\n> >> > translated to a Windows path:\n> >> > I could imagine that using \"$(pwd)/bogus-url\" (which will generate a\n> >> > Windows-y absolute path on Windows) would work, though.\n> >>\n> >> Yes, this works indeed, see the patch below. Could you please squash it in\n> >> if you send another iteration of your patch series? Junio, could you\n> >> please add this as a SQUASH??? commit so that `pu` is fixed on Windows?\n> >\n> > So, this SQUASH looks like the correct way forward. Hopefully, Junio\n> > can just squash it so I don't have to flood the list again with this\n> > long series.\n> \n> The topic already has another dependent topic so rerolling or\n> squashing would be a bit cumbersome.  I'll see what I could do but\n> it may not be until tomorrow's pushout.\n\nNo problem. Here's Dscho's fix in the form of a proper patch if\nthat makes it easier for you (it just needs his sign-off):\n\n--- >8 ---\nFrom: Johannes Schindelin <Johannes.Schindelin@gmx.de>\nSubject: [PATCH] t7400: make \"submodule add/reconfigure --force\" work on\n Windows\n\nOn Windows, the \"Unixy\" path /bogus-url gets translated automatically to\na Windows-style path (such as C:/git-sdk/bogus_url). This is normally\nnot problem, since it's still a valid and usable path in that form,\nhowever, this test wants to do a comparison against the original path.\n$(pwd) was invented exactly for this case, so use it to make the path\ncomparison work.\n\n[es: commit message]\n\nSigned-off-by: Eric Sunshine <sunshine@sunshineco.com>\n---\n t/t7400-submodule-basic.sh | 7 ++++---\n 1 file changed, 4 insertions(+), 3 deletions(-)\n\ndiff --git a/t/t7400-submodule-basic.sh b/t/t7400-submodule-basic.sh\nindex 76cf522a08..bfb09dd566 100755\n--- a/t/t7400-submodule-basic.sh\n+++ b/t/t7400-submodule-basic.sh\n@@ -171,10 +171,11 @@ test_expect_success 'submodule add to .gitignored path with --force' '\n test_expect_success 'submodule add to reconfigure existing submodule with --force' '\n \t(\n \t\tcd addtest-ignore &&\n-\t\tgit submodule add --force /bogus-url submod &&\n+\t\tbogus_url=\"$(pwd)/bogus-url\" &&\n+\t\tgit submodule add --force \"$bogus_url\" submod &&\n \t\tgit submodule add --force -b initial \"$submodurl\" submod-branch &&\n-\t\ttest \"/bogus-url\" = \"$(git config -f .gitmodules submodule.submod.url)\" &&\n-\t\ttest \"/bogus-url\" = \"$(git config submodule.submod.url)\" &&\n+\t\ttest \"$bogus_url\" = \"$(git config -f .gitmodules submodule.submod.url)\" &&\n+\t\ttest \"$bogus_url\" = \"$(git config submodule.submod.url)\" &&\n \t\t# Restore the url\n \t\tgit submodule add --force \"$submodurl\" submod &&\n \t\ttest \"$submodurl\" = \"$(git config -f .gitmodules submodule.submod.url)\" &&\n-- \n2.18.0.233.g985f88cf7e\n"},{"id":"352746","messageId":"CAM0VKj=_5s40Z=8gRuRt__s74uSGa5wxy_+hDdAZhu8cRCC_Ew@mail.gmail.com","threadId":"48813","inReplyTo":"xmqq8t6gxpxb.fsf@gitster-ct.c.googlers.com","subject":"Re: [PATCH 21/25] t5000-t5999: fix broken &&-chains","fromName":"SZEDER Gábor","fromEmail":"szeder.dev@gmail.com","sentAt":"2018-07-17T08:15:25Z","receivedAt":"2018-07-17T08:15:40Z","isPatch":true,"sender":{"key":"szeder.dev@gmail.com","avatar":"https://avatars.githubusercontent.com/u/116324?v=4"},"body":"On Thu, Jul 12, 2018 at 8:35 PM Junio C Hamano <gitster@pobox.com> wrote:\n>\n> Junio C Hamano <gitster@pobox.com> writes:\n>\n> > Eric Sunshine <sunshine@sunshineco.com> writes:\n> >\n> >> On Thu, Jul 12, 2018 at 8:37 AM SZEDER Gábor <szeder.dev@gmail.com> wrote:\n> >>> The change below should be squashed into this patch to fix a\n> >>> previously unnoticed broken &&-chain.  I think you missed it, because\n> >>> this test script is rather expensive and you didn't run it with\n> >>> GIT_TEST_CLONE_2GB=YesPlease.\n> >>>\n> >>> diff --git a/t/t5608-clone-2gb.sh b/t/t5608-clone-2gb.sh\n> >>> @@ -23,7 +23,7 @@ test_expect_success CLONE_2GB 'setup' '\n> >>> -               echo \"M 100644 :$i $i\" >> commit\n> >>> +               echo \"M 100644 :$i $i\" >> commit &&\n> >>\n> >> Thanks for finding this. I tried to get as much coverage as possible\n> >> by installing packages I don't normally have installed (Apache, cvs,\n> >> cvsps, Subversion, Perforce, etc.) and even temporarily modified a\n> >> script or two to force it run ...\n> >\n> > Thanks, both.  I think the &&-chain fix series is already large and\n> > also otherwise seem to be pretty solid, so let's not reroll but\n> > queue this addition on top.\n>\n> Oops, sent before completing the message.\n>\n>         For that to happen, we need a sign-off ;-)\n>\n> I guess this one would have been caught with the \"sed script on\n> subshell\" linter that does not execute?\n\nIt was in fact caught by Eric's linter (Travis CI runs these expensive\ntests, too), so I think it would be more appropriate to give him the\ncredit.\n\nSigned-off-by: SZEDER Gábor <szeder.dev@gmail.com>\n\n\n> -- >8 --\n> Subject: t5608: fix broken &&-chain\n>\n> This is inside a loop that is run inside a subshell, in a test that\n> is protected with CLONE_2GB prerequisite, one or more which is quite\n> likely reason why it wasn't caught durin the previous clean-up.\n>\n> Signed-off-by: Junio C Hamano <gitster@pobox.com>\n> ---\n>  t/t5608-clone-2gb.sh | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n>\n> diff --git a/t/t5608-clone-2gb.sh b/t/t5608-clone-2gb.sh\n> index df822d9a3e..2c6bc07344 100755\n> --- a/t/t5608-clone-2gb.sh\n> +++ b/t/t5608-clone-2gb.sh\n> @@ -23,7 +23,7 @@ test_expect_success CLONE_2GB 'setup' '\n>                 printf \"blob\\nmark :$i\\ndata $blobsize\\n\" &&\n>                 #test-tool genrandom $i $blobsize &&\n>                 printf \"%-${blobsize}s\" $i &&\n> -               echo \"M 100644 :$i $i\" >> commit\n> +               echo \"M 100644 :$i $i\" >> commit &&\n>                 i=$(($i+1)) ||\n>                 echo $? > exit-status\n>          done &&\n"},{"id":"352758","messageId":"nycvar.QRO.7.76.6.1807171208120.71@tvgsbejvaqbjf.bet","threadId":"48813","inReplyTo":"20180716230535.GA49654@flurp.local","subject":"Re: [PATCH 11/25] t7400: fix broken \"submodule add/reconfigure --force\" test","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2018-07-17T10:09:00Z","receivedAt":"2018-07-17T10:09:30Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Eric,\n\nOn Mon, 16 Jul 2018, Eric Sunshine wrote:\n\n> On Mon, Jul 16, 2018 at 02:37:32PM -0700, Junio C Hamano wrote:\n> > Eric Sunshine <sunshine@sunshineco.com> writes:\n> > > On Mon, Jul 16, 2018 at 11:51 AM Johannes Schindelin\n> > > <Johannes.Schindelin@gmx.de> wrote:\n> > >> On Mon, 16 Jul 2018, Johannes Schindelin wrote:\n> > >> > > -           git submodule add --force bogus-url submod &&\n> > >> > > +           git submodule add --force /bogus-url submod &&\n> > >> > This breaks on Windows because of the absolute Unix-y path having to be\n> > >> > translated to a Windows path:\n> > >> > I could imagine that using \"$(pwd)/bogus-url\" (which will generate a\n> > >> > Windows-y absolute path on Windows) would work, though.\n> > >>\n> > >> Yes, this works indeed, see the patch below. Could you please squash it in\n> > >> if you send another iteration of your patch series? Junio, could you\n> > >> please add this as a SQUASH??? commit so that `pu` is fixed on Windows?\n> > >\n> > > So, this SQUASH looks like the correct way forward. Hopefully, Junio\n> > > can just squash it so I don't have to flood the list again with this\n> > > long series.\n> > \n> > The topic already has another dependent topic so rerolling or\n> > squashing would be a bit cumbersome.  I'll see what I could do but\n> > it may not be until tomorrow's pushout.\n> \n> No problem. Here's Dscho's fix in the form of a proper patch if\n> that makes it easier for you (it just needs his sign-off):\n> \n> --- >8 ---\n> From: Johannes Schindelin <Johannes.Schindelin@gmx.de>\n> Subject: [PATCH] t7400: make \"submodule add/reconfigure --force\" work on\n>  Windows\n> \n> On Windows, the \"Unixy\" path /bogus-url gets translated automatically to\n> a Windows-style path (such as C:/git-sdk/bogus_url). This is normally\n> not problem, since it's still a valid and usable path in that form,\n\ns/not problem/not a problem/\n\n> however, this test wants to do a comparison against the original path.\n> $(pwd) was invented exactly for this case, so use it to make the path\n> comparison work.\n> \n> [es: commit message]\n> \n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n\n> Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>\n> ---\n>  t/t7400-submodule-basic.sh | 7 ++++---\n>  1 file changed, 4 insertions(+), 3 deletions(-)\n> \n> diff --git a/t/t7400-submodule-basic.sh b/t/t7400-submodule-basic.sh\n> index 76cf522a08..bfb09dd566 100755\n> --- a/t/t7400-submodule-basic.sh\n> +++ b/t/t7400-submodule-basic.sh\n> @@ -171,10 +171,11 @@ test_expect_success 'submodule add to .gitignored path with --force' '\n>  test_expect_success 'submodule add to reconfigure existing submodule with --force' '\n>  \t(\n>  \t\tcd addtest-ignore &&\n> -\t\tgit submodule add --force /bogus-url submod &&\n> +\t\tbogus_url=\"$(pwd)/bogus-url\" &&\n> +\t\tgit submodule add --force \"$bogus_url\" submod &&\n>  \t\tgit submodule add --force -b initial \"$submodurl\" submod-branch &&\n> -\t\ttest \"/bogus-url\" = \"$(git config -f .gitmodules submodule.submod.url)\" &&\n> -\t\ttest \"/bogus-url\" = \"$(git config submodule.submod.url)\" &&\n> +\t\ttest \"$bogus_url\" = \"$(git config -f .gitmodules submodule.submod.url)\" &&\n> +\t\ttest \"$bogus_url\" = \"$(git config submodule.submod.url)\" &&\n>  \t\t# Restore the url\n>  \t\tgit submodule add --force \"$submodurl\" submod &&\n>  \t\ttest \"$submodurl\" = \"$(git config -f .gitmodules submodule.submod.url)\" &&\n> -- \n> 2.18.0.233.g985f88cf7e\n\nThanks!\nDscho\n"},{"id":"352808","messageId":"xmqq8t69px47.fsf@gitster-ct.c.googlers.com","threadId":"48813","inReplyTo":"xmqq7elusvz7.fsf@gitster-ct.c.googlers.com","subject":"Re: [PATCH 11/25] t7400: fix broken \"submodule add/reconfigure --force\" test","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2018-07-17T17:53:28Z","receivedAt":"2018-07-17T17:53:33Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n>> So, this SQUASH looks like the correct way forward. Hopefully, Junio\n>> can just squash it so I don't have to flood the list again with this\n>> long series.\n>\n> The topic already has another dependent topic so rerolling or\n> squashing would be a bit cumbersome.  I'll see what I could do but\n> it may not be until tomorrow's pushout.\n\nOK, there was only one topic that forked fro this one, so squash\nwith rebase are all in the 'pu'.\n\nThanks, all.\n"}]}