{"thread":{"id":"18387","subject":"[PATCH 10/10] t5602: Work around path mangling on MSYS","startedAt":"2009-03-18T21:27:02Z","lastAt":"2009-03-19T23:00:09Z","messageCount":27,"participants":["Johannes Sixt","Johannes Schindelin","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":10},"messages":[{"id":"108433","messageId":"cover.1237410682.git.j6t@kdbg.org","threadId":"18387","inReplyTo":null,"subject":"[PATCH 00/11] Test on Windows - prequel","fromName":"Johannes Sixt","fromEmail":"j6t@kdbg.org","sentAt":"2009-03-18T21:27:02Z","receivedAt":"2009-03-18T21:27:02Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"I'm preparing a series of patches that adjust the test suite so that it\npasses on Windows (MinGW port). This is the initial part of it. Another\ndozen or more are to follow. By splitting the series I hope to get\nearlier feedback.\n\nThe series is also available from\n\n git://repo.or.cz/git/mingw/j6t.git for-junio\n\n http://repo.or.cz/w/git/mingw/j6t.git?a=shortlog;h=refs/heads/for-junio\n\n-- Hannes\n\nJohannes Schindelin (1):\n  t7300: fix clean up on Windows\n\nJohannes Sixt (9):\n  t9400, t9401: Do not force hard-linked clone\n  test suite: Use 'say' to say something instead of\n    'test_expect_success'\n  Call 'say' outside test_expect_success\n  test-lib: Replace uses of $(expr ...) by POSIX shell features.\n  test-lib: Simplify test counting.\n  test-lib: Introduce test_chmod and use it instead of update-index\n    --chmod\n  t2200, t7004: Avoid glob pattern that also matches files\n  t5300, t5302, t5303: Do not use /dev/zero\n  t5602: Work around path mangling on MSYS\n\n t/lib-git-svn.sh                       |    6 +++---\n t/t0024-crlf-archive.sh                |    2 +-\n t/t0050-filesystem.sh                  |    9 +++++++--\n t/t1410-reflog.sh                      |    4 +---\n t/t2200-add-update.sh                  |    2 +-\n t/t3400-rebase.sh                      |    4 ++--\n t/t3600-rm.sh                          |    5 +++--\n t/t4006-diff-mode.sh                   |   19 ++++---------------\n t/t4013-diff-various.sh                |    2 +-\n t/t4014-format-patch.sh                |    4 +---\n t/t5000-tar-tree.sh                    |    2 +-\n t/t5300-pack-object.sh                 |   17 ++++++++---------\n t/t5302-pack-index.sh                  |    2 +-\n t/t5303-pack-corruption-resilience.sh  |   12 +++++++-----\n t/t5515-fetch-merge-logic.sh           |    2 +-\n t/t5602-clone-remote-exec.sh           |    4 ++--\n t/t6031-merge-recursive.sh             |    9 ++-------\n t/t7004-tag.sh                         |    9 +++++----\n t/t7005-editor.sh                      |   29 +++++++++++++----------------\n t/t7300-clean.sh                       |    6 +++---\n t/t9200-git-cvsexportcommit.sh         |    2 +-\n t/t9400-git-cvsserver-server.sh        |    8 ++++----\n t/t9401-git-cvsserver-crlf.sh          |    6 +++---\n t/t9500-gitweb-standalone-no-errors.sh |   20 ++++++--------------\n t/t9700-perl-git.sh                    |    2 +-\n t/test-lib.sh                          |   28 ++++++++++++++++------------\n 26 files changed, 98 insertions(+), 117 deletions(-)\n"},{"id":"108429","messageId":"7fd3ef1fd73dffdb9b3445893ab579723ce08e74.1237410682.git.j6t@kdbg.org","threadId":"18387","inReplyTo":"cover.1237410682.git.j6t@kdbg.org","subject":"[PATCH 01/10] t9400, t9401: Do not force hard-linked clone","fromName":"Johannes Sixt","fromEmail":"j6t@kdbg.org","sentAt":"2009-03-18T21:27:03Z","receivedAt":"2009-03-18T21:27:03Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"The tests do not depend on that the clones are hard-linked, but used\n--local only as an optimization: At the time that --local was used first\nin t9400 hard-linked clones were not the default, yet.\n\nBy removing --local, we help filesystems that do not support hard-links.\n\nSigned-off-by: Johannes Sixt <j6t@kdbg.org>\n---\n t/t9400-git-cvsserver-server.sh |    4 ++--\n t/t9401-git-cvsserver-crlf.sh   |    2 +-\n 2 files changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git a/t/t9400-git-cvsserver-server.sh b/t/t9400-git-cvsserver-server.sh\nindex 6a37f71..9ccb123 100755\n--- a/t/t9400-git-cvsserver-server.sh\n+++ b/t/t9400-git-cvsserver-server.sh\n@@ -44,7 +44,7 @@ test_expect_success 'setup' '\n   git add secondrootfile &&\n   git commit -m \"second root\") &&\n   git pull secondroot master &&\n-  git clone -q --local --bare \"$WORKDIR/.git\" \"$SERVERDIR\" >/dev/null 2>&1 &&\n+  git clone -q --bare \"$WORKDIR/.git\" \"$SERVERDIR\" >/dev/null 2>&1 &&\n   GIT_DIR=\"$SERVERDIR\" git config --bool gitcvs.enabled true &&\n   GIT_DIR=\"$SERVERDIR\" git config gitcvs.logfile \"$SERVERDIR/gitcvs.log\"\n '\n@@ -267,7 +267,7 @@ test_expect_success 'gitcvs.ext.dbname' \\\n \n rm -fr \"$SERVERDIR\"\n cd \"$WORKDIR\" &&\n-git clone -q --local --bare \"$WORKDIR/.git\" \"$SERVERDIR\" >/dev/null 2>&1 &&\n+git clone -q --bare \"$WORKDIR/.git\" \"$SERVERDIR\" >/dev/null 2>&1 &&\n GIT_DIR=\"$SERVERDIR\" git config --bool gitcvs.enabled true &&\n GIT_DIR=\"$SERVERDIR\" git config gitcvs.logfile \"$SERVERDIR/gitcvs.log\" ||\n exit 1\ndiff --git a/t/t9401-git-cvsserver-crlf.sh b/t/t9401-git-cvsserver-crlf.sh\nindex e27a1c5..5d6200c 100755\n--- a/t/t9401-git-cvsserver-crlf.sh\n+++ b/t/t9401-git-cvsserver-crlf.sh\n@@ -84,7 +84,7 @@ test_expect_success 'setup' '\n     echo \"subdir/file.h crlf\" >> .gitattributes &&\n     git add .gitattributes textfile.c binfile.bin mixedUp.c subdir/* &&\n     git commit -q -m \"First Commit\" &&\n-    git clone -q --local --bare \"$WORKDIR/.git\" \"$SERVERDIR\" >/dev/null 2>&1 &&\n+    git clone -q --bare \"$WORKDIR/.git\" \"$SERVERDIR\" >/dev/null 2>&1 &&\n     GIT_DIR=\"$SERVERDIR\" git config --bool gitcvs.enabled true &&\n     GIT_DIR=\"$SERVERDIR\" git config gitcvs.logfile \"$SERVERDIR/gitcvs.log\"\n '\n-- \n1.6.2.1.224.g2225f\n"},{"id":"108431","messageId":"199f6a5e20f857a53af50872927a8086ce221345.1237410682.git.j6t@kdbg.org","threadId":"18387","inReplyTo":"cover.1237410682.git.j6t@kdbg.org","subject":"[PATCH 02/10] test suite: Use 'say' to say something instead of 'test_expect_success'","fromName":"Johannes Sixt","fromEmail":"j6t@kdbg.org","sentAt":"2009-03-18T21:27:04Z","receivedAt":"2009-03-18T21:27:04Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Some tests report that some tests will be skipped.  They used\n'test_exect_success' with a trivially successful test.  Nowadays we have\nthe helper function 'say' for this purpose.\n\nSigned-off-by: Johannes Sixt <j6t@kdbg.org>\n---\n t/lib-git-svn.sh                       |    6 +++---\n t/t0024-crlf-archive.sh                |    2 +-\n t/t3600-rm.sh                          |    2 +-\n t/t5000-tar-tree.sh                    |    2 +-\n t/t7004-tag.sh                         |    4 ++--\n t/t9200-git-cvsexportcommit.sh         |    2 +-\n t/t9400-git-cvsserver-server.sh        |    4 ++--\n t/t9401-git-cvsserver-crlf.sh          |    4 ++--\n t/t9500-gitweb-standalone-no-errors.sh |    2 +-\n t/t9700-perl-git.sh                    |    2 +-\n 10 files changed, 15 insertions(+), 15 deletions(-)\n\ndiff --git a/t/lib-git-svn.sh b/t/lib-git-svn.sh\nindex 67c431d..de384e6 100644\n--- a/t/lib-git-svn.sh\n+++ b/t/lib-git-svn.sh\n@@ -5,7 +5,7 @@ git_svn_id=git\"\"-svn-id\n \n if test -n \"$NO_SVN_TESTS\"\n then\n-\ttest_expect_success 'skipping git svn tests, NO_SVN_TESTS defined' :\n+\tsay 'skipping git svn tests, NO_SVN_TESTS defined'\n \ttest_done\n \texit\n fi\n@@ -17,7 +17,7 @@ SVN_TREE=$GIT_SVN_DIR/svn-tree\n svn >/dev/null 2>&1\n if test $? -ne 1\n then\n-    test_expect_success 'skipping git svn tests, svn not found' :\n+    say 'skipping git svn tests, svn not found'\n     test_done\n     exit\n fi\n@@ -41,7 +41,7 @@ then\n \telse\n \t\terr='Perl SVN libraries not found or unusable, skipping test'\n \tfi\n-\ttest_expect_success \"$err\" :\n+\tsay \"$err\"\n \ttest_done\n \texit\n fi\ndiff --git a/t/t0024-crlf-archive.sh b/t/t0024-crlf-archive.sh\nindex e533039..ae90d34 100755\n--- a/t/t0024-crlf-archive.sh\n+++ b/t/t0024-crlf-archive.sh\n@@ -28,7 +28,7 @@ test_expect_success 'tar archive' '\n \n \"$UNZIP\" -v >/dev/null 2>&1\n if [ $? -eq 127 ]; then\n-\techo \"Skipping ZIP test, because unzip was not found\"\n+\tsay \"Skipping ZIP test, because unzip was not found\"\n \ttest_done\n \texit\n fi\ndiff --git a/t/t3600-rm.sh b/t/t3600-rm.sh\nindex 95542e9..74ea8e0 100755\n--- a/t/t3600-rm.sh\n+++ b/t/t3600-rm.sh\n@@ -112,7 +112,7 @@ test_expect_success \\\n     'test_must_fail git rm -f baz'\n chmod 775 .\n else\n-    test_expect_success 'skipping removal failure (perhaps running as root?)' :\n+    say 'skipping removal failure test (perhaps running as root?)'\n fi\n \n test_expect_success \\\ndiff --git a/t/t5000-tar-tree.sh b/t/t5000-tar-tree.sh\nindex e1ed073..7a84ab6 100755\n--- a/t/t5000-tar-tree.sh\n+++ b/t/t5000-tar-tree.sh\n@@ -182,7 +182,7 @@ test_expect_success 'git archive --format=zip with --output' \\\n \n $UNZIP -v >/dev/null 2>&1\n if [ $? -eq 127 ]; then\n-\techo \"Skipping ZIP tests, because unzip was not found\"\n+\tsay \"Skipping ZIP tests, because unzip was not found\"\n \ttest_done\n \texit\n fi\ndiff --git a/t/t7004-tag.sh b/t/t7004-tag.sh\nindex 69501e2..06e6e17 100755\n--- a/t/t7004-tag.sh\n+++ b/t/t7004-tag.sh\n@@ -582,7 +582,7 @@ test_expect_success \\\n # subsequent tests require gpg; check if it is available\n gpg --version >/dev/null\n if [ $? -eq 127 ]; then\n-\techo \"gpg not found - skipping tag signing and verification tests\"\n+\tsay \"gpg not found - skipping tag signing and verification tests\"\n \ttest_done\n \texit\n fi\n@@ -614,7 +614,7 @@ test_expect_success \\\n # that version, creation of signed tags using the generated key fails.\n case \"$(gpg --version)\" in\n 'gpg (GnuPG) 1.0.6'*)\n-\techo \"Skipping signed tag tests, because a bug in 1.0.6 version\"\n+\tsay \"Skipping signed tag tests, because a bug in 1.0.6 version\"\n \ttest_done\n \texit\n \t;;\ndiff --git a/t/t9200-git-cvsexportcommit.sh b/t/t9200-git-cvsexportcommit.sh\nindex 245a7c3..d28b71b 100755\n--- a/t/t9200-git-cvsexportcommit.sh\n+++ b/t/t9200-git-cvsexportcommit.sh\n@@ -9,7 +9,7 @@ test_description='Test export of commits to CVS'\n cvs >/dev/null 2>&1\n if test $? -ne 1\n then\n-    test_expect_success 'skipping git cvsexportcommit tests, cvs not found' :\n+    say 'skipping git cvsexportcommit tests, cvs not found'\n     test_done\n     exit\n fi\ndiff --git a/t/t9400-git-cvsserver-server.sh b/t/t9400-git-cvsserver-server.sh\nindex 9ccb123..466240c 100755\n--- a/t/t9400-git-cvsserver-server.sh\n+++ b/t/t9400-git-cvsserver-server.sh\n@@ -13,12 +13,12 @@ cvs CLI client via git-cvsserver server'\n cvs >/dev/null 2>&1\n if test $? -ne 1\n then\n-    test_expect_success 'skipping git-cvsserver tests, cvs not found' :\n+    say 'skipping git-cvsserver tests, cvs not found'\n     test_done\n     exit\n fi\n perl -e 'use DBI; use DBD::SQLite' >/dev/null 2>&1 || {\n-    test_expect_success 'skipping git-cvsserver tests, Perl SQLite interface unavailable' :\n+    say 'skipping git-cvsserver tests, Perl SQLite interface unavailable'\n     test_done\n     exit\n }\ndiff --git a/t/t9401-git-cvsserver-crlf.sh b/t/t9401-git-cvsserver-crlf.sh\nindex 5d6200c..8882230 100755\n--- a/t/t9401-git-cvsserver-crlf.sh\n+++ b/t/t9401-git-cvsserver-crlf.sh\n@@ -49,12 +49,12 @@ not_present() {\n cvs >/dev/null 2>&1\n if test $? -ne 1\n then\n-    test_expect_success 'skipping git-cvsserver tests, cvs not found' :\n+    say 'skipping git-cvsserver tests, cvs not found'\n     test_done\n     exit\n fi\n perl -e 'use DBI; use DBD::SQLite' >/dev/null 2>&1 || {\n-    test_expect_success 'skipping git-cvsserver tests, Perl SQLite interface unavailable' :\n+    say 'skipping git-cvsserver tests, Perl SQLite interface unavailable'\n     test_done\n     exit\n }\ndiff --git a/t/t9500-gitweb-standalone-no-errors.sh b/t/t9500-gitweb-standalone-no-errors.sh\nindex 6ed10d0..1b78e28 100755\n--- a/t/t9500-gitweb-standalone-no-errors.sh\n+++ b/t/t9500-gitweb-standalone-no-errors.sh\n@@ -74,7 +74,7 @@ safe_chmod () {\n . ./test-lib.sh\n \n perl -MEncode -e 'decode_utf8(\"\", Encode::FB_CROAK)' >/dev/null 2>&1 || {\n-    test_expect_success 'skipping gitweb tests, perl version is too old' :\n+    say 'skipping gitweb tests, perl version is too old'\n     test_done\n     exit\n }\ndiff --git a/t/t9700-perl-git.sh b/t/t9700-perl-git.sh\nindex b81d5df..4a501c6 100755\n--- a/t/t9700-perl-git.sh\n+++ b/t/t9700-perl-git.sh\n@@ -7,7 +7,7 @@ test_description='perl interface (Git.pm)'\n . ./test-lib.sh\n \n perl -MTest::More -e 0 2>/dev/null || {\n-\tsay_color skip \"Perl Test::More unavailable, skipping test\"\n+\tsay \"Perl Test::More unavailable, skipping test\"\n \ttest_done\n }\n \n-- \n1.6.2.1.224.g2225f\n"},{"id":"108438","messageId":"9d346b6be9eb260b94a8f1bcd995932a311f03af.1237410682.git.j6t@kdbg.org","threadId":"18387","inReplyTo":"cover.1237410682.git.j6t@kdbg.org","subject":"[PATCH 03/10] Call 'say' outside test_expect_success","fromName":"Johannes Sixt","fromEmail":"j6t@kdbg.org","sentAt":"2009-03-18T21:27:05Z","receivedAt":"2009-03-18T21:27:05Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"There were some uses of 'say' inside test_expect_success. But if the tests\nwere not run in verbose mode, this message went to /dev/null. Pull them out\nof test_expect_success.\n\nSigned-off-by: Johannes Sixt <j6t@kdbg.org>\n---\n t/t0050-filesystem.sh |    9 +++++++--\n t/t3600-rm.sh         |    3 ++-\n t/t7005-editor.sh     |   29 +++++++++++++----------------\n 3 files changed, 22 insertions(+), 19 deletions(-)\n\ndiff --git a/t/t0050-filesystem.sh b/t/t0050-filesystem.sh\nindex 7edf49d..a449580 100755\n--- a/t/t0050-filesystem.sh\n+++ b/t/t0050-filesystem.sh\n@@ -8,6 +8,7 @@ auml=`printf '\\xc3\\xa4'`\n aumlcdiar=`printf '\\x61\\xcc\\x88'`\n \n case_insensitive=\n+unibad=\n test_expect_success 'see if we expect ' '\n \n \ttest_case=test_expect_success\n@@ -19,7 +20,6 @@ test_expect_success 'see if we expect ' '\n \tthen\n \t\ttest_case=test_expect_failure\n \t\tcase_insensitive=t\n-\t\tsay \"will test on a case insensitive filesystem\"\n \tfi &&\n \trm -fr junk &&\n \tmkdir junk &&\n@@ -27,13 +27,18 @@ test_expect_success 'see if we expect ' '\n \tcase \"$(cd junk && echo *)\" in\n \t\"$aumlcdiar\")\n \t\ttest_unicode=test_expect_failure\n-\t\tsay \"will test on a unicode corrupting filesystem\"\n+\t\tunibad=t\n \t\t;;\n \t*)\t;;\n \tesac &&\n \trm -fr junk\n '\n \n+test \"$case_insensitive\" &&\n+\tsay \"will test on a case insensitive filesystem\"\n+test \"$unibad\" &&\n+\tsay \"will test on a unicode corrupting filesystem\"\n+\n if test \"$case_insensitive\"\n then\n test_expect_success \"detection of case insensitive filesystem during repo init\" '\ndiff --git a/t/t3600-rm.sh b/t/t3600-rm.sh\nindex 74ea8e0..2aefbcf 100755\n--- a/t/t3600-rm.sh\n+++ b/t/t3600-rm.sh\n@@ -21,10 +21,11 @@ embedded'\n embedded' &&\n      git commit -m 'add files with tabs and newlines'\n      else\n-         say 'Your filesystem does not allow tabs in filenames.'\n          test_tabs=n\n      fi\"\n \n+test \"$test_tabs\" = n && say 'Your filesystem does not allow tabs in filenames.'\n+\n # Later we will try removing an unremovable path to make sure\n # git rm barfs, but if the test is run as root that cannot be\n # arranged.\ndiff --git a/t/t7005-editor.sh b/t/t7005-editor.sh\nindex 2d919d6..2f8404a 100755\n--- a/t/t7005-editor.sh\n+++ b/t/t7005-editor.sh\n@@ -87,30 +87,27 @@ do\n \t'\n done\n \n+if ! echo 'echo space > \"$1\"' > \"e space.sh\"\n+then\n+\tsay \"Skipping; FS does not support spaces in filenames\"\n+\ttest_done\n+\texit\n+fi\n+\n test_expect_success 'editor with a space' '\n \n-\tif echo \"echo space > \\\"\\$1\\\"\" > \"e space.sh\"\n-\tthen\n-\t\tchmod a+x \"e space.sh\" &&\n-\t\tGIT_EDITOR=\"./e\\ space.sh\" git commit --amend &&\n-\t\ttest space = \"$(git show -s --pretty=format:%s)\"\n-\telse\n-\t\tsay \"Skipping; FS does not support spaces in filenames\"\n-\tfi\n+\tchmod a+x \"e space.sh\" &&\n+\tGIT_EDITOR=\"./e\\ space.sh\" git commit --amend &&\n+\ttest space = \"$(git show -s --pretty=format:%s)\"\n \n '\n \n unset GIT_EDITOR\n test_expect_success 'core.editor with a space' '\n \n-\tif test -f \"e space.sh\"\n-\tthen\n-\t\tgit config core.editor \\\"./e\\ space.sh\\\" &&\n-\t\tgit commit --amend &&\n-\t\ttest space = \"$(git show -s --pretty=format:%s)\"\n-\telse\n-\t\tsay \"Skipping; FS does not support spaces in filenames\"\n-\tfi\n+\tgit config core.editor \\\"./e\\ space.sh\\\" &&\n+\tgit commit --amend &&\n+\ttest space = \"$(git show -s --pretty=format:%s)\"\n \n '\n \n-- \n1.6.2.1.224.g2225f\n"},{"id":"108434","messageId":"680eb7fed78dc2ae0268f9b3adcd5978aed3ebcf.1237410682.git.j6t@kdbg.org","threadId":"18387","inReplyTo":"cover.1237410682.git.j6t@kdbg.org","subject":"[PATCH 04/10] test-lib: Replace uses of $(expr ...) by POSIX shell features.","fromName":"Johannes Sixt","fromEmail":"j6t@kdbg.org","sentAt":"2009-03-18T21:27:06Z","receivedAt":"2009-03-18T21:27:06Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"In particular:\n\n- Test case counting can be achieved by arithmetic expansion.\n\n- The name of the test, e.g. t1234, can be computed with ${0%%} and ${0##}.\n\nSigned-off-by: Johannes Sixt <j6t@kdbg.org>\n---\n t/t4013-diff-various.sh      |    2 +-\n t/t5515-fetch-merge-logic.sh |    2 +-\n t/test-lib.sh                |   23 +++++++++++------------\n 3 files changed, 13 insertions(+), 14 deletions(-)\n\ndiff --git a/t/t4013-diff-various.sh b/t/t4013-diff-various.sh\nindex 9cd5a6e..9c30b29 100755\n--- a/t/t4013-diff-various.sh\n+++ b/t/t4013-diff-various.sh\n@@ -101,7 +101,7 @@ do\n \t'' | '#'*) continue ;;\n \tesac\n \ttest=`echo \"$cmd\" | sed -e 's|[/ ][/ ]*|_|g'`\n-\tcnt=`expr $test_count + 1`\n+\tcnt=$(($test_count+1))\n \tpfx=`printf \"%04d\" $cnt`\n \texpect=\"$TEST_DIRECTORY/t4013/diff.$test\"\n \tactual=\"$pfx-diff.$test\"\ndiff --git a/t/t5515-fetch-merge-logic.sh b/t/t5515-fetch-merge-logic.sh\nindex 1f4608d..0b39503 100755\n--- a/t/t5515-fetch-merge-logic.sh\n+++ b/t/t5515-fetch-merge-logic.sh\n@@ -129,7 +129,7 @@ do\n \t'' | '#'*) continue ;;\n \tesac\n \ttest=`echo \"$cmd\" | sed -e 's|[/ ][/ ]*|_|g'`\n-\tcnt=`expr $test_count + 1`\n+\tcnt=$(($test_count+1))\n \tpfx=`printf \"%04d\" $cnt`\n \texpect_f=\"$TEST_DIRECTORY/t5515/fetch.$test\"\n \tactual_f=\"$pfx-fetch.$test\"\ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex 1e01a91..bd8cba1 100644\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -242,14 +242,14 @@ test_merge () {\n # the text_expect_* functions instead.\n \n test_ok_ () {\n-\ttest_count=$(expr \"$test_count\" + 1)\n-\ttest_success=$(expr \"$test_success\" + 1)\n+\ttest_count=$(($test_count + 1))\n+\ttest_success=$(($test_success + 1))\n \tsay_color \"\" \"  ok $test_count: $@\"\n }\n \n test_failure_ () {\n-\ttest_count=$(expr \"$test_count\" + 1)\n-\ttest_failure=$(expr \"$test_failure\" + 1);\n+\ttest_count=$(($test_count + 1))\n+\ttest_failure=$(($test_failure + 1))\n \tsay_color error \"FAIL $test_count: $1\"\n \tshift\n \techo \"$@\" | sed -e 's/^/\t/'\n@@ -257,13 +257,13 @@ test_failure_ () {\n }\n \n test_known_broken_ok_ () {\n-\ttest_count=$(expr \"$test_count\" + 1)\n+\ttest_count=$(($test_count+1))\n \ttest_fixed=$(($test_fixed+1))\n \tsay_color \"\" \"  FIXED $test_count: $@\"\n }\n \n test_known_broken_failure_ () {\n-\ttest_count=$(expr \"$test_count\" + 1)\n+\ttest_count=$(($test_count+1))\n \ttest_broken=$(($test_broken+1))\n \tsay_color skip \"  still broken $test_count: $@\"\n }\n@@ -279,12 +279,10 @@ test_run_ () {\n }\n \n test_skip () {\n-\tthis_test=$(expr \"./$0\" : '.*/\\(t[0-9]*\\)-[^/]*$')\n-\tthis_test=\"$this_test.$(expr \"$test_count\" + 1)\"\n \tto_skip=\n \tfor skp in $GIT_SKIP_TESTS\n \tdo\n-\t\tcase \"$this_test\" in\n+\t\tcase $this_test.$(($test_count+1)) in\n \t\t$skp)\n \t\t\tto_skip=t\n \t\tesac\n@@ -292,7 +290,7 @@ test_skip () {\n \tcase \"$to_skip\" in\n \tt)\n \t\tsay_color skip >&3 \"skipping test: $@\"\n-\t\ttest_count=$(expr \"$test_count\" + 1)\n+\t\ttest_count=$(($test_count+1))\n \t\tsay_color skip \"skip $test_count: $1\"\n \t\t: true\n \t\t;;\n@@ -370,7 +368,7 @@ test_external () {\n \tthen\n \t\t# Announce the script to reduce confusion about the\n \t\t# test output that follows.\n-\t\tsay_color \"\" \" run $(expr \"$test_count\" + 1): $descr ($*)\"\n+\t\tsay_color \"\" \" run $(($test_count+1)): $descr ($*)\"\n \t\t# Run command; redirect its stderr to &4 as in\n \t\t# test_run_, but keep its stdout on our stdout even in\n \t\t# non-verbose mode.\n@@ -613,7 +611,8 @@ test_create_repo \"$test\"\n # in subprocesses like git equals our $PWD (for pathname comparisons).\n cd -P \"$test\" || exit 1\n \n-this_test=$(expr \"./$0\" : '.*/\\(t[0-9]*\\)-[^/]*$')\n+this_test=${0##*/}\n+this_test=${this_test%%-*}\n for skp in $GIT_SKIP_TESTS\n do\n \tto_skip=\n-- \n1.6.2.1.224.g2225f\n"},{"id":"108430","messageId":"26c0cd245694bed22d98850c8ac0a86f3c930789.1237410682.git.j6t@kdbg.org","threadId":"18387","inReplyTo":"cover.1237410682.git.j6t@kdbg.org","subject":"[PATCH 05/10] test-lib: Simplify test counting.","fromName":"Johannes Sixt","fromEmail":"j6t@kdbg.org","sentAt":"2009-03-18T21:27:07Z","receivedAt":"2009-03-18T21:27:07Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Since the test case counter was incremented very late, there were a few\nusers of the counter had to do their own incrementing. Now we increment it\nearly and simplify these users.\n\nSigned-off-by: Johannes Sixt <j6t@kdbg.org>\n---\n t/test-lib.sh |   10 +++-------\n 1 files changed, 3 insertions(+), 7 deletions(-)\n\ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex bd8cba1..ace440c 100644\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -242,13 +242,11 @@ test_merge () {\n # the text_expect_* functions instead.\n \n test_ok_ () {\n-\ttest_count=$(($test_count + 1))\n \ttest_success=$(($test_success + 1))\n \tsay_color \"\" \"  ok $test_count: $@\"\n }\n \n test_failure_ () {\n-\ttest_count=$(($test_count + 1))\n \ttest_failure=$(($test_failure + 1))\n \tsay_color error \"FAIL $test_count: $1\"\n \tshift\n@@ -257,13 +255,11 @@ test_failure_ () {\n }\n \n test_known_broken_ok_ () {\n-\ttest_count=$(($test_count+1))\n \ttest_fixed=$(($test_fixed+1))\n \tsay_color \"\" \"  FIXED $test_count: $@\"\n }\n \n test_known_broken_failure_ () {\n-\ttest_count=$(($test_count+1))\n \ttest_broken=$(($test_broken+1))\n \tsay_color skip \"  still broken $test_count: $@\"\n }\n@@ -279,10 +275,11 @@ test_run_ () {\n }\n \n test_skip () {\n+\ttest_count=$(($test_count+1))\n \tto_skip=\n \tfor skp in $GIT_SKIP_TESTS\n \tdo\n-\t\tcase $this_test.$(($test_count+1)) in\n+\t\tcase $this_test.$test_count in\n \t\t$skp)\n \t\t\tto_skip=t\n \t\tesac\n@@ -290,7 +287,6 @@ test_skip () {\n \tcase \"$to_skip\" in\n \tt)\n \t\tsay_color skip >&3 \"skipping test: $@\"\n-\t\ttest_count=$(($test_count+1))\n \t\tsay_color skip \"skip $test_count: $1\"\n \t\t: true\n \t\t;;\n@@ -368,7 +364,7 @@ test_external () {\n \tthen\n \t\t# Announce the script to reduce confusion about the\n \t\t# test output that follows.\n-\t\tsay_color \"\" \" run $(($test_count+1)): $descr ($*)\"\n+\t\tsay_color \"\" \" run $test_count: $descr ($*)\"\n \t\t# Run command; redirect its stderr to &4 as in\n \t\t# test_run_, but keep its stdout on our stdout even in\n \t\t# non-verbose mode.\n-- \n1.6.2.1.224.g2225f\n"},{"id":"108436","messageId":"c44430314c9976a0c30e1b94df49d8217c66fd50.1237410682.git.j6t@kdbg.org","threadId":"18387","inReplyTo":"cover.1237410682.git.j6t@kdbg.org","subject":"[PATCH 06/10] test-lib: Introduce test_chmod and use it instead of update-index --chmod","fromName":"Johannes Sixt","fromEmail":"j6t@kdbg.org","sentAt":"2009-03-18T21:27:08Z","receivedAt":"2009-03-18T21:27:08Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"This function replaces sequences of 'chmod +x' and 'git update-index\n--chmod=+x' in the test suite, whose purpose is to help filesystems\nthat need core.filemode=false. Two places where only 'chmod +x' was used\nwe also use this new function.\n\nThe function calls 'git update-index --chmod' without checking\ncore.filemode (unlike some of the call sites did). We do this because the\ncall sites *expect* that the executable bit ends up in the index (ie. it\nis not the purpose of the call sites to *test* whether git treats\n'chmod +x' and 'update-index --chmod=+x' correctly). Therefore, on\nfilesystems with core.filemode=true the 'git update-index --chmod' is a\nno-op.\n\nThe function uses --add with update-index to help one call site in\nt6031-merge-recursive. It makes no difference for the other callers.\n\nSigned-off-by: Johannes Sixt <j6t@kdbg.org>\n---\n t/t1410-reflog.sh                      |    4 +---\n t/t3400-rebase.sh                      |    4 ++--\n t/t4006-diff-mode.sh                   |   19 ++++---------------\n t/t4014-format-patch.sh                |    4 +---\n t/t6031-merge-recursive.sh             |    9 ++-------\n t/t9500-gitweb-standalone-no-errors.sh |   18 +++++-------------\n t/test-lib.sh                          |    9 +++++++++\n 7 files changed, 24 insertions(+), 43 deletions(-)\n\ndiff --git a/t/t1410-reflog.sh b/t/t1410-reflog.sh\nindex 5b24f05..80af6b9 100755\n--- a/t/t1410-reflog.sh\n+++ b/t/t1410-reflog.sh\n@@ -70,9 +70,7 @@ test_expect_success setup '\n \tE=`git rev-parse --verify HEAD:A/B/E` &&\n \tcheck_fsck &&\n \n-\tchmod +x C &&\n-\t( test \"`git config --bool core.filemode`\" != false ||\n-\t  echo executable >>C ) &&\n+\ttest_chmod +x C &&\n \tgit add C &&\n \ttest_tick && git commit -m dragon &&\n \tL=`git rev-parse --verify HEAD` &&\ndiff --git a/t/t3400-rebase.sh b/t/t3400-rebase.sh\nindex be7ae5a..6e391a3 100755\n--- a/t/t3400-rebase.sh\n+++ b/t/t3400-rebase.sh\n@@ -83,9 +83,9 @@ test_expect_success 'rebase a single mode change' '\n      git checkout -b modechange HEAD^ &&\n      echo 1 > X &&\n      git add X &&\n-     chmod a+x A &&\n+     test_chmod +x A &&\n      test_tick &&\n-     git commit -m modechange A X &&\n+     git commit -m modechange &&\n      GIT_TRACE=1 git rebase master\n '\n \ndiff --git a/t/t4006-diff-mode.sh b/t/t4006-diff-mode.sh\nindex 4e92fce..8c1b81e 100755\n--- a/t/t4006-diff-mode.sh\n+++ b/t/t4006-diff-mode.sh\n@@ -15,21 +15,10 @@ test_expect_success \\\n      tree=`git write-tree` &&\n      echo $tree'\n \n-if [ \"$(git config --get core.filemode)\" = false ]\n-then\n-\tsay 'filemode disabled on the filesystem, using update-index --chmod=+x'\n-\ttest_expect_success \\\n-\t    'git update-index --chmod=+x' \\\n-\t    'git update-index rezrov &&\n-\t     git update-index --chmod=+x rezrov &&\n-\t     git diff-index $tree >current'\n-else\n-\ttest_expect_success \\\n-\t    'chmod' \\\n-\t    'chmod +x rezrov &&\n-\t     git update-index rezrov &&\n-\t     git diff-index $tree >current'\n-fi\n+test_expect_success \\\n+    'chmod' \\\n+    'test_chmod +x rezrov &&\n+     git diff-index $tree >current'\n \n _x40='[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]'\n _x40=\"$_x40$_x40$_x40$_x40$_x40$_x40$_x40$_x40\"\ndiff --git a/t/t4014-format-patch.sh b/t/t4014-format-patch.sh\nindex ebfc4a6..f187d15 100755\n--- a/t/t4014-format-patch.sh\n+++ b/t/t4014-format-patch.sh\n@@ -16,9 +16,7 @@ test_expect_success setup '\n \tgit checkout -b side &&\n \n \tfor i in 1 2 5 6 A B C 7 8 9 10; do echo \"$i\"; done >file &&\n-\tchmod +x elif &&\n-\tgit update-index file elif &&\n-\tgit update-index --chmod=+x elif &&\n+\ttest_chmod +x elif &&\n \tgit commit -m \"Side changes #1\" &&\n \n \tfor i in D E F; do echo \"$i\"; done >>file &&\ndiff --git a/t/t6031-merge-recursive.sh b/t/t6031-merge-recursive.sh\nindex 8073e0c..41c6860 100755\n--- a/t/t6031-merge-recursive.sh\n+++ b/t/t6031-merge-recursive.sh\n@@ -3,9 +3,6 @@\n test_description='merge-recursive: handle file mode'\n . ./test-lib.sh\n \n-# Note that we follow \"chmod +x F\" with \"update-index --chmod=+x F\" to\n-# help filesystems that do not have the executable bit.\n-\n test_expect_success 'mode change in one branch: keep changed version' '\n \t: >file1 &&\n \tgit add file1 &&\n@@ -15,8 +12,7 @@ test_expect_success 'mode change in one branch: keep changed version' '\n \tgit add dummy &&\n \tgit commit -m a &&\n \tgit checkout -b b1 master &&\n-\tchmod +x file1 &&\n-\tgit update-index --chmod=+x file1 &&\n+\ttest_chmod +x file1 &&\n \tgit commit -m b1 &&\n \tgit checkout a1 &&\n \tgit merge-recursive master -- a1 b1 &&\n@@ -28,8 +24,7 @@ test_expect_success 'mode change in both branches: expect conflict' '\n \tgit checkout -b a2 master &&\n \t: >file2 &&\n \tH=$(git hash-object file2) &&\n-\tchmod +x file2 &&\n-\tgit update-index --add --chmod=+x file2 &&\n+\ttest_chmod +x file2 &&\n \tgit commit -m a2 &&\n \tgit checkout -b b2 master &&\n \t: >file2 &&\ndiff --git a/t/t9500-gitweb-standalone-no-errors.sh b/t/t9500-gitweb-standalone-no-errors.sh\nindex 1b78e28..dce06bc 100755\n--- a/t/t9500-gitweb-standalone-no-errors.sh\n+++ b/t/t9500-gitweb-standalone-no-errors.sh\n@@ -63,14 +63,6 @@ gitweb_run () {\n \t# gitweb.log is left for debugging\n }\n \n-safe_chmod () {\n-\tchmod \"$1\" \"$2\" &&\n-\tif [ \"$(git config --get core.filemode)\" = false ]\n-\tthen\n-\t\tgit update-index --chmod=\"$1\" \"$2\"\n-\tfi\n-}\n-\n . ./test-lib.sh\n \n perl -MEncode -e 'decode_utf8(\"\", Encode::FB_CROAK)' >/dev/null 2>&1 || {\n@@ -242,7 +234,7 @@ test_debug 'cat gitweb.log'\n \n test_expect_success \\\n \t'commitdiff(0): mode change' \\\n-\t'safe_chmod +x new_file &&\n+\t'test_chmod +x new_file &&\n \t git commit -a -m \"Mode changed.\" &&\n \t gitweb_run \"p=.git;a=commitdiff\"'\n test_debug 'cat gitweb.log'\n@@ -281,7 +273,7 @@ test_debug 'cat gitweb.log'\n test_expect_success \\\n \t'commitdiff(0): mode change and modified' \\\n \t'echo \"New line\" >> file2 &&\n-\t safe_chmod +x file2 &&\n+\t test_chmod +x file2 &&\n \t git commit -a -m \"Mode change and modification.\" &&\n \t gitweb_run \"p=.git;a=commitdiff\"'\n test_debug 'cat gitweb.log'\n@@ -308,7 +300,7 @@ test_expect_success \\\n \t'commitdiff(0): renamed, mode change and modified' \\\n \t'git mv file3 file2 &&\n \t echo \"Propter nomen suum.\" >> file2 &&\n-\t safe_chmod +x file2 &&\n+\t test_chmod +x file2 &&\n \t git commit -a -m \"File rename, mode change and modification.\" &&\n \t gitweb_run \"p=.git;a=commitdiff\"'\n test_debug 'cat gitweb.log'\n@@ -425,10 +417,10 @@ test_expect_success \\\n \t git add 03-new &&\n \t git mv 04-rename-from 04-rename-to &&\n \t echo \"Changed\" >> 04-rename-to &&\n-\t safe_chmod +x 05-mode-change &&\n+\t test_chmod +x 05-mode-change &&\n \t rm -f 06-file-or-symlink && ln -s 01-change 06-file-or-symlink &&\n \t echo \"Changed and have mode changed\" > 07-change-mode-change\t&&\n-\t safe_chmod +x 07-change-mode-change &&\n+\t test_chmod +x 07-change-mode-change &&\n \t git commit -a -m \"Large commit\" &&\n \t git checkout master'\n \ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex ace440c..638cca4 100644\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -238,6 +238,15 @@ test_merge () {\n \tgit tag \"$1\"\n }\n \n+# This function helps systems where core.filemode=false is set.\n+# Use it instead of plain 'chmod +x' to set or unset the executable bit\n+# of a file in the working directory and add it to the index.\n+\n+test_chmod () {\n+\tchmod \"$@\" &&\n+\tgit update-index --add \"--chmod=$@\"\n+}\n+\n # You are not expected to call test_ok_ and test_failure_ directly, use\n # the text_expect_* functions instead.\n \n-- \n1.6.2.1.224.g2225f\n"},{"id":"108432","messageId":"ffdd1bf27fc20055147db1573712acabc73f339c.1237410682.git.j6t@kdbg.org","threadId":"18387","inReplyTo":"cover.1237410682.git.j6t@kdbg.org","subject":"[PATCH 07/10] t7300: fix clean up on Windows","fromName":"Johannes Sixt","fromEmail":"j6t@kdbg.org","sentAt":"2009-03-18T21:27:09Z","receivedAt":"2009-03-18T21:27:09Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nOn Windows, you cannot remove files that are in use, not even with\n'rm -rf'.  So we need to run 'exec <foo/bar' inside a subshell lest\nremoving the whole test repository fail.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\nSigned-off-by: Johannes Sixt <j6t@kdbg.org>\n---\n t/t7300-clean.sh |    6 +++---\n 1 files changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git a/t/t7300-clean.sh b/t/t7300-clean.sh\nindex 1636fac..929d5d4 100755\n--- a/t/t7300-clean.sh\n+++ b/t/t7300-clean.sh\n@@ -373,9 +373,9 @@ test_expect_success 'removal failure' '\n \n \tmkdir foo &&\n \ttouch foo/bar &&\n-\texec <foo/bar &&\n-\tchmod 0 foo &&\n-\ttest_must_fail git clean -f -d\n+\t(exec <foo/bar &&\n+\t chmod 0 foo &&\n+\t test_must_fail git clean -f -d)\n \n '\n chmod 755 foo\n-- \n1.6.2.1.224.g2225f\n"},{"id":"108437","messageId":"3827d7fab3e9e233a0ac528b84ab2d6a36658365.1237410682.git.j6t@kdbg.org","threadId":"18387","inReplyTo":"cover.1237410682.git.j6t@kdbg.org","subject":"[PATCH 08/10] t2200, t7004: Avoid glob pattern that also matches files","fromName":"Johannes Sixt","fromEmail":"j6t@kdbg.org","sentAt":"2009-03-18T21:27:10Z","receivedAt":"2009-03-18T21:27:10Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"On Windows, there is an unfortunate interaction between the MSYS bash and\ngit's command line processing:\n\n- Since Windows's CMD does not do the wildcard expansion, but passes\n  arguments like path* through to the programs, the programs must do the\n  expansion themselves. This happens in the startup code before main() is\n  entered.\n\n- bash, however, passes the argument \"path*\" to git, assuming that git will\n  see the unquoted word unchanged as a single argument.\n\nBut actually git expands the unquoted word before main() is entered.\n\nIn t2200, not all names that the test case is interested in exist as files\nat the time when 'git ls-files' is invoked. git expands \"path?\" to only\nthe subset of files the exist, and only that subset was listed, so that the\ntest failed.  We now list all interesting paths explicitly.\n\nIn t7004, git exanded the pattern \"*a*\" to \"actual\" (the file that stdout\nwas redirected to), which is not what the was tested for. We fix it by\nrenaming the output file (and removing any existing files matching *a*).\nThis was originally fixed by Johannes Schindelin.\n\nSigned-off-by: Johannes Sixt <j6t@kdbg.org>\n---\n t/t2200-add-update.sh |    2 +-\n t/t7004-tag.sh        |    5 +++--\n 2 files changed, 4 insertions(+), 3 deletions(-)\n\ndiff --git a/t/t2200-add-update.sh b/t/t2200-add-update.sh\nindex b2ddf5a..652801e 100755\n--- a/t/t2200-add-update.sh\n+++ b/t/t2200-add-update.sh\n@@ -150,7 +150,7 @@ test_expect_success 'add -u resolves unmerged paths' '\n \techo 2 >path3 &&\n \techo 2 >path5 &&\n \tgit add -u &&\n-\tgit ls-files -s \"path?\" >actual &&\n+\tgit ls-files -s path1 path3 path4 path5 path6 >actual &&\n \t{\n \t\techo \"100644 $three 0\tpath1\"\n \t\techo \"100644 $one 1\tpath3\"\ndiff --git a/t/t7004-tag.sh b/t/t7004-tag.sh\nindex 06e6e17..1c27ffb 100755\n--- a/t/t7004-tag.sh\n+++ b/t/t7004-tag.sh\n@@ -185,8 +185,9 @@ cba\n EOF\n test_expect_success \\\n \t'listing tags with substring as pattern must print those matching' '\n-\tgit tag -l \"*a*\" > actual &&\n-\ttest_cmp expect actual\n+\trm *a* &&\n+\tgit tag -l \"*a*\" > current &&\n+\ttest_cmp expect current\n '\n \n cat >expect <<EOF\n-- \n1.6.2.1.224.g2225f\n"},{"id":"108435","messageId":"d5e7f18c786db8d1739c42403f8b366746854d66.1237410682.git.j6t@kdbg.org","threadId":"18387","inReplyTo":"cover.1237410682.git.j6t@kdbg.org","subject":"[PATCH 09/10] t5300, t5302, t5303: Do not use /dev/zero","fromName":"Johannes Sixt","fromEmail":"j6t@kdbg.org","sentAt":"2009-03-18T21:27:11Z","receivedAt":"2009-03-18T21:27:11Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"We do not have /dev/zero on Windows. This replaces it by data generated\nwith printf, perl, or echo. Most of the cases do not depend on that the\ndata is a stream of zero bytes, so we use something printable; nor is an\nunlimited stream of data needed, so we produce only as many bytes as the\ntest cases need.\n\nSigned-off-by: Johannes Sixt <j6t@kdbg.org>\n---\n t/t5300-pack-object.sh                |   17 ++++++++---------\n t/t5302-pack-index.sh                 |    2 +-\n t/t5303-pack-corruption-resilience.sh |   12 +++++++-----\n 3 files changed, 16 insertions(+), 15 deletions(-)\n\ndiff --git a/t/t5300-pack-object.sh b/t/t5300-pack-object.sh\nindex ccfc64c..e2aa254 100755\n--- a/t/t5300-pack-object.sh\n+++ b/t/t5300-pack-object.sh\n@@ -13,11 +13,10 @@ TRASH=`pwd`\n test_expect_success \\\n     'setup' \\\n     'rm -f .git/index*\n-     for i in a b c\n-     do\n-\t     dd if=/dev/zero bs=4k count=1 | perl -pe \"y/\\\\000/$i/\" >$i &&\n-\t     git update-index --add $i || return 1\n-     done &&\n+     perl -e \"print \\\"a\\\" x 4096;\" > a &&\n+     perl -e \"print \\\"b\\\" x 4096;\" > b &&\n+     perl -e \"print \\\"c\\\" x 4096;\" > c &&\n+     git update-index --add a b c &&\n      cat c >d && echo foo >>d && git update-index --add d &&\n      tree=`git write-tree` &&\n      commit=`git commit-tree $tree </dev/null` && {\n@@ -221,7 +220,7 @@ test_expect_success \\\n test_expect_success \\\n     'verify-pack catches a corrupted pack signature' \\\n     'cat test-1-${packname_1}.pack >test-3.pack &&\n-     dd if=/dev/zero of=test-3.pack count=1 bs=1 conv=notrunc seek=2 &&\n+     echo | dd of=test-3.pack count=1 bs=1 conv=notrunc seek=2 &&\n      if git verify-pack test-3.idx\n      then false\n      else :;\n@@ -230,7 +229,7 @@ test_expect_success \\\n test_expect_success \\\n     'verify-pack catches a corrupted pack version' \\\n     'cat test-1-${packname_1}.pack >test-3.pack &&\n-     dd if=/dev/zero of=test-3.pack count=1 bs=1 conv=notrunc seek=7 &&\n+     echo | dd of=test-3.pack count=1 bs=1 conv=notrunc seek=7 &&\n      if git verify-pack test-3.idx\n      then false\n      else :;\n@@ -239,7 +238,7 @@ test_expect_success \\\n test_expect_success \\\n     'verify-pack catches a corrupted type/size of the 1st packed object data' \\\n     'cat test-1-${packname_1}.pack >test-3.pack &&\n-     dd if=/dev/zero of=test-3.pack count=1 bs=1 conv=notrunc seek=12 &&\n+     echo | dd of=test-3.pack count=1 bs=1 conv=notrunc seek=12 &&\n      if git verify-pack test-3.idx\n      then false\n      else :;\n@@ -250,7 +249,7 @@ test_expect_success \\\n     'l=`wc -c <test-3.idx` &&\n      l=`expr $l - 20` &&\n      cat test-1-${packname_1}.pack >test-3.pack &&\n-     dd if=/dev/zero of=test-3.idx count=20 bs=1 conv=notrunc seek=$l &&\n+     printf \"%20s\" \"\" | dd of=test-3.idx count=20 bs=1 conv=notrunc seek=$l &&\n      if git verify-pack test-3.pack\n      then false\n      else :;\ndiff --git a/t/t5302-pack-index.sh b/t/t5302-pack-index.sh\nindex e6f70d4..77982cd 100755\n--- a/t/t5302-pack-index.sh\n+++ b/t/t5302-pack-index.sh\n@@ -208,7 +208,7 @@ test_expect_success \\\n      obj=`git hash-object file_001` &&\n      nr=`index_obj_nr \".git/objects/pack/pack-${pack1}.idx\" $obj` &&\n      chmod +w \".git/objects/pack/pack-${pack1}.idx\" &&\n-     dd if=/dev/zero of=\".git/objects/pack/pack-${pack1}.idx\" conv=notrunc \\\n+     printf xxxx | dd of=\".git/objects/pack/pack-${pack1}.idx\" conv=notrunc \\\n         bs=1 count=4 seek=$((8 + 256 * 4 + `wc -l <obj-list` * 20 + $nr * 4)) &&\n      ( while read obj\n        do git cat-file -p $obj >/dev/null || exit 1\ndiff --git a/t/t5303-pack-corruption-resilience.sh b/t/t5303-pack-corruption-resilience.sh\nindex d4e30fc..5132d41 100755\n--- a/t/t5303-pack-corruption-resilience.sh\n+++ b/t/t5303-pack-corruption-resilience.sh\n@@ -55,6 +55,8 @@ do_corrupt_object() {\n     test_must_fail git verify-pack ${pack}.pack\n }\n \n+printf '\\0' > zero\n+\n test_expect_success \\\n     'initial setup validation' \\\n     'create_test_files &&\n@@ -66,7 +68,7 @@ test_expect_success \\\n \n test_expect_success \\\n     'create corruption in header of first object' \\\n-    'do_corrupt_object $blob_1 0 < /dev/zero &&\n+    'do_corrupt_object $blob_1 0 < zero &&\n      test_must_fail git cat-file blob $blob_1 > /dev/null &&\n      test_must_fail git cat-file blob $blob_2 > /dev/null &&\n      test_must_fail git cat-file blob $blob_3 > /dev/null'\n@@ -125,7 +127,7 @@ test_expect_success \\\n     'create corruption in header of first delta' \\\n     'create_new_pack &&\n      git prune-packed &&\n-     do_corrupt_object $blob_2 0 < /dev/zero &&\n+     do_corrupt_object $blob_2 0 < zero &&\n      git cat-file blob $blob_1 > /dev/null &&\n      test_must_fail git cat-file blob $blob_2 > /dev/null &&\n      test_must_fail git cat-file blob $blob_3 > /dev/null'\n@@ -180,7 +182,7 @@ test_expect_success \\\n     'corruption in delta base reference of first delta (OBJ_REF_DELTA)' \\\n     'create_new_pack &&\n      git prune-packed &&\n-     do_corrupt_object $blob_2 2 < /dev/zero &&\n+     do_corrupt_object $blob_2 2 < zero &&\n      git cat-file blob $blob_1 > /dev/null &&\n      test_must_fail git cat-file blob $blob_2 > /dev/null &&\n      test_must_fail git cat-file blob $blob_3 > /dev/null'\n@@ -207,7 +209,7 @@ test_expect_success \\\n     'corruption #0 in delta base reference of first delta (OBJ_OFS_DELTA)' \\\n     'create_new_pack --delta-base-offset &&\n      git prune-packed &&\n-     do_corrupt_object $blob_2 2 < /dev/zero &&\n+     do_corrupt_object $blob_2 2 < zero &&\n      git cat-file blob $blob_1 > /dev/null &&\n      test_must_fail git cat-file blob $blob_2 > /dev/null &&\n      test_must_fail git cat-file blob $blob_3 > /dev/null'\n@@ -259,7 +261,7 @@ test_expect_success \\\n \n test_expect_success \\\n     '... and a redundant pack allows for full recovery too' \\\n-    'do_corrupt_object $blob_2 2 < /dev/zero &&\n+    'do_corrupt_object $blob_2 2 < zero &&\n      git cat-file blob $blob_1 > /dev/null &&\n      test_must_fail git cat-file blob $blob_2 > /dev/null &&\n      test_must_fail git cat-file blob $blob_3 > /dev/null &&\n-- \n1.6.2.1.224.g2225f\n"},{"id":"108428","messageId":"cdfcd2b997d2f89c02b34aceb19d515d91df372c.1237410682.git.j6t@kdbg.org","threadId":"18387","inReplyTo":"cover.1237410682.git.j6t@kdbg.org","subject":"[PATCH 10/10] t5602: Work around path mangling on MSYS","fromName":"Johannes Sixt","fromEmail":"j6t@kdbg.org","sentAt":"2009-03-18T21:27:12Z","receivedAt":"2009-03-18T21:27:12Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"MSYS's bash rewrites /something/bin/... into a Windows path that looks like\nc:/msysgit/something/bin/... before git sees it. But later the test case\nverifies that the path was used and compares it to the unmangled version.\nThis fails, of course. This make the path relative so that the path\nmangling is not triggered.\n\nSigned-off-by: Johannes Sixt <j6t@kdbg.org>\n---\n t/t5602-clone-remote-exec.sh |    4 ++--\n 1 files changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/t/t5602-clone-remote-exec.sh b/t/t5602-clone-remote-exec.sh\nindex 82b1d1e..deffdae 100755\n--- a/t/t5602-clone-remote-exec.sh\n+++ b/t/t5602-clone-remote-exec.sh\n@@ -18,8 +18,8 @@ test_expect_success 'clone calls git upload-pack unqualified with no -u option'\n '\n \n test_expect_success 'clone calls specified git upload-pack with -u option' '\n-\tGIT_SSH=./not_ssh git clone -u /something/bin/git-upload-pack localhost:/path/to/repo junk\n-\techo \"localhost /something/bin/git-upload-pack '\\''/path/to/repo'\\''\" >expected\n+\tGIT_SSH=./not_ssh git clone -u ./something/bin/git-upload-pack localhost:/path/to/repo junk\n+\techo \"localhost ./something/bin/git-upload-pack '\\''/path/to/repo'\\''\" >expected\n \ttest_cmp expected not_ssh_output\n '\n \n-- \n1.6.2.1.224.g2225f\n"},{"id":"108444","messageId":"alpine.DEB.1.00.0903182306020.10279@pacific.mpi-cbg.de","threadId":"18387","inReplyTo":"199f6a5e20f857a53af50872927a8086ce221345.1237410682.git.j6t@kdbg.org","subject":"Re: [PATCH 02/10] test suite: Use 'say' to say something instead of 'test_expect_success'","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2009-03-18T22:07:02Z","receivedAt":"2009-03-18T22:07:02Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Wed, 18 Mar 2009, Johannes Sixt wrote:\n\n> Some tests report that some tests will be skipped.  They used\n> 'test_exect_success' with a trivially successful test.  Nowadays we have\n\ns/exect/expect/.\n\n> the helper function 'say' for this purpose.\n> \n> Signed-off-by: Johannes Sixt <j6t@kdbg.org>\n\nI see that you exchanged one \"say_color\" by \"say\".  What is the \ndifference?\n\nCiao,\nDscho\n"},{"id":"108446","messageId":"alpine.DEB.1.00.0903182319180.10279@pacific.mpi-cbg.de","threadId":"18387","inReplyTo":"680eb7fed78dc2ae0268f9b3adcd5978aed3ebcf.1237410682.git.j6t@kdbg.org","subject":"Re: [PATCH 04/10] test-lib: Replace uses of $(expr ...) by POSIX shell features.","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2009-03-18T22:28:38Z","receivedAt":"2009-03-18T22:28:38Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Wed, 18 Mar 2009, Johannes Sixt wrote:\n\n> In particular:\n> \n> - Test case counting can be achieved by arithmetic expansion.\n> \n> - The name of the test, e.g. t1234, can be computed with ${0%%} and ${0##}.\n> \n> Signed-off-by: Johannes Sixt <j6t@kdbg.org>\n\nI guess this makes the tests less slow on Windows?  Do you have numbers?\n\nFWIW I run the tests on Windows with -j10 these days, and they take about \n15 minutes on a quad core 3GHz machine (which I may use from time to time; \nthe machine is not mine, otherwise it would run Linux).\n\nCiao,\nDscho\n"},{"id":"108448","messageId":"alpine.DEB.1.00.0903182331330.10279@pacific.mpi-cbg.de","threadId":"18387","inReplyTo":"26c0cd245694bed22d98850c8ac0a86f3c930789.1237410682.git.j6t@kdbg.org","subject":"Re: [PATCH 05/10] test-lib: Simplify test counting.","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2009-03-18T22:32:06Z","receivedAt":"2009-03-18T22:32:06Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Wed, 18 Mar 2009, Johannes Sixt wrote:\n\n> Since the test case counter was incremented very late, there were a few\n> users of the counter had to do their own incrementing. Now we increment it\n> early and simplify these users.\n> \n> Signed-off-by: Johannes Sixt <j6t@kdbg.org>\n> ---\n>  t/test-lib.sh |   10 +++-------\n>  1 files changed, 3 insertions(+), 7 deletions(-)\n\nDo you not need to adjust t4013 and t5515, too?\n\nCiao,\nDscho\n"},{"id":"108454","messageId":"7vljr2bg9c.fsf@gitster.siamese.dyndns.org","threadId":"18387","inReplyTo":"cover.1237410682.git.j6t@kdbg.org","subject":"Re: [PATCH 00/11] Test on Windows - prequel","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-03-18T22:47:11Z","receivedAt":"2009-03-18T22:47:11Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Sixt <j6t@kdbg.org> writes:\n\n>   t7300: fix clean up on Windows\n>\n> Johannes Sixt (9):\n>   t9400, t9401: Do not force hard-linked clone\n>   test suite: Use 'say' to say something instead of\n>     'test_expect_success'\n>   Call 'say' outside test_expect_success\n>   test-lib: Replace uses of $(expr ...) by POSIX shell features.\n>   test-lib: Simplify test counting.\n>   test-lib: Introduce test_chmod and use it instead of update-index\n>     --chmod\n>   t2200, t7004: Avoid glob pattern that also matches files\n>   t5300, t5302, t5303: Do not use /dev/zero\n>   t5602: Work around path mangling on MSYS\n\nDo you have an 11-patch series, or 10-patch series with a cover letter?  I\nam wondering what happened to [PATCH 11/11].\n"},{"id":"108466","messageId":"7v7i2mbap2.fsf@gitster.siamese.dyndns.org","threadId":"18387","inReplyTo":"3827d7fab3e9e233a0ac528b84ab2d6a36658365.1237410682.git.j6t@kdbg.org","subject":"Re: [PATCH 08/10] t2200, t7004: Avoid glob pattern that also matches files","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-03-19T00:47:21Z","receivedAt":"2009-03-19T00:47:21Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Sixt <j6t@kdbg.org> writes:\n\n> On Windows, there is an unfortunate interaction between the MSYS bash and\n> git's command line processing:\n>\n> - Since Windows's CMD does not do the wildcard expansion, but passes\n>   arguments like path* through to the programs, the programs must do the\n>   expansion themselves. This happens in the startup code before main() is\n>   entered.\n>\n> - bash, however, passes the argument \"path*\" to git, assuming that git will\n>   see the unquoted word unchanged as a single argument.\n>\n> But actually git expands the unquoted word before main() is entered.\n\nDoesn't this mean on Windows, the glob pathspec git supports is not useful\nat all?\n\nI am wondering if we want to treat any feature that involves globs as\nunusable like any feature that involves pathnames with a TAB in it.\n\n> In t2200, not all names that the test case is interested in exist as files\n> at the time when 'git ls-files' is invoked. git expands \"path?\" to only\n> the subset of files the exist, and only that subset was listed, so that the\n> test failed.  We now list all interesting paths explicitly.\n\nBut that conversion misses the whole point of that particular test,\ndoesn't it?  It wants to see path2 that was unmerged and existed only in\nthe index but not in the work tree has disappeared, while the similarly\nunmerged path1 resolved after \"add -u\".  IOW, you are not testing that\n\"add -u\" notices a removal of path2 from the work tree anymore.\n"},{"id":"108482","messageId":"49C1F415.1040403@viscovery.net","threadId":"18387","inReplyTo":"7vljr2bg9c.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH 00/11] Test on Windows - prequel","fromName":"Johannes Sixt","fromEmail":"j.sixt@viscovery.net","sentAt":"2009-03-19T07:28:21Z","receivedAt":"2009-03-19T07:28:21Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Junio C Hamano schrieb:\n> Do you have an 11-patch series, or 10-patch series with a cover letter?  I\n> am wondering what happened to [PATCH 11/11].\n\nIt's a 10-patch series, I still haven't learnt to count, and this\nformat-patch and send-email business causes me head-aches again and again\nand again... ;)\n\nI first prepared an 11-patch series, wrote the coverletter, then changed\nmy mind and prepared a 10-patch series, copied the coverletter including\nthe Subject: line without updating it.\n\n-- Hannes\n"},{"id":"108483","messageId":"49C1F673.9050500@viscovery.net","threadId":"18387","inReplyTo":"alpine.DEB.1.00.0903182319180.10279@pacific.mpi-cbg.de","subject":"Re: [PATCH 04/10] test-lib: Replace uses of $(expr ...) by POSIX shell features.","fromName":"Johannes Sixt","fromEmail":"j.sixt@viscovery.net","sentAt":"2009-03-19T07:38:27Z","receivedAt":"2009-03-19T07:38:27Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Johannes Schindelin schrieb:\n> Hi,\n> \n> On Wed, 18 Mar 2009, Johannes Sixt wrote:\n> \n>> In particular:\n>>\n>> - Test case counting can be achieved by arithmetic expansion.\n>>\n>> - The name of the test, e.g. t1234, can be computed with ${0%%} and ${0##}.\n>>\n>> Signed-off-by: Johannes Sixt <j6t@kdbg.org>\n> \n> I guess this makes the tests less slow on Windows?  Do you have numbers?\n\nActually, while reading through test-lib.sh I found those expr expressions\nquite difficult to understand, and my primary intent was to make the code\nmore readable. Furthermore, as you can see in the hunk that touches\ntest_known_broken_{ok,failure}_ that the $(( )) construct is already in\nuse, so it's also a change to improve consistency.\n\nThe shorter runtime (primarily on Windows) is just a nice side effect,\nalthough the gain probably vanishes in the noise.\n\n> FWIW I run the tests on Windows with -j10 these days, and they take about \n> 15 minutes on a quad core 3GHz machine (which I may use from time to time; \n> the machine is not mine, otherwise it would run Linux).\n\nLast time I tried -j<something> it bailed out early. I didn't try again\nsince then. Sequential tests finish in 30-40 minutes here, but I don't run\nSVN tests.\n\n-- Hannes\n"},{"id":"108484","messageId":"49C1F7E1.8090808@viscovery.net","threadId":"18387","inReplyTo":"alpine.DEB.1.00.0903182331330.10279@pacific.mpi-cbg.de","subject":"Re: [PATCH 05/10] test-lib: Simplify test counting.","fromName":"Johannes Sixt","fromEmail":"j.sixt@viscovery.net","sentAt":"2009-03-19T07:44:33Z","receivedAt":"2009-03-19T07:44:33Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Johannes Schindelin schrieb:\n> Hi,\n> \n> On Wed, 18 Mar 2009, Johannes Sixt wrote:\n> \n>> Since the test case counter was incremented very late, there were a few\n>> users of the counter had to do their own incrementing. Now we increment it\n>> early and simplify these users.\n>>\n>> Signed-off-by: Johannes Sixt <j6t@kdbg.org>\n>> ---\n>>  t/test-lib.sh |   10 +++-------\n>>  1 files changed, 3 insertions(+), 7 deletions(-)\n> \n> Do you not need to adjust t4013 and t5515, too?\n\nYes, indeed. That makes sense.\n\n-- Hannes\n"},{"id":"108485","messageId":"49C1F8D6.1060309@viscovery.net","threadId":"18387","inReplyTo":"alpine.DEB.1.00.0903182306020.10279@pacific.mpi-cbg.de","subject":"Re: [PATCH 02/10] test suite: Use 'say' to say something instead of 'test_expect_success'","fromName":"Johannes Sixt","fromEmail":"j.sixt@viscovery.net","sentAt":"2009-03-19T07:48:38Z","receivedAt":"2009-03-19T07:48:38Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Johannes Schindelin schrieb:\n> Hi,\n> \n> On Wed, 18 Mar 2009, Johannes Sixt wrote:\n> \n>> Some tests report that some tests will be skipped.  They used\n>> 'test_exect_success' with a trivially successful test.  Nowadays we have\n> \n> s/exect/expect/.\n> \n>> the helper function 'say' for this purpose.\n>>\n>> Signed-off-by: Johannes Sixt <j6t@kdbg.org>\n> \n> I see that you exchanged one \"say_color\" by \"say\".  What is the \n> difference?\n\nThe color. It's a change towards consistency. I figured that the command\nto use by the tests is \"say\", while \"say_color\" is an implementation\ndetail of test-lib.sh.\n\n-- Hannes\n"},{"id":"108503","messageId":"alpine.DEB.1.00.0903191124590.10279@pacific.mpi-cbg.de","threadId":"18387","inReplyTo":"49C1F673.9050500@viscovery.net","subject":"Re: [PATCH 04/10] test-lib: Replace uses of $(expr ...) by POSIX shell features.","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2009-03-19T10:27:38Z","receivedAt":"2009-03-19T10:27:38Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Thu, 19 Mar 2009, Johannes Sixt wrote:\n\n> Johannes Schindelin schrieb:\n> \n> > On Wed, 18 Mar 2009, Johannes Sixt wrote:\n> > \n> >> In particular:\n> >>\n> >> - Test case counting can be achieved by arithmetic expansion.\n> >>\n> >> - The name of the test, e.g. t1234, can be computed with ${0%%} and \n> >>   ${0##}.\n> >>\n> >> Signed-off-by: Johannes Sixt <j6t@kdbg.org>\n> > \n> > I guess this makes the tests less slow on Windows?  Do you have \n> > numbers?\n> \n> Actually, while reading through test-lib.sh I found those expr \n> expressions quite difficult to understand, and my primary intent was to \n> make the code more readable. Furthermore, as you can see in the hunk \n> that touches test_known_broken_{ok,failure}_ that the $(( )) construct \n> is already in use, so it's also a change to improve consistency.\n> \n> The shorter runtime (primarily on Windows) is just a nice side effect, \n> although the gain probably vanishes in the noise.\n\nActually, I should not have written that mail that late at night: 'expr' \nis a bash builtin.\n\n> > FWIW I run the tests on Windows with -j10 these days, and they take \n> > about 15 minutes on a quad core 3GHz machine (which I may use from \n> > time to time; the machine is not mine, otherwise it would run Linux).\n> \n> Last time I tried -j<something> it bailed out early. I didn't try again \n> since then. Sequential tests finish in 30-40 minutes here, but I don't \n> run SVN tests.\n\nIn msysGit, I updated the /share/msysGit/run-tests.sh script to make use \nof -j5.  If you work on a newer branch than 'devel', you most probably \nneed the changes from 'release-preview', as my \ntest-results/<basename>-<pid> patch broke the original assumption of \nrun-tests.sh.\n\nCiao,\nDscho\n"},{"id":"108504","messageId":"alpine.DEB.1.00.0903191128120.10279@pacific.mpi-cbg.de","threadId":"18387","inReplyTo":"49C1F8D6.1060309@viscovery.net","subject":"Re: [PATCH 02/10] test suite: Use 'say' to say something instead of 'test_expect_success'","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2009-03-19T10:29:08Z","receivedAt":"2009-03-19T10:29:08Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Thu, 19 Mar 2009, Johannes Sixt wrote:\n\n> Johannes Schindelin schrieb:\n> \n> > I see that you exchanged one \"say_color\" by \"say\".  What is the \n> > difference?\n> \n> The color. It's a change towards consistency. I figured that the command \n> to use by the tests is \"say\", while \"say_color\" is an implementation \n> detail of test-lib.sh.\n\nFair enough.  Could you say that in the commit message, too, so that \nmorons like me do not have to ask? ;-)\n\nThanks,\nDscho\n"},{"id":"108517","messageId":"7vd4cdahk8.fsf@gitster.siamese.dyndns.org","threadId":"18387","inReplyTo":"alpine.DEB.1.00.0903191128120.10279@pacific.mpi-cbg.de","subject":"Re: [PATCH 02/10] test suite: Use 'say' to say something instead of 'test_expect_success'","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-03-19T11:16:39Z","receivedAt":"2009-03-19T11:16:39Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n\n> Hi,\n>\n> On Thu, 19 Mar 2009, Johannes Sixt wrote:\n>\n>> Johannes Schindelin schrieb:\n>> \n>> > I see that you exchanged one \"say_color\" by \"say\".  What is the \n>> > difference?\n>> \n>> The color. It's a change towards consistency. I figured that the command \n>> to use by the tests is \"say\", while \"say_color\" is an implementation \n>> detail of test-lib.sh.\n>\n> Fair enough.  Could you say that in the commit message, too,...\n\nHave done so already.\n"},{"id":"108569","messageId":"200903192052.43162.j6t@kdbg.org","threadId":"18387","inReplyTo":"7v7i2mbap2.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH 08/10] t2200, t7004: Avoid glob pattern that also matches files","fromName":"Johannes Sixt","fromEmail":"j6t@kdbg.org","sentAt":"2009-03-19T19:52:42Z","receivedAt":"2009-03-19T19:52:42Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"On Donnerstag, 19. März 2009, Junio C Hamano wrote:\n> Johannes Sixt <j6t@kdbg.org> writes:\n> > On Windows, there is an unfortunate interaction between the MSYS bash and\n> > git's command line processing:\n> >\n> > - Since Windows's CMD does not do the wildcard expansion, but passes\n> >   arguments like path* through to the programs, the programs must do the\n> >   expansion themselves. This happens in the startup code before main() is\n> >   entered.\n> >\n> > - bash, however, passes the argument \"path*\" to git, assuming that git\n> > will see the unquoted word unchanged as a single argument.\n> >\n> > But actually git expands the unquoted word before main() is entered.\n>\n> Doesn't this mean on Windows, the glob pathspec git supports is not useful\n> at all?\n\nNo, it is still useful. There is a difference if I say\n\n   git add \"*a*\"\n\nfrom bash or from Windows's CMD. The latter passes the argument to git with \nthe dquotes; the startup code removes them and does not expand the wildcard. \nBut if bash invokes the command, bash removes the quotes, so that the startup \ncode only sees *a* and does the expansion.\n\n> > In t2200, not all names that the test case is interested in exist as\n> > files at the time when 'git ls-files' is invoked. git expands \"path?\" to\n> > only the subset of files the exist, and only that subset was listed, so\n> > that the test failed.  We now list all interesting paths explicitly.\n>\n> But that conversion misses the whole point of that particular test,\n> doesn't it?  It wants to see path2 that was unmerged and existed only in\n> the index but not in the work tree has disappeared, while the similarly\n> unmerged path1 resolved after \"add -u\".  IOW, you are not testing that\n> \"add -u\" notices a removal of path2 from the work tree anymore.\n\nI see. Then I'll just add path2 to the list, OK? It still passes the test.\n\n-- Hannes\n"},{"id":"108581","messageId":"7vd4cd8d60.fsf@gitster.siamese.dyndns.org","threadId":"18387","inReplyTo":"200903192052.43162.j6t@kdbg.org","subject":"Re: [PATCH 08/10] t2200, t7004: Avoid glob pattern that also matches files","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-03-19T20:34:31Z","receivedAt":"2009-03-19T20:34:31Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Sixt <j6t@kdbg.org> writes:\n\n> No, it is still useful. There is a difference if I say\n>\n>    git add \"*a*\"\n>\n> from bash or from Windows's CMD. The latter passes the argument to git with \n> the dquotes; the startup code removes them and does not expand the wildcard. \n> But if bash invokes the command, bash removes the quotes, so that the startup \n> code only sees *a* and does the expansion.\n\nI can only say \"yuck\" :-<.\n\n>> > In t2200, not all names that the test case is interested in exist as\n>> > files at the time when 'git ls-files' is invoked. git expands \"path?\" to\n>> > only the subset of files the exist, and only that subset was listed, so\n>> > that the test failed.  We now list all interesting paths explicitly.\n>>\n>> But that conversion misses the whole point of that particular test,\n>> doesn't it?  It wants to see path2 that was unmerged and existed only in\n>> the index but not in the work tree has disappeared, while the similarly\n>> unmerged path1 resolved after \"add -u\".  IOW, you are not testing that\n>> \"add -u\" notices a removal of path2 from the work tree anymore.\n>\n> I see. Then I'll just add path2 to the list, OK? It still passes the test.\n\nYeah, as we are not passing --error-unmatch to the command, it should be\nthe right thing to do.\n"},{"id":"108583","messageId":"200903192158.46680.j6t@kdbg.org","threadId":"18387","inReplyTo":"cover.1237410682.git.j6t@kdbg.org","subject":"Re: [PATCH 00/11] Test on Windows - prequel","fromName":"Johannes Sixt","fromEmail":"j6t@kdbg.org","sentAt":"2009-03-19T20:58:46Z","receivedAt":"2009-03-19T20:58:46Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"On Mittwoch, 18. März 2009, Johannes Sixt wrote:\n> I'm preparing a series of patches that adjust the test suite so that it\n> passes on Windows (MinGW port). This is the initial part of it. Another\n> dozen or more are to follow. By splitting the series I hope to get\n> earlier feedback.\n>\n> The series is also available from\n>\n>  git://repo.or.cz/git/mingw/j6t.git for-junio\n>\n>  http://repo.or.cz/w/git/mingw/j6t.git?a=shortlog;h=refs/heads/for-junio\n\nI've updated the series. Would you please pick up it up from the URL\nabove?\n\nThe changes in particular are:\n\n- [PATCH 02/10] test suite: Use 'say' to say something instead of...\n\n  Updated commit message.\n\n- [PATCH 04/10] test-lib: Replace uses of $(expr ...) by POSIX...\n\n  No changes to t4013 and t5515 anymore; the next patch removes the\n  lines that this patch touched.\n\n- [PATCH 05/10] test-lib: Simplify test counting.\n\n  Do not use $test_count+1 in t4013 and t5515.\n\n- [PATCH 08/10] t2200, t7004: Avoid glob pattern that also...\n\n  Added path2 to the list.\n\nBelow is the interdiff.\n\n-- Hannes  \n\ndiff --git a/t/t2200-add-update.sh b/t/t2200-add-update.sh\nindex 652801e..5a8d52f 100755\n--- a/t/t2200-add-update.sh\n+++ b/t/t2200-add-update.sh\n@@ -150,7 +150,7 @@ test_expect_success 'add -u resolves unmerged paths' '\n \techo 2 >path3 &&\n \techo 2 >path5 &&\n \tgit add -u &&\n-\tgit ls-files -s path1 path3 path4 path5 path6 >actual &&\n+\tgit ls-files -s path1 path2 path3 path4 path5 path6 >actual &&\n \t{\n \t\techo \"100644 $three 0\tpath1\"\n \t\techo \"100644 $one 1\tpath3\"\ndiff --git a/t/t4013-diff-various.sh b/t/t4013-diff-various.sh\nindex 9c30b29..426e64e 100755\n--- a/t/t4013-diff-various.sh\n+++ b/t/t4013-diff-various.sh\n@@ -101,8 +101,7 @@ do\n \t'' | '#'*) continue ;;\n \tesac\n \ttest=`echo \"$cmd\" | sed -e 's|[/ ][/ ]*|_|g'`\n-\tcnt=$(($test_count+1))\n-\tpfx=`printf \"%04d\" $cnt`\n+\tpfx=`printf \"%04d\" $test_count`\n \texpect=\"$TEST_DIRECTORY/t4013/diff.$test\"\n \tactual=\"$pfx-diff.$test\"\n \ndiff --git a/t/t5515-fetch-merge-logic.sh b/t/t5515-fetch-merge-logic.sh\nindex 0b39503..dbb927d 100755\n--- a/t/t5515-fetch-merge-logic.sh\n+++ b/t/t5515-fetch-merge-logic.sh\n@@ -129,8 +129,7 @@ do\n \t'' | '#'*) continue ;;\n \tesac\n \ttest=`echo \"$cmd\" | sed -e 's|[/ ][/ ]*|_|g'`\n-\tcnt=$(($test_count+1))\n-\tpfx=`printf \"%04d\" $cnt`\n+\tpfx=`printf \"%04d\" $test_count`\n \texpect_f=\"$TEST_DIRECTORY/t5515/fetch.$test\"\n \tactual_f=\"$pfx-fetch.$test\"\n \texpect_r=\"$TEST_DIRECTORY/t5515/refs.$test\"\n"},{"id":"108610","messageId":"7v8wn16ruu.fsf@gitster.siamese.dyndns.org","threadId":"18387","inReplyTo":"200903192158.46680.j6t@kdbg.org","subject":"Re: [PATCH 00/11] Test on Windows - prequel","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-03-19T23:00:09Z","receivedAt":"2009-03-19T23:00:09Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Sixt <j6t@kdbg.org> writes:\n\n> On Mittwoch, 18. März 2009, Johannes Sixt wrote:\n>> I'm preparing a series of patches that adjust the test suite so that it\n>> passes on Windows (MinGW port). This is the initial part of it. Another\n>> dozen or more are to follow. By splitting the series I hope to get\n>> earlier feedback.\n>>\n>> The series is also available from\n>>\n>>  git://repo.or.cz/git/mingw/j6t.git for-junio\n>>\n> I've updated the series. Would you please pick up it up from the URL\n> above?\n\nI think you have a typo in the \"Use 'say'\" one (\"In on case\").  Here is a\ndiff from what I queued previously but didn't have a chance to merge to 'pu':\n\n     test suite: Use 'say' to say something instead of 'test_expect_success'\n\n-    Some test scripts report that some tests will be skipped.  They used\n+    Some tests report that some tests will be skipped.  They used\n     'test_expect_success' with a trivially successful test.  Nowadays we have\n     the helper function 'say' for this purpose.\n\n-    t9700-perl-git.sh was using 'say_color' for this kind of reporting; change\n-    it to a vanilla 'say' for consistency.\n+    In on case, 'say_color skip' is replaced by 'say' because the former is\n+    not intended as a public API.\n\n     Signed-off-by: Johannes Sixt <j6t@kdbg.org>\n-    Signed-off-by: Junio C Hamano <gitster@pobox.com>\n\nOther than that, the interdiff matches what I expected to see.\n\nThanks.\n"}]}