{"thread":{"id":"4296","subject":"[PATCH 1/4] t3300-funny-names: shell portability fixes","startedAt":"2006-05-26T02:06:14Z","lastAt":"2006-05-29T05:39:05Z","messageCount":4,"participants":["Eric Wong","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":4},"messages":[{"id":"20723","messageId":"1148609178788-git-send-email-normalperson@yhbt.net","threadId":"4296","inReplyTo":null,"subject":"[PATCH 0/4] fix tests so they run without needing bash","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2006-05-26T02:06:14Z","receivedAt":"2006-05-26T02:06:14Z","isPatch":true,"sender":{"key":"e@80x24.org","avatar":null},"body":"I've tested these patches with bash, pdksh, and dash.  dash seems\nto be 7s faster than bash (28s vs 35s) when running `make test',\nand just a hair faster than pdksh.\n\nHerbert:\npatches #2 and #4 are required for dash, but not for pdksh.\nI'm not sure about #2, but I'm pretty certain the problem #4 works\naround is a bug in dash.\n\n[PATCH 1/4] t3300-funny-names: shell portability fixes\n[PATCH 2/4] tests: Remove heredoc usage inside quotes\n[PATCH 3/4] t5500-fetch-pack: remove local (bashism) usage.\n[PATCH 4/4] t6000lib: workaround a possible dash bug\n\n-- \nEric Wong\n"},{"id":"20719","messageId":"11486091783542-git-send-email-normalperson@yhbt.net","threadId":"4296","inReplyTo":"1148609178788-git-send-email-normalperson@yhbt.net","subject":"[PATCH 1/4] t3300-funny-names: shell portability fixes","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2006-05-26T02:06:15Z","receivedAt":"2006-05-26T02:06:15Z","isPatch":true,"sender":{"key":"e@80x24.org","avatar":null},"body":"echo isn't remotely standardized for handling backslashes,\nso cat + heredoc seems better\n\nSigned-off-by: Eric Wong <normalperson@yhbt.net>\n\n---\n\n t/t3300-funny-names.sh |   51 +++++++++++++++++++++++++++++++-----------------\n 1 files changed, 33 insertions(+), 18 deletions(-)\n\n6b5ef54aa860b557f88084c1d642a611f7abcf4d\ndiff --git a/t/t3300-funny-names.sh b/t/t3300-funny-names.sh\nindex 72a93da..c12270e 100755\n--- a/t/t3300-funny-names.sh\n+++ b/t/t3300-funny-names.sh\n@@ -40,9 +40,11 @@ test_expect_success 'git-ls-files no-fun\n t0=`git-write-tree`\n echo \"$t0\" >t0\n \n-echo 'just space\n+cat > expected <<\\EOF\n+just space\n no-funny\n-\"tabs\\t,\\\" (dq) and spaces\"' >expected\n+\"tabs\\t,\\\" (dq) and spaces\"\n+EOF\n test_expect_success 'git-ls-files with-funny' \\\n \t'git-update-index --add \"$p1\" &&\n \tgit-ls-files >current &&\n@@ -58,14 +60,18 @@ test_expect_success 'git-ls-files -z wit\n t1=`git-write-tree`\n echo \"$t1\" >t1\n \n-echo 'just space\n+cat > expected <<\\EOF\n+just space\n no-funny\n-\"tabs\\t,\\\" (dq) and spaces\"' >expected\n+\"tabs\\t,\\\" (dq) and spaces\"\n+EOF\n test_expect_success 'git-ls-tree with funny' \\\n \t'git-ls-tree -r $t1 | sed -e \"s/^[^\t]*\t//\" >current &&\n \t diff -u expected current'\n \n-echo 'A\t\"tabs\\t,\\\" (dq) and spaces\"' >expected\n+cat > expected <<\\EOF\n+A\t\"tabs\\t,\\\" (dq) and spaces\"\n+EOF\n test_expect_success 'git-diff-index with-funny' \\\n \t'git-diff-index --name-status $t0 >current &&\n \tdiff -u expected current'\n@@ -84,53 +90,62 @@ test_expect_success 'git-diff-tree -z wi\n \t'git-diff-tree -z --name-status $t0 $t1 | tr \\\\0 \\\\012 >current &&\n \tdiff -u expected current'\n \n-echo 'CNUM\tno-funny\t\"tabs\\t,\\\" (dq) and spaces\"' >expected\n+cat > expected <<\\EOF\n+CNUM\tno-funny\t\"tabs\\t,\\\" (dq) and spaces\"\n+EOF\n test_expect_success 'git-diff-tree -C with-funny' \\\n \t'git-diff-tree -C --find-copies-harder --name-status \\\n \t\t$t0 $t1 | sed -e 's/^C[0-9]*/CNUM/' >current &&\n \tdiff -u expected current'\n \n-echo 'RNUM\tno-funny\t\"tabs\\t,\\\" (dq) and spaces\"' >expected\n+cat > expected <<\\EOF\n+RNUM\tno-funny\t\"tabs\\t,\\\" (dq) and spaces\"\n+EOF\n test_expect_success 'git-diff-tree delete with-funny' \\\n \t'git-update-index --force-remove \"$p0\" &&\n \tgit-diff-index -M --name-status \\\n \t\t$t0 | sed -e 's/^R[0-9]*/RNUM/' >current &&\n \tdiff -u expected current'\n \n-echo 'diff --git a/no-funny \"b/tabs\\t,\\\" (dq) and spaces\"\n+cat > expected <<\\EOF\n+diff --git a/no-funny \"b/tabs\\t,\\\" (dq) and spaces\"\n similarity index NUM%\n rename from no-funny\n-rename to \"tabs\\t,\\\" (dq) and spaces\"' >expected\n-\n+rename to \"tabs\\t,\\\" (dq) and spaces\"\n+EOF\n test_expect_success 'git-diff-tree delete with-funny' \\\n \t'git-diff-index -M -p $t0 |\n \t sed -e \"s/index [0-9]*%/index NUM%/\" >current &&\n \t diff -u expected current'\n \n chmod +x \"$p1\"\n-echo 'diff --git a/no-funny \"b/tabs\\t,\\\" (dq) and spaces\"\n+cat > expected <<\\EOF\n+diff --git a/no-funny \"b/tabs\\t,\\\" (dq) and spaces\"\n old mode 100644\n new mode 100755\n similarity index NUM%\n rename from no-funny\n-rename to \"tabs\\t,\\\" (dq) and spaces\"' >expected\n-\n+rename to \"tabs\\t,\\\" (dq) and spaces\"\n+EOF\n test_expect_success 'git-diff-tree delete with-funny' \\\n \t'git-diff-index -M -p $t0 |\n \t sed -e \"s/index [0-9]*%/index NUM%/\" >current &&\n \t diff -u expected current'\n \n-echo >expected ' \"tabs\\t,\\\" (dq) and spaces\"\n- 1 files changed, 0 insertions(+), 0 deletions(-)'\n+cat >expected <<\\EOF\n+ \"tabs\\t,\\\" (dq) and spaces\"\n+ 1 files changed, 0 insertions(+), 0 deletions(-)\n+EOF\n test_expect_success 'git-diff-tree rename with-funny applied' \\\n \t'git-diff-index -M -p $t0 |\n \t git-apply --stat | sed -e \"s/|.*//\" -e \"s/ *\\$//\" >current &&\n \t diff -u expected current'\n \n-echo >expected ' no-funny\n+cat > expected <<\\EOF\n+ no-funny\n  \"tabs\\t,\\\" (dq) and spaces\"\n- 2 files changed, 3 insertions(+), 3 deletions(-)'\n-\n+ 2 files changed, 3 insertions(+), 3 deletions(-)\n+EOF\n test_expect_success 'git-diff-tree delete with-funny applied' \\\n \t'git-diff-index -p $t0 |\n \t git-apply --stat | sed -e \"s/|.*//\" -e \"s/ *\\$//\" >current &&\n-- \n1.3.2.g7d11\n"},{"id":"20724","messageId":"7vu07dqyk8.fsf@assigned-by-dhcp.cox.net","threadId":"4296","inReplyTo":"1148609178788-git-send-email-normalperson@yhbt.net","subject":"Re: [PATCH 0/4] fix tests so they run without needing bash","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-05-26T03:01:27Z","receivedAt":"2006-05-26T03:01:27Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"You are my hero.\n\nI've really been wanting to get rid of bashism and trying to run\neverything with dash was one of my goals.  Although recent trend\nseems to indicate people are more interested in getting rid of\nshell scripts altogether, it is nice to see somebody actually\ncares.\n"},{"id":"20864","messageId":"20060529053905.GD24077@localdomain","threadId":"4296","inReplyTo":"7vu07dqyk8.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH 0/4] fix tests so they run without needing bash","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2006-05-29T05:39:05Z","receivedAt":"2006-05-29T05:39:05Z","isPatch":true,"sender":{"key":"e@80x24.org","avatar":null},"body":"Junio C Hamano <junkio@cox.net> wrote:\n> You are my hero.\n\n:)\n\nYou and Linus have already been my heroes for a while.\n\nI was very pleasantly surprised that all the git-*.sh files work fine\n(for me, at least) and only the tests needed modification.\n\n-- \nEric Wong\n"}]}