{"thread":{"id":"53053","subject":"[PATCH v2 0/8] fix test failure with busybox","startedAt":"2020-03-22T00:55:53Z","lastAt":"2020-03-27T01:18:27Z","messageCount":36,"participants":["Đoàn Trần Công Danh","Jeff King","Johannes Schindelin","Torsten Bögershausen","Danh Doan","Junio C Hamano"],"isPatch":true,"patchVersion":2,"patchTotal":8},"messages":[{"id":"393671","messageId":"cover.1584838148.git.congdanhqx@gmail.com","threadId":"53053","inReplyTo":null,"subject":"[PATCH v2 0/8] fix test failure with busybox","fromName":"Đoàn Trần Công Danh","fromEmail":"congdanhqx@gmail.com","sentAt":"2020-03-22T00:55:09Z","receivedAt":"2020-03-22T00:55:53Z","isPatch":true,"sender":{"key":"congdanhqx@gmail.com","avatar":"https://avatars.githubusercontent.com/u/42673067?v=4"},"body":"Despite non-compiance from busybox's sh(1), grep(1), diff(1), find(1)\nAlpine Linux is still a popular choice for container these days.\n\nFix false-positive failure in testsuite when run in Alpine Linux.\n\nĐoàn Trần Công Danh (8):\n  t4061: use POSIX compliant regex(7)\n  test-lib-functions: test_cmp: eval $GIT_TEST_CMP\n  t5003: drop the subshell in test_lazy_prereq\n  t5003: skip conversion test if unzip -a is unavailable\n  t5616: use rev-parse instead to get HEAD's object_id\n  t7063: drop non-POSIX argument \"-ls\" from find(1)\n  t4124: fix test for non-compliant diff(1)\n  t5703: feed raw data into test-tool unpack-sideband\n\n t/helper/test-pkt-line.c           |  2 +-\n t/t4061-diff-indent.sh             |  2 +-\n t/t4124-apply-ws-rule.sh           |  6 ++++++\n t/t5003-archive-zip.sh             | 24 ++++++++++++------------\n t/t5616-partial-clone.sh           |  2 +-\n t/t5703-upload-pack-ref-in-want.sh |  5 +----\n t/t7063-status-untracked-cache.sh  |  2 +-\n t/test-lib-functions.sh            |  2 +-\n 8 files changed, 24 insertions(+), 21 deletions(-)\n\nRange-diff against v1:\n1:  4830bd3aaf ! 1:  288e343d09 t4061: use POSIX compliance regex(7)\n    @@ Metadata\n     Author: Đoàn Trần Công Danh <congdanhqx@gmail.com>\n     \n      ## Commit message ##\n    -    t4061: use POSIX compliance regex(7)\n    +    t4061: use POSIX compliant regex(7)\n     \n         BRE interprets `+` literally, and\n         `\\+` is undefined for POSIX BRE, from:\n    @@ Commit message\n     \n         This test is failing with busybox sed, the default sed of Alpine Linux\n     \n    -    Fix it by using literal `+` instead.\n    +    We have 2 options here:\n    +\n    +    - Using literal `+` because BRE will interpret it as-is, or\n    +    - Using character class `[+]` to defend against a sed that expects ERE\n    +\n    +    ERE-expected sed is theoretical at this point,\n    +    but we haven't found it, yet.\n    +    And, we may run into other problems with that sed.\n    +    Let's go with first option and fix it later if that sed could be found.\n     \n         Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>\n     \n2:  d3fafd61ec ! 2:  9d3823e849 test-lib-functions: test_cmp: eval $GIT_TEST_CMP\n    @@ Commit message\n         test-lib-functions: test_cmp: eval $GIT_TEST_CMP\n     \n         Shell recognises first non-assignment token as command name.\n    -    Thus, ` cd t/perf; ./p0000-perf-lib-sanity.sh -d -i -v` reports:\n    +    With /bin/sh linked to either /bin/bash or /bin/dash,\n    +    `cd t/perf && ./p0000-perf-lib-sanity.sh -d -i -v` reports:\n     \n         > test_cmp:1: command not found: diff -u\n     \n-:  ---------- > 3:  8e85b5c15c t5003: drop the subshell in test_lazy_prereq\n3:  ddeeefeae2 ! 4:  4f0ac0867c t5003: skip conversion test if unzip -a is unavailable\n    @@ Commit message\n     \n      ## t/t5003-archive-zip.sh ##\n     @@ t/t5003-archive-zip.sh: test_lazy_prereq UNZIP_SYMLINKS '\n    - \t)\n    + \ttest -h symlink\n      '\n      \n     +test_lazy_prereq UNZIP_CONVERT '\n    -+\t(\n    -+\t\tmkdir unzip-convert &&\n    -+\t\tcd unzip-convert &&\n    -+\t\t\"$GIT_UNZIP\" -a \"$TEST_DIRECTORY\"/t5003/infozip-symlinks.zip\n    -+\t)\n    ++\t\"$GIT_UNZIP\" -a \"$TEST_DIRECTORY\"/t5003/infozip-symlinks.zip\n     +'\n     +\n      check_zip() {\n4:  ce976e850c ! 5:  ee7ef352a7 t5616: use rev-parse instead to get HEAD's object_id\n    @@ t/t5616-partial-clone.sh: test_expect_success 'do partial clone 1' '\n      \tls pc1/.git/objects/pack/pack-*.promisor >promisorlist &&\n      \ttest_line_count = 1 promisorlist &&\n     -\tgit -C srv.bare rev-list HEAD >headhash &&\n    -+\tgit -C srv.bare rev-parse HEAD >headhash &&\n    ++\tgit -C srv.bare rev-parse --verify HEAD >headhash &&\n      \tgrep \"$(cat headhash) HEAD\" $(cat promisorlist) &&\n      \tgrep \"$(cat headhash) refs/heads/master\" $(cat promisorlist)\n      '\n5:  1993b28a12 ! 6:  59e3f73784 t7063: use POSIX find(1) syntax\n    @@ Metadata\n     Author: Đoàn Trần Công Danh <congdanhqx@gmail.com>\n     \n      ## Commit message ##\n    -    t7063: use POSIX find(1) syntax\n    +    t7063: drop non-POSIX argument \"-ls\" from find(1)\n     \n         Since commit 6b7728db81, (t7063: work around FreeBSD's lazy mtime\n         update feature, 2016-08-03), we started to use ls as a trick to update\n    @@ Commit message\n         However, `-ls` flag isn't required by POSIX's find(1), and\n         busybox(1) doesn't implement it.\n     \n    -    Use an equivalence `-exec ls -dils {} +` instead.\n    +    From the original conversation, it seems like find(1) with \"-type d\"\n    +    could trigger enough \"lstat(2)\" to ask FreeBSD update mtime.\n    +\n    +    Use only filter \"-type d\" for now.\n     \n         Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>\n     \n    @@ t/t7063-status-untracked-cache.sh: GIT_FORCE_UNTRACKED_CACHE=true\n      \n      sync_mtime () {\n     -\tfind . -type d -ls >/dev/null\n    -+\tfind . -type d -exec ls -dils {} + >/dev/null\n    ++\tfind . -type d >/dev/null\n      }\n      \n      avoid_racy() {\n6:  cd86febed9 ! 7:  10f39c3d30 t4124: fix test for non-compliance diff\n    @@ Metadata\n     Author: Đoàn Trần Công Danh <congdanhqx@gmail.com>\n     \n      ## Commit message ##\n    -    t4124: fix test for non-compliance diff\n    +    t4124: fix test for non-compliant diff(1)\n     \n         POSIX's diff(1) requires output in normal diff format.\n         However, busybox's diff's output is written in unified format.\n    @@ t/t4124-apply-ws-rule.sh: test_fix () {\n      \n      \t# find touched lines\n      \t$DIFF file target | sed -n -e \"s/^> //p\" >fixed\n    ++\t# busybox's diff(1) output unified format\n     +\tif ! test -s fixed; then\n     +\t\t$DIFF file target |\n    -+\t\tgrep '^+' |\n    -+\t\tgrep -v '^+++' |\n    -+\t\tsed -e \"s/+//\" >fixed\n    ++\t\tgrep -v '^+++ target' |\n    ++\t\tsed -e \"/^+/s/+//\" >fixed\n     +\tfi\n      \n      \t# the changed lines are all expected to change\n-:  ---------- > 8:  d4507d381e t5703: feed raw data into test-tool unpack-sideband\n-- \n2.26.0.rc2.310.g2932bb562d\n\n"},{"id":"393673","messageId":"288e343d09dd375bbb61ba97858f518b431d0b1d.1584838148.git.congdanhqx@gmail.com","threadId":"53053","inReplyTo":"cover.1584838148.git.congdanhqx@gmail.com","subject":"[PATCH v2 1/8] t4061: use POSIX compliant regex(7)","fromName":"Đoàn Trần Công Danh","fromEmail":"congdanhqx@gmail.com","sentAt":"2020-03-22T00:55:11Z","receivedAt":"2020-03-22T00:56:09Z","isPatch":true,"sender":{"key":"congdanhqx@gmail.com","avatar":"https://avatars.githubusercontent.com/u/42673067?v=4"},"body":"BRE interprets `+` literally, and\n`\\+` is undefined for POSIX BRE, from:\nhttps://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap09.html#tag_09_03_02\n\n> The interpretation of an ordinary character preceded\n> by an unescaped <backslash> ( '\\\\' ) is undefined, except for:\n> - The characters ')', '(', '{', and '}'\n> - The digits 1 to 9 inclusive\n> - A character inside a bracket expression\n\nThis test is failing with busybox sed, the default sed of Alpine Linux\n\nWe have 2 options here:\n\n- Using literal `+` because BRE will interpret it as-is, or\n- Using character class `[+]` to defend against a sed that expects ERE\n\nERE-expected sed is theoretical at this point,\nbut we haven't found it, yet.\nAnd, we may run into other problems with that sed.\nLet's go with first option and fix it later if that sed could be found.\n\nSigned-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>\n---\n t/t4061-diff-indent.sh | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/t/t4061-diff-indent.sh b/t/t4061-diff-indent.sh\nindex 2affd7a100..0f7a6d97a8 100755\n--- a/t/t4061-diff-indent.sh\n+++ b/t/t4061-diff-indent.sh\n@@ -17,7 +17,7 @@ compare_diff () {\n # Compare blame output using the expectation for a diff as reference.\n # Only look for the lines coming from non-boundary commits.\n compare_blame () {\n-\tsed -n -e \"1,4d\" -e \"s/^\\+//p\" <\"$1\" >.tmp-1\n+\tsed -n -e \"1,4d\" -e \"s/^+//p\" <\"$1\" >.tmp-1\n \tsed -ne \"s/^[^^][^)]*) *//p\" <\"$2\" >.tmp-2\n \ttest_cmp .tmp-1 .tmp-2 && rm -f .tmp-1 .tmp-2\n }\n-- \n2.26.0.rc2.310.g2932bb562d\n\n"},{"id":"393674","messageId":"8e85b5c15c47e7c524226d10915e4ecb12b2c132.1584838148.git.congdanhqx@gmail.com","threadId":"53053","inReplyTo":"cover.1584838148.git.congdanhqx@gmail.com","subject":"[PATCH v2 3/8] t5003: drop the subshell in test_lazy_prereq","fromName":"Đoàn Trần Công Danh","fromEmail":"congdanhqx@gmail.com","sentAt":"2020-03-22T00:55:13Z","receivedAt":"2020-03-22T00:56:09Z","isPatch":true,"sender":{"key":"congdanhqx@gmail.com","avatar":"https://avatars.githubusercontent.com/u/42673067?v=4"},"body":"test_lazy_prereq will be evaluated in a throw-away directory.\n\nDrop unnecessary subshell and mkdir.\n\nSigned-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>\n---\n t/t5003-archive-zip.sh | 8 ++------\n 1 file changed, 2 insertions(+), 6 deletions(-)\n\ndiff --git a/t/t5003-archive-zip.sh b/t/t5003-archive-zip.sh\nindex 106eddbd85..df1374a312 100755\n--- a/t/t5003-archive-zip.sh\n+++ b/t/t5003-archive-zip.sh\n@@ -7,12 +7,8 @@ test_description='git archive --format=zip test'\n SUBSTFORMAT=%H%n\n \n test_lazy_prereq UNZIP_SYMLINKS '\n-\t(\n-\t\tmkdir unzip-symlinks &&\n-\t\tcd unzip-symlinks &&\n-\t\t\"$GIT_UNZIP\" \"$TEST_DIRECTORY\"/t5003/infozip-symlinks.zip &&\n-\t\ttest -h symlink\n-\t)\n+\t\"$GIT_UNZIP\" \"$TEST_DIRECTORY\"/t5003/infozip-symlinks.zip &&\n+\ttest -h symlink\n '\n \n check_zip() {\n-- \n2.26.0.rc2.310.g2932bb562d\n\n"},{"id":"393675","messageId":"9d3823e84971e7f96b4f502d1f5ff54c70c59144.1584838148.git.congdanhqx@gmail.com","threadId":"53053","inReplyTo":"cover.1584838148.git.congdanhqx@gmail.com","subject":"[PATCH v2 2/8] test-lib-functions: test_cmp: eval $GIT_TEST_CMP","fromName":"Đoàn Trần Công Danh","fromEmail":"congdanhqx@gmail.com","sentAt":"2020-03-22T00:55:12Z","receivedAt":"2020-03-22T00:56:09Z","isPatch":true,"sender":{"key":"congdanhqx@gmail.com","avatar":"https://avatars.githubusercontent.com/u/42673067?v=4"},"body":"Shell recognises first non-assignment token as command name.\nWith /bin/sh linked to either /bin/bash or /bin/dash,\n`cd t/perf && ./p0000-perf-lib-sanity.sh -d -i -v` reports:\n\n> test_cmp:1: command not found: diff -u\n\nUsing `eval` to unquote $GIT_TEST_CMP as same as precedence in `git_editor`.\n\nSigned-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>\n---\n t/test-lib-functions.sh | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/t/test-lib-functions.sh b/t/test-lib-functions.sh\nindex 352c213d52..ab0e47ae17 100644\n--- a/t/test-lib-functions.sh\n+++ b/t/test-lib-functions.sh\n@@ -905,7 +905,7 @@ test_expect_code () {\n # - not all diff versions understand \"-u\"\n \n test_cmp() {\n-\t$GIT_TEST_CMP \"$@\"\n+\teval \"$GIT_TEST_CMP\" '\"$@\"'\n }\n \n # Check that the given config key has the expected value.\n-- \n2.26.0.rc2.310.g2932bb562d\n\n"},{"id":"393677","messageId":"4f0ac0867c4b50edcee4255237f8a122155fd9d2.1584838148.git.congdanhqx@gmail.com","threadId":"53053","inReplyTo":"cover.1584838148.git.congdanhqx@gmail.com","subject":"[PATCH v2 4/8] t5003: skip conversion test if unzip -a is unavailable","fromName":"Đoàn Trần Công Danh","fromEmail":"congdanhqx@gmail.com","sentAt":"2020-03-22T00:55:15Z","receivedAt":"2020-03-22T00:56:13Z","isPatch":true,"sender":{"key":"congdanhqx@gmail.com","avatar":"https://avatars.githubusercontent.com/u/42673067?v=4"},"body":"Alpine Linux's default unzip(1) doesn't support `-a`.\n\nSkip those tests on that platform.\n\nSigned-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>\n---\n t/t5003-archive-zip.sh | 16 ++++++++++------\n 1 file changed, 10 insertions(+), 6 deletions(-)\n\ndiff --git a/t/t5003-archive-zip.sh b/t/t5003-archive-zip.sh\nindex df1374a312..3b76d2eb65 100755\n--- a/t/t5003-archive-zip.sh\n+++ b/t/t5003-archive-zip.sh\n@@ -11,6 +11,10 @@ test_lazy_prereq UNZIP_SYMLINKS '\n \ttest -h symlink\n '\n \n+test_lazy_prereq UNZIP_CONVERT '\n+\t\"$GIT_UNZIP\" -a \"$TEST_DIRECTORY\"/t5003/infozip-symlinks.zip\n+'\n+\n check_zip() {\n \tzipfile=$1.zip\n \tlistfile=$1.lst\n@@ -35,33 +39,33 @@ check_zip() {\n \textracted=${dir_with_prefix}a\n \toriginal=a\n \n-\ttest_expect_success UNZIP \" extract ZIP archive with EOL conversion\" '\n+\ttest_expect_success UNZIP_CONVERT \" extract ZIP archive with EOL conversion\" '\n \t\t(mkdir $dir && cd $dir && \"$GIT_UNZIP\" -a ../$zipfile)\n \t'\n \n-\ttest_expect_success UNZIP \" validate that text files are converted\" \"\n+\ttest_expect_success UNZIP_CONVERT \" validate that text files are converted\" \"\n \t\ttest_cmp_bin $extracted/text.cr $extracted/text.crlf &&\n \t\ttest_cmp_bin $extracted/text.cr $extracted/text.lf\n \t\"\n \n-\ttest_expect_success UNZIP \" validate that binary files are unchanged\" \"\n+\ttest_expect_success UNZIP_CONVERT \" validate that binary files are unchanged\" \"\n \t\ttest_cmp_bin $original/binary.cr   $extracted/binary.cr &&\n \t\ttest_cmp_bin $original/binary.crlf $extracted/binary.crlf &&\n \t\ttest_cmp_bin $original/binary.lf   $extracted/binary.lf\n \t\"\n \n-\ttest_expect_success UNZIP \" validate that diff files are converted\" \"\n+\ttest_expect_success UNZIP_CONVERT \" validate that diff files are converted\" \"\n \t\ttest_cmp_bin $extracted/diff.cr $extracted/diff.crlf &&\n \t\ttest_cmp_bin $extracted/diff.cr $extracted/diff.lf\n \t\"\n \n-\ttest_expect_success UNZIP \" validate that -diff files are unchanged\" \"\n+\ttest_expect_success UNZIP_CONVERT \" validate that -diff files are unchanged\" \"\n \t\ttest_cmp_bin $original/nodiff.cr   $extracted/nodiff.cr &&\n \t\ttest_cmp_bin $original/nodiff.crlf $extracted/nodiff.crlf &&\n \t\ttest_cmp_bin $original/nodiff.lf   $extracted/nodiff.lf\n \t\"\n \n-\ttest_expect_success UNZIP \" validate that custom diff is unchanged \" \"\n+\ttest_expect_success UNZIP_CONVERT \" validate that custom diff is unchanged \" \"\n \t\ttest_cmp_bin $original/custom.cr   $extracted/custom.cr &&\n \t\ttest_cmp_bin $original/custom.crlf $extracted/custom.crlf &&\n \t\ttest_cmp_bin $original/custom.lf   $extracted/custom.lf\n-- \n2.26.0.rc2.310.g2932bb562d\n\n"},{"id":"393679","messageId":"ee7ef352a768db39a281df2579841789e4e2a184.1584838148.git.congdanhqx@gmail.com","threadId":"53053","inReplyTo":"cover.1584838148.git.congdanhqx@gmail.com","subject":"[PATCH v2 5/8] t5616: use rev-parse instead to get HEAD's object_id","fromName":"Đoàn Trần Công Danh","fromEmail":"congdanhqx@gmail.com","sentAt":"2020-03-22T00:55:17Z","receivedAt":"2020-03-22T00:56:17Z","isPatch":true,"sender":{"key":"congdanhqx@gmail.com","avatar":"https://avatars.githubusercontent.com/u/42673067?v=4"},"body":"Only HEAD's object_id is necessary, rev-list is an overkill.\n\nDespite POSIX requires grep(1) treat single pattern with <newline>\nas multiple patterns.\nbusybox's grep(1) (as of v1.31.1) haven't implemented it yet.\n\nUse rev-parse to simplify the test and avoid busybox unimplemented\nfeatures.\n\nSigned-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>\n---\n t/t5616-partial-clone.sh | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/t/t5616-partial-clone.sh b/t/t5616-partial-clone.sh\nindex 77bb91e976..09e640cae4 100755\n--- a/t/t5616-partial-clone.sh\n+++ b/t/t5616-partial-clone.sh\n@@ -49,7 +49,7 @@ test_expect_success 'do partial clone 1' '\n test_expect_success 'verify that .promisor file contains refs fetched' '\n \tls pc1/.git/objects/pack/pack-*.promisor >promisorlist &&\n \ttest_line_count = 1 promisorlist &&\n-\tgit -C srv.bare rev-list HEAD >headhash &&\n+\tgit -C srv.bare rev-parse --verify HEAD >headhash &&\n \tgrep \"$(cat headhash) HEAD\" $(cat promisorlist) &&\n \tgrep \"$(cat headhash) refs/heads/master\" $(cat promisorlist)\n '\n-- \n2.26.0.rc2.310.g2932bb562d\n\n"},{"id":"393682","messageId":"59e3f73784b2a3bd9ccec87412e6178411c3708e.1584838148.git.congdanhqx@gmail.com","threadId":"53053","inReplyTo":"cover.1584838148.git.congdanhqx@gmail.com","subject":"[PATCH v2 6/8] t7063: drop non-POSIX argument \"-ls\" from find(1)","fromName":"Đoàn Trần Công Danh","fromEmail":"congdanhqx@gmail.com","sentAt":"2020-03-22T00:55:20Z","receivedAt":"2020-03-22T00:56:21Z","isPatch":true,"sender":{"key":"congdanhqx@gmail.com","avatar":"https://avatars.githubusercontent.com/u/42673067?v=4"},"body":"Since commit 6b7728db81, (t7063: work around FreeBSD's lazy mtime\nupdate feature, 2016-08-03), we started to use ls as a trick to update\ndirectory's mtime.\n\nHowever, `-ls` flag isn't required by POSIX's find(1), and\nbusybox(1) doesn't implement it.\n\nFrom the original conversation, it seems like find(1) with \"-type d\"\ncould trigger enough \"lstat(2)\" to ask FreeBSD update mtime.\n\nUse only filter \"-type d\" for now.\n\nSigned-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>\n---\n t/t7063-status-untracked-cache.sh | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/t/t7063-status-untracked-cache.sh b/t/t7063-status-untracked-cache.sh\nindex 190ae149cf..6791c6b95a 100755\n--- a/t/t7063-status-untracked-cache.sh\n+++ b/t/t7063-status-untracked-cache.sh\n@@ -18,7 +18,7 @@ GIT_FORCE_UNTRACKED_CACHE=true\n export GIT_FORCE_UNTRACKED_CACHE\n \n sync_mtime () {\n-\tfind . -type d -ls >/dev/null\n+\tfind . -type d >/dev/null\n }\n \n avoid_racy() {\n-- \n2.26.0.rc2.310.g2932bb562d\n\n"},{"id":"393683","messageId":"10f39c3d30d13e9141f081f985a0620954cc7493.1584838148.git.congdanhqx@gmail.com","threadId":"53053","inReplyTo":"cover.1584838148.git.congdanhqx@gmail.com","subject":"[PATCH v2 7/8] t4124: fix test for non-compliant diff(1)","fromName":"Đoàn Trần Công Danh","fromEmail":"congdanhqx@gmail.com","sentAt":"2020-03-22T00:55:21Z","receivedAt":"2020-03-22T00:56:22Z","isPatch":true,"sender":{"key":"congdanhqx@gmail.com","avatar":"https://avatars.githubusercontent.com/u/42673067?v=4"},"body":"POSIX's diff(1) requires output in normal diff format.\nHowever, busybox's diff's output is written in unified format.\n\nPOSIX requires no option for normal-diff format.\n\nA hint in test-lib-functions::test_cmp said `diff -u` isn't available\neverywhere.\n\nWorkaround this problem by assuming `diff(1)` output is unified\nif we couldn't make anything from normal-diff format.\n\nSigned-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>\n---\n t/t4124-apply-ws-rule.sh | 6 ++++++\n 1 file changed, 6 insertions(+)\n\ndiff --git a/t/t4124-apply-ws-rule.sh b/t/t4124-apply-ws-rule.sh\nindex 971a5a7512..075b1912be 100755\n--- a/t/t4124-apply-ws-rule.sh\n+++ b/t/t4124-apply-ws-rule.sh\n@@ -52,6 +52,12 @@ test_fix () {\n \n \t# find touched lines\n \t$DIFF file target | sed -n -e \"s/^> //p\" >fixed\n+\t# busybox's diff(1) output unified format\n+\tif ! test -s fixed; then\n+\t\t$DIFF file target |\n+\t\tgrep -v '^+++ target' |\n+\t\tsed -e \"/^+/s/+//\" >fixed\n+\tfi\n \n \t# the changed lines are all expected to change\n \tfixed_cnt=$(wc -l <fixed)\n-- \n2.26.0.rc2.310.g2932bb562d\n\n"},{"id":"393684","messageId":"d4507d381e739667f9059fe2b512fb251a74c500.1584838148.git.congdanhqx@gmail.com","threadId":"53053","inReplyTo":"cover.1584838148.git.congdanhqx@gmail.com","subject":"[PATCH v2 8/8] t5703: feed raw data into test-tool unpack-sideband","fromName":"Đoàn Trần Công Danh","fromEmail":"congdanhqx@gmail.com","sentAt":"2020-03-22T00:55:22Z","receivedAt":"2020-03-22T00:56:23Z","isPatch":true,"sender":{"key":"congdanhqx@gmail.com","avatar":"https://avatars.githubusercontent.com/u/42673067?v=4"},"body":"busybox's sed isn't binary clean.\nThus, triggers false-negative on this test.\n\nWe could replace sed with perl on this usecase.\nBut, we could slightly modify the helper to discard unwanted data in the\nbeginning.\n\nFix the false negative by updating this helper.\n\nHelped-by: Jeff King <peff@peff.net>\nSigned-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>\n---\n t/helper/test-pkt-line.c           | 2 +-\n t/t5703-upload-pack-ref-in-want.sh | 5 +----\n 2 files changed, 2 insertions(+), 5 deletions(-)\n\ndiff --git a/t/helper/test-pkt-line.c b/t/helper/test-pkt-line.c\nindex 282d536384..12ca698e17 100644\n--- a/t/helper/test-pkt-line.c\n+++ b/t/helper/test-pkt-line.c\n@@ -67,7 +67,7 @@ static void unpack_sideband(void)\n \t\tcase PACKET_READ_NORMAL:\n \t\t\tband = reader.line[0] & 0xff;\n \t\t\tif (band < 1 || band > 2)\n-\t\t\t\tdie(\"unexpected side band %d\", band);\n+\t\t\t\tcontinue; /* skip non-sideband packets */\n \t\t\tfd = band;\n \n \t\t\twrite_or_die(fd, reader.line + 1, reader.pktlen - 1);\ndiff --git a/t/t5703-upload-pack-ref-in-want.sh b/t/t5703-upload-pack-ref-in-want.sh\nindex 7fba3063bf..a34460f7d8 100755\n--- a/t/t5703-upload-pack-ref-in-want.sh\n+++ b/t/t5703-upload-pack-ref-in-want.sh\n@@ -13,10 +13,7 @@ get_actual_refs () {\n }\n \n get_actual_commits () {\n-\tsed -n -e '/packfile/,/0000/{\n-\t\t/packfile/d\n-\t\tp\n-\t\t}' <out | test-tool pkt-line unpack-sideband >o.pack &&\n+\ttest-tool pkt-line unpack-sideband <out >o.pack &&\n \tgit index-pack o.pack &&\n \tgit verify-pack -v o.idx >objs &&\n \tgrep commit objs | cut -d\" \" -f1 | sort >actual_commits\n-- \n2.26.0.rc2.310.g2932bb562d\n\n"},{"id":"393690","messageId":"20200322060800.GE578498@coredump.intra.peff.net","threadId":"53053","inReplyTo":"cover.1584838148.git.congdanhqx@gmail.com","subject":"Re: [PATCH v2 0/8] fix test failure with busybox","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2020-03-22T06:08:00Z","receivedAt":"2020-03-22T06:08:02Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Sun, Mar 22, 2020 at 07:55:09AM +0700, Đoàn Trần Công Danh wrote:\n\n> Đoàn Trần Công Danh (8):\n>   t4061: use POSIX compliant regex(7)\n>   test-lib-functions: test_cmp: eval $GIT_TEST_CMP\n>   t5003: drop the subshell in test_lazy_prereq\n>   t5003: skip conversion test if unzip -a is unavailable\n>   t5616: use rev-parse instead to get HEAD's object_id\n>   t7063: drop non-POSIX argument \"-ls\" from find(1)\n>   t4124: fix test for non-compliant diff(1)\n>   t5703: feed raw data into test-tool unpack-sideband\n\nThese all look OK to me. Thanks for the extra discussion on BRE vs ERE\nin the commit message of the first one.\n\n-Peff\n"},{"id":"393768","messageId":"nycvar.QRO.7.76.6.2003231456200.46@tvgsbejvaqbjf.bet","threadId":"53053","inReplyTo":"10f39c3d30d13e9141f081f985a0620954cc7493.1584838148.git.congdanhqx@gmail.com","subject":"Re: [PATCH v2 7/8] t4124: fix test for non-compliant diff(1)","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2020-03-23T13:58:13Z","receivedAt":"2020-03-23T13:58:16Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Sun, 22 Mar 2020, Đoàn Trần Công Danh wrote:\n\n> POSIX's diff(1) requires output in normal diff format.\n> However, busybox's diff's output is written in unified format.\n>\n> POSIX requires no option for normal-diff format.\n>\n> A hint in test-lib-functions::test_cmp said `diff -u` isn't available\n> everywhere.\n>\n> Workaround this problem by assuming `diff(1)` output is unified\n> if we couldn't make anything from normal-diff format.\n>\n> Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>\n> ---\n>  t/t4124-apply-ws-rule.sh | 6 ++++++\n>  1 file changed, 6 insertions(+)\n>\n> diff --git a/t/t4124-apply-ws-rule.sh b/t/t4124-apply-ws-rule.sh\n> index 971a5a7512..075b1912be 100755\n> --- a/t/t4124-apply-ws-rule.sh\n> +++ b/t/t4124-apply-ws-rule.sh\n> @@ -52,6 +52,12 @@ test_fix () {\n>\n>  \t# find touched lines\n>  \t$DIFF file target | sed -n -e \"s/^> //p\" >fixed\n> +\t# busybox's diff(1) output unified format\n> +\tif ! test -s fixed; then\n> +\t\t$DIFF file target |\n> +\t\tgrep -v '^+++ target' |\n> +\t\tsed -e \"/^+/s/+//\" >fixed\n> +\tfi\n\nIn my patches (which are too unpolished to contribute, I have not found\ntime to clean them up in several years), I do this differently:\n\n-- snip --\ncommit cb2f3a28dbf40b92d3d9ca0f3177cd5afb7c4196\nAuthor: Johannes Schindelin <Johannes.Schindelin@gmx.de>\nDate:   Wed Jul 5 22:21:57 2017 +0200\n\n    t4124: avoid using \"normal\" diff mode\n\n    Everybody and their dogs, cats and other pets settled on using unified\n    diffs. It is a really quaint holdover from a long-gone era that GNU diff\n    outputs \"normal\" diff by default.\n\n    Yet, t4124 relied on that mode.\n\n    This mode is so out of fashion in the meantime, though, that e.g.\n    BusyBox' diff decided not even to bother to support it. It only supports\n    unified diffs.\n\n    So let's just switch away from \"normal\" diffs and use unified diffs, as\n    we really are only interested in the `+` lines.\n\n    Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n\ndiff --git a/t/t4124-apply-ws-rule.sh b/t/t4124-apply-ws-rule.sh\nindex 971a5a7512ac..133557b99333 100755\n--- a/t/t4124-apply-ws-rule.sh\n+++ b/t/t4124-apply-ws-rule.sh\n@@ -51,7 +51,7 @@ test_fix () {\n        apply_patch --whitespace=fix || return 1\n\n        # find touched lines\n-       $DIFF file target | sed -n -e \"s/^> //p\" >fixed\n+       $DIFF -u file target | sed -n -e \"3,\\$s/^+//p\" >fixed\n\n        # the changed lines are all expected to change\n        fixed_cnt=$(wc -l <fixed)\n-- snap --\n\nFood for thought?\n\nCiao,\nDscho\n\n>\n>  \t# the changed lines are all expected to change\n>  \tfixed_cnt=$(wc -l <fixed)\n> --\n> 2.26.0.rc2.310.g2932bb562d\n>\n>\n>\n"},{"id":"393769","messageId":"nycvar.QRO.7.76.6.2003231509150.46@tvgsbejvaqbjf.bet","threadId":"53053","inReplyTo":"59e3f73784b2a3bd9ccec87412e6178411c3708e.1584838148.git.congdanhqx@gmail.com","subject":"Re: [PATCH v2 6/8] t7063: drop non-POSIX argument \"-ls\" from find(1)","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2020-03-23T14:11:50Z","receivedAt":"2020-03-23T14:11:54Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Sun, 22 Mar 2020, Đoàn Trần Công Danh wrote:\n\n> Since commit 6b7728db81, (t7063: work around FreeBSD's lazy mtime\n> update feature, 2016-08-03), we started to use ls as a trick to update\n> directory's mtime.\n>\n> However, `-ls` flag isn't required by POSIX's find(1), and\n> busybox(1) doesn't implement it.\n>\n> >From the original conversation, it seems like find(1) with \"-type d\"\n> could trigger enough \"lstat(2)\" to ask FreeBSD update mtime.\n\nThis rationale  makes me uneasy: why did Duy add _both_ `-type d` *and*\n`-ls` if the former would have been enough?\n\n> Use only filter \"-type d\" for now.\n>\n> Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>\n> ---\n>  t/t7063-status-untracked-cache.sh | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n>\n> diff --git a/t/t7063-status-untracked-cache.sh b/t/t7063-status-untracked-cache.sh\n> index 190ae149cf..6791c6b95a 100755\n> --- a/t/t7063-status-untracked-cache.sh\n> +++ b/t/t7063-status-untracked-cache.sh\n> @@ -18,7 +18,7 @@ GIT_FORCE_UNTRACKED_CACHE=true\n>  export GIT_FORCE_UNTRACKED_CACHE\n>\n>  sync_mtime () {\n> -\tfind . -type d -ls >/dev/null\n> +\tfind . -type d >/dev/null\n\nA more conservative patch would be the following:\n\n-- snip --\ncommit 1680a64fae24b1073dbf1b844889a9953823b7a2\nAuthor: Johannes Schindelin <Johannes.Schindelin@gmx.de>\nDate:   Wed Jul 19 22:13:16 2017 +0200\n\n    t7063: when running under BusyBox, avoid unsupported find option\n\n    BusyBox' find implementation does not understand the -ls option, so\n    let's not use it when we're running inside BusyBox.\n\n    Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n\ndiff --git a/t/t7063-status-untracked-cache.sh\nb/t/t7063-status-untracked-cache.sh\nindex 190ae149cf3c..ab7e8b5fea01 100755\n--- a/t/t7063-status-untracked-cache.sh\n+++ b/t/t7063-status-untracked-cache.sh\n@@ -18,7 +18,12 @@ GIT_FORCE_UNTRACKED_CACHE=true\n export GIT_FORCE_UNTRACKED_CACHE\n\n sync_mtime () {\n-       find . -type d -ls >/dev/null\n+       if test_have_prereq BUSYBOX\n+       then\n+               find . -type d -print0 | xargs -0r ls -ld >/dev/null\n+       else\n+               find . -type d -ls >/dev/null\n+       fi\n }\n\n avoid_racy() {\n-- snap --\n\nI have this in Git for Windows' fork, although I have to admit that there\nis no CI set up to verify that this is all working as I expect it to.\n\nCiao,\nDscho\n\n>  }\n>\n>  avoid_racy() {\n> --\n> 2.26.0.rc2.310.g2932bb562d\n>\n>\n>\n"},{"id":"393770","messageId":"20200323143754.zagvr6xrz3x3nrpa@tb-raspi4","threadId":"53053","inReplyTo":"nycvar.QRO.7.76.6.2003231509150.46@tvgsbejvaqbjf.bet","subject":"Re: [PATCH v2 6/8] t7063: drop non-POSIX argument \"-ls\" from find(1)","fromName":"Torsten Bögershausen","fromEmail":"tboegi@web.de","sentAt":"2020-03-23T14:37:54Z","receivedAt":"2020-03-23T14:37:58Z","isPatch":true,"sender":{"key":"tboegi@web.de","avatar":"https://avatars.githubusercontent.com/u/7138363?v=4"},"body":"On Mon, Mar 23, 2020 at 03:11:50PM +0100, Johannes Schindelin wrote:\n> Hi,\n>\n> On Sun, 22 Mar 2020, Đoàn Trần Công Danh wrote:\n>\n> > Since commit 6b7728db81, (t7063: work around FreeBSD's lazy mtime\n> > update feature, 2016-08-03), we started to use ls as a trick to update\n> > directory's mtime.\n> >\n> > However, `-ls` flag isn't required by POSIX's find(1), and\n> > busybox(1) doesn't implement it.\n> >\n> > >From the original conversation, it seems like find(1) with \"-type d\"\n> > could trigger enough \"lstat(2)\" to ask FreeBSD update mtime.\n>\n> This rationale  makes me uneasy: why did Duy add _both_ `-type d` *and*\n> `-ls` if the former would have been enough?\n\nman readdir on my Linux gives:\n[]\nDESCRIPTION\n       The  readdir() function returns a pointer to a dirent structure representing the next\n       directory entry in the directory stream pointed to by dirp.  It returns\n       NULL on reaching the end of the directory stream or if an error occurred.\n\n       In the glibc implementation, the dirent structure is defined as follows:\n\n           struct dirent {\n               ino_t          d_ino;       /* Inode number */\n               off_t          d_off;       /* Not an offset; see below */\n               unsigned short d_reclen;    /* Length of this record */\n               unsigned char  d_type;      /* Type of file; not supported\n                                              by all filesystem types */\n               char           d_name[256]; /* Null-terminated filename */\n           };\n\nSo we could imagine that `find` is clever enough to extract \"-type d\" already\nwhen calling readdir(), and the \"good old\" following stat() is not needed here.\n\nSo I would strongly agree with Dscho to keep the `ls`\n\n[snip]\n"},{"id":"393772","messageId":"20200323150449.GC11801@danh.dev","threadId":"53053","inReplyTo":"nycvar.QRO.7.76.6.2003231456200.46@tvgsbejvaqbjf.bet","subject":"Re: [PATCH v2 7/8] t4124: fix test for non-compliant diff(1)","fromName":"Danh Doan","fromEmail":"congdanhqx@gmail.com","sentAt":"2020-03-23T15:04:49Z","receivedAt":"2020-03-23T15:04:54Z","isPatch":true,"sender":{"key":"congdanhqx@gmail.com","avatar":"https://avatars.githubusercontent.com/u/42673067?v=4"},"body":"On 2020-03-23 14:58:13+0100, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:\n> Hi,\n> \n> On Sun, 22 Mar 2020, Đoàn Trần Công Danh wrote:\n> \n> > POSIX's diff(1) requires output in normal diff format.\n> > However, busybox's diff's output is written in unified format.\n> >\n> > POSIX requires no option for normal-diff format.\n> >\n> > A hint in test-lib-functions::test_cmp said `diff -u` isn't available\n> > everywhere.\n> >\n> > Workaround this problem by assuming `diff(1)` output is unified\n> > if we couldn't make anything from normal-diff format.\n> >\n> > Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>\n> > ---\n> >  t/t4124-apply-ws-rule.sh | 6 ++++++\n> >  1 file changed, 6 insertions(+)\n> >\n> > diff --git a/t/t4124-apply-ws-rule.sh b/t/t4124-apply-ws-rule.sh\n> > index 971a5a7512..075b1912be 100755\n> > --- a/t/t4124-apply-ws-rule.sh\n> > +++ b/t/t4124-apply-ws-rule.sh\n> > @@ -52,6 +52,12 @@ test_fix () {\n> >\n> >  \t# find touched lines\n> >  \t$DIFF file target | sed -n -e \"s/^> //p\" >fixed\n> > +\t# busybox's diff(1) output unified format\n> > +\tif ! test -s fixed; then\n> > +\t\t$DIFF file target |\n> > +\t\tgrep -v '^+++ target' |\n> > +\t\tsed -e \"/^+/s/+//\" >fixed\n> > +\tfi\n> \n> In my patches (which are too unpolished to contribute, I have not found\n> time to clean them up in several years), I do this differently:\n> \n> -- snip --\n> commit cb2f3a28dbf40b92d3d9ca0f3177cd5afb7c4196\n> Author: Johannes Schindelin <Johannes.Schindelin@gmx.de>\n> Date:   Wed Jul 5 22:21:57 2017 +0200\n> \n>     t4124: avoid using \"normal\" diff mode\n> \n>     Everybody and their dogs, cats and other pets settled on using unified\n>     diffs. It is a really quaint holdover from a long-gone era that GNU diff\n>     outputs \"normal\" diff by default.\n> \n>     Yet, t4124 relied on that mode.\n> \n>     This mode is so out of fashion in the meantime, though, that e.g.\n>     BusyBox' diff decided not even to bother to support it. It only supports\n>     unified diffs.\n> \n>     So let's just switch away from \"normal\" diffs and use unified diffs, as\n>     we really are only interested in the `+` lines.\n> \n>     Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n> \n> diff --git a/t/t4124-apply-ws-rule.sh b/t/t4124-apply-ws-rule.sh\n> index 971a5a7512ac..133557b99333 100755\n> --- a/t/t4124-apply-ws-rule.sh\n> +++ b/t/t4124-apply-ws-rule.sh\n> @@ -51,7 +51,7 @@ test_fix () {\n>         apply_patch --whitespace=fix || return 1\n> \n>         # find touched lines\n> -       $DIFF file target | sed -n -e \"s/^> //p\" >fixed\n> +       $DIFF -u file target | sed -n -e \"3,\\$s/^+//p\" >fixed\n> \n>         # the changed lines are all expected to change\n>         fixed_cnt=$(wc -l <fixed)\n> -- snap --\n> \n> Food for thought?\n\nA comment in test-lib-functions::test_cmp mentions that\nthere _is_ a diff out there that doesn't understand \"-u\".\nI don't know which one is it.\n\nIf we choose to use \"diff -u\" here, we've made a certain assumption,\nshould we flip the switch in test_cmp, too?\n\n-- \nDanh\n"},{"id":"393774","messageId":"20200323151149.GD11801@danh.dev","threadId":"53053","inReplyTo":"nycvar.QRO.7.76.6.2003231509150.46@tvgsbejvaqbjf.bet","subject":"Re: [PATCH v2 6/8] t7063: drop non-POSIX argument \"-ls\" from find(1)","fromName":"Danh Doan","fromEmail":"congdanhqx@gmail.com","sentAt":"2020-03-23T15:11:49Z","receivedAt":"2020-03-23T15:11:54Z","isPatch":true,"sender":{"key":"congdanhqx@gmail.com","avatar":"https://avatars.githubusercontent.com/u/42673067?v=4"},"body":"On 2020-03-23 15:11:50+0100, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:\n> Hi,\n> \n> On Sun, 22 Mar 2020, Đoàn Trần Công Danh wrote:\n> \n> > Since commit 6b7728db81, (t7063: work around FreeBSD's lazy mtime\n> > update feature, 2016-08-03), we started to use ls as a trick to update\n> > directory's mtime.\n> >\n> > However, `-ls` flag isn't required by POSIX's find(1), and\n> > busybox(1) doesn't implement it.\n> >\n> > >From the original conversation, it seems like find(1) with \"-type d\"\n> > could trigger enough \"lstat(2)\" to ask FreeBSD update mtime.\n> \n> This rationale  makes me uneasy: why did Duy add _both_ `-type d` *and*\n> `-ls` if the former would have been enough?\n> \n> > Use only filter \"-type d\" for now.\n> >\n> > Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>\n> > ---\n> >  t/t7063-status-untracked-cache.sh | 2 +-\n> >  1 file changed, 1 insertion(+), 1 deletion(-)\n> >\n> > diff --git a/t/t7063-status-untracked-cache.sh b/t/t7063-status-untracked-cache.sh\n> > index 190ae149cf..6791c6b95a 100755\n> > --- a/t/t7063-status-untracked-cache.sh\n> > +++ b/t/t7063-status-untracked-cache.sh\n> > @@ -18,7 +18,7 @@ GIT_FORCE_UNTRACKED_CACHE=true\n> >  export GIT_FORCE_UNTRACKED_CACHE\n> >\n> >  sync_mtime () {\n> > -\tfind . -type d -ls >/dev/null\n> > +\tfind . -type d >/dev/null\n> \n> A more conservative patch would be the following:\n> \n> -- snip --\n> commit 1680a64fae24b1073dbf1b844889a9953823b7a2\n> Author: Johannes Schindelin <Johannes.Schindelin@gmx.de>\n> Date:   Wed Jul 19 22:13:16 2017 +0200\n> \n>     t7063: when running under BusyBox, avoid unsupported find option\n> \n>     BusyBox' find implementation does not understand the -ls option, so\n>     let's not use it when we're running inside BusyBox.\n\nYes, this patch is a conservative patch.\nIn v1, I went with \"-exec ls -dils {} +\".\n\nAnd, Jeff worries about a lot of flags passed to ls may run into\ncompatibility issue.\n\n> \n>     Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n> \n> diff --git a/t/t7063-status-untracked-cache.sh\n> b/t/t7063-status-untracked-cache.sh\n> index 190ae149cf3c..ab7e8b5fea01 100755\n> --- a/t/t7063-status-untracked-cache.sh\n> +++ b/t/t7063-status-untracked-cache.sh\n> @@ -18,7 +18,12 @@ GIT_FORCE_UNTRACKED_CACHE=true\n>  export GIT_FORCE_UNTRACKED_CACHE\n> \n>  sync_mtime () {\n> -       find . -type d -ls >/dev/null\n> +       if test_have_prereq BUSYBOX\n> +       then\n> +               find . -type d -print0 | xargs -0r ls -ld >/dev/null\n\nCan we just change back to what Duy proposed time ago:\n\n\tfind . -type d -exec ls -ld {} \\;\n\n> +       else\n> +               find . -type d -ls >/dev/null\n> +       fi\n>  }\n> \n>  avoid_racy() {\n> -- snap --\n> \n> I have this in Git for Windows' fork, although I have to admit that there\n> is no CI set up to verify that this is all working as I expect it to.\n\nI'd find some time (later) to setup a Travis build with Alpine and VoidLinux,\nmainly for musl check.\n\n-- \nDanh\n"},{"id":"393777","messageId":"xmqqy2rr5amm.fsf@gitster.c.googlers.com","threadId":"53053","inReplyTo":"nycvar.QRO.7.76.6.2003231509150.46@tvgsbejvaqbjf.bet","subject":"Re: [PATCH v2 6/8] t7063: drop non-POSIX argument \"-ls\" from find(1)","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2020-03-23T15:55:29Z","receivedAt":"2020-03-23T15:55:40Z","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> diff --git a/t/t7063-status-untracked-cache.sh\n> b/t/t7063-status-untracked-cache.sh\n> index 190ae149cf3c..ab7e8b5fea01 100755\n> --- a/t/t7063-status-untracked-cache.sh\n> +++ b/t/t7063-status-untracked-cache.sh\n> @@ -18,7 +18,12 @@ GIT_FORCE_UNTRACKED_CACHE=true\n>  export GIT_FORCE_UNTRACKED_CACHE\n>\n>  sync_mtime () {\n> -       find . -type d -ls >/dev/null\n> +       if test_have_prereq BUSYBOX\n> +       then\n> +               find . -type d -print0 | xargs -0r ls -ld >/dev/null\n> +       else\n> +               find . -type d -ls >/dev/null\n> +       fi\n\nGiven that this is only to work around the lazy mtime sync found on\nBSDs, if we were to have any if/then/else, shouldn't we be rather\ndoing\n\n\tif test_have_prereq NEEDS_SYNC_MTIME_BECAUSE_WE_ARE_ON_BSD\n\tthen\n\t\tfind . -type d -ls >/dev/null\n\tfi\n\nto make it a no-op for most everybody (including Windows)?\n"},{"id":"393815","messageId":"xmqqd0924xw9.fsf@gitster.c.googlers.com","threadId":"53053","inReplyTo":"20200323151149.GD11801@danh.dev","subject":"Re: [PATCH v2 6/8] t7063: drop non-POSIX argument \"-ls\" from find(1)","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2020-03-23T20:30:30Z","receivedAt":"2020-03-23T20:30:38Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Danh Doan <congdanhqx@gmail.com> writes:\n\n> Can we just change back to what Duy proposed time ago:\n>\n> \tfind . -type d -exec ls -ld {} \\;\n\nYup, that sounds just as conservative as it can get.  On platforms\nthat are not FreeBSD, anything done in this helper function is an\nexpensive noop, but provided that the working tree is small enough\nand the overhead would not matter, something very simple like the\nabove sounds like the way to go.  If the overhead is too much, on\nthe other hand, then we can do it only conditionally on certain\nfilesystems where the issue exists.\n\n> I'd find some time (later) to setup a Travis build with Alpine and VoidLinux,\n> mainly for musl check.\n\nThanks.\n"},{"id":"393816","messageId":"xmqq8sjq4wyf.fsf@gitster.c.googlers.com","threadId":"53053","inReplyTo":"20200323150449.GC11801@danh.dev","subject":"Re: [PATCH v2 7/8] t4124: fix test for non-compliant diff(1)","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2020-03-23T20:50:48Z","receivedAt":"2020-03-23T20:50:55Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Danh Doan <congdanhqx@gmail.com> writes:\n\n> A comment in test-lib-functions::test_cmp mentions that\n> there _is_ a diff out there that doesn't understand \"-u\".\n\nThat came from 82ebb0b6 (add test_cmp function for test scripts,\n2008-03-12).\n\nThe change history at the end of the page:\n\n  https://pubs.opengroup.org/onlinepubs/9699919799/utilities/diff.html\n\nsuggests that POSIX did not require \"diff -u\" until Issue 7, so it\nis not surprising that the lack of \"diff -u\" to cause test_cmp to\nfail was of real concern back in March 2008, as the application of\nthe errata have been only an year and half old, according to:\n\n  https://www.opengroup.org/austin/docs/austin_325.txt\n\nI vaguely recall that some open source projects only took the copied\ncontext diffs and not unified ones the last time I checked, but\nadmittedly (1) that \"last time\" was a long time ago and (2) our\npopularity and the fact that we do not understand copied context\n[*1*] may have forced people to move away from \"-c\" and adopt \"-u\"\nat the same time.  \n\nSo it might be OK to write off any system that does not understand\n\"diff -u\" as an unusable trash these days ;-)\n\nIOW, I think I am fine with assuming \"diff -u\" is available, like\nDscho's patch does.\n\nThanks.\n\n\n[Footnote]\n\n*1* It used to be my desire to teach \"git apply\" and \"git diff\" to\n    also work with copied context format, but procrastination made\n    it less and less relevant X-<.\n"},{"id":"393850","messageId":"20200324034025.GE11801@danh.dev","threadId":"53053","inReplyTo":"xmqq8sjq4wyf.fsf@gitster.c.googlers.com","subject":"Re: [PATCH v2 7/8] t4124: fix test for non-compliant diff(1)","fromName":"Danh Doan","fromEmail":"congdanhqx@gmail.com","sentAt":"2020-03-24T03:40:48Z","receivedAt":"2020-03-24T03:40:53Z","isPatch":true,"sender":{"key":"congdanhqx@gmail.com","avatar":"https://avatars.githubusercontent.com/u/42673067?v=4"},"body":"On 2020-03-23 13:50:48-0700, Junio C Hamano <gitster@pobox.com> wrote:\n> Danh Doan <congdanhqx@gmail.com> writes:\n> \n> > A comment in test-lib-functions::test_cmp mentions that\n> > there _is_ a diff out there that doesn't understand \"-u\".\n> \n> That came from 82ebb0b6 (add test_cmp function for test scripts,\n> 2008-03-12).\n> \n> The change history at the end of the page:\n> \n>   https://pubs.opengroup.org/onlinepubs/9699919799/utilities/diff.html\n> \n> suggests that POSIX did not require \"diff -u\" until Issue 7, so it\n> is not surprising that the lack of \"diff -u\" to cause test_cmp to\n> fail was of real concern back in March 2008, as the application of\n> the errata have been only an year and half old, according to:\n> \n>   https://www.opengroup.org/austin/docs/austin_325.txt\n> \n> I vaguely recall that some open source projects only took the copied\n> context diffs and not unified ones the last time I checked, but\n> admittedly (1) that \"last time\" was a long time ago and (2) our\n> popularity and the fact that we do not understand copied context\n> [*1*] may have forced people to move away from \"-c\" and adopt \"-u\"\n> at the same time.  \n> \n> So it might be OK to write off any system that does not understand\n> \"diff -u\" as an unusable trash these days ;-)\n\nFrom the setting in \"config.mak.uname\", it's likely those systems\ndon't understand \"diff -u\":\n\n- Solaris 5.6, 5.7, 5.8, 5.9: both of them are un-supported version\n  by their vendor\n- AIX, only AIX 5.3 doesn't understand \"-u\",\n  the end-of-support AIX 6.1's diff(1) understand \"-u\" (1)\n- HP-UX: From what I can collect, HP-UX still conforms to UNIX-03, and\n  its diff(1) doesn't understand \"-u\"\n\nHence, if we're going to drop support for system that doesn't\nunderstand \"diff -u\", we're going to:\n- remove support for those variables:\n  + GIT_TEST_CMP_USE_COPIED_CONTEXT\n  + GIT_TEST_CMP\n- drop support for:\n  + Solaris 5.{6,7,8,} and AIX 5.3, which will be fine\n  + HP-UX: which needs to be discussed\n\n[1]: https://public.dhe.ibm.com/systems/power/docs/aix/61/aixcmds2_pdf.pdf page 133(143)\n\n-- \nDanh\n"},{"id":"393885","messageId":"xmqqy2rp1tff.fsf@gitster.c.googlers.com","threadId":"53053","inReplyTo":"20200324034025.GE11801@danh.dev","subject":"Re: [PATCH v2 7/8] t4124: fix test for non-compliant diff(1)","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2020-03-24T18:47:32Z","receivedAt":"2020-03-24T18:47:40Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Danh Doan <congdanhqx@gmail.com> writes:\n\n> Hence, if we're going to drop support for system that doesn't\n> understand \"diff -u\", we're going to:\n> - remove support for those variables:\n>   + GIT_TEST_CMP_USE_COPIED_CONTEXT\n\nFolks who prefer \"-c\" even their platforms all are capable of \"-u\"\nmay miss this, but I think that is a very small minority, and they\nwould be OK (it is after all only needed when diagnosing test\nfailures of our test suite, and by definition, those who are working\nto improve Git would know how to read \"-u\" output).\n\n>   + GIT_TEST_CMP\n\nI am not sure why you need to drop this one?  This is more about\nswitching between \"diff\" and \"cmp\", and there are reasons why folks\nprefer latter especially when they are not debugging the tests.\n\n> - drop support for:\n>   + Solaris 5.{6,7,8,} and AIX 5.3, which will be fine\n>   + HP-UX: which needs to be discussed\n>\n> [1]: https://public.dhe.ibm.com/systems/power/docs/aix/61/aixcmds2_pdf.pdf page 133(143)\n"},{"id":"393902","messageId":"nycvar.QRO.7.76.6.2003242328380.46@tvgsbejvaqbjf.bet","threadId":"53053","inReplyTo":"20200324034025.GE11801@danh.dev","subject":"Re: [PATCH v2 7/8] t4124: fix test for non-compliant diff(1)","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2020-03-24T22:29:02Z","receivedAt":"2020-03-24T22:29:13Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Tue, 24 Mar 2020, Danh Doan wrote:\n\n> On 2020-03-23 13:50:48-0700, Junio C Hamano <gitster@pobox.com> wrote:\n> > Danh Doan <congdanhqx@gmail.com> writes:\n> >\n> > > A comment in test-lib-functions::test_cmp mentions that\n> > > there _is_ a diff out there that doesn't understand \"-u\".\n> >\n> > That came from 82ebb0b6 (add test_cmp function for test scripts,\n> > 2008-03-12).\n> >\n> > The change history at the end of the page:\n> >\n> >   https://pubs.opengroup.org/onlinepubs/9699919799/utilities/diff.html\n> >\n> > suggests that POSIX did not require \"diff -u\" until Issue 7, so it\n> > is not surprising that the lack of \"diff -u\" to cause test_cmp to\n> > fail was of real concern back in March 2008, as the application of\n> > the errata have been only an year and half old, according to:\n> >\n> >   https://www.opengroup.org/austin/docs/austin_325.txt\n> >\n> > I vaguely recall that some open source projects only took the copied\n> > context diffs and not unified ones the last time I checked, but\n> > admittedly (1) that \"last time\" was a long time ago and (2) our\n> > popularity and the fact that we do not understand copied context\n> > [*1*] may have forced people to move away from \"-c\" and adopt \"-u\"\n> > at the same time.\n> >\n> > So it might be OK to write off any system that does not understand\n> > \"diff -u\" as an unusable trash these days ;-)\n>\n> From the setting in \"config.mak.uname\", it's likely those systems\n> don't understand \"diff -u\":\n>\n> - Solaris 5.6, 5.7, 5.8, 5.9: both of them are un-supported version\n>   by their vendor\n> - AIX, only AIX 5.3 doesn't understand \"-u\",\n>   the end-of-support AIX 6.1's diff(1) understand \"-u\" (1)\n> - HP-UX: From what I can collect, HP-UX still conforms to UNIX-03, and\n>   its diff(1) doesn't understand \"-u\"\n>\n> Hence, if we're going to drop support for system that doesn't\n> understand \"diff -u\", we're going to:\n> - remove support for those variables:\n>   + GIT_TEST_CMP_USE_COPIED_CONTEXT\n>   + GIT_TEST_CMP\n> - drop support for:\n>   + Solaris 5.{6,7,8,} and AIX 5.3, which will be fine\n>   + HP-UX: which needs to be discussed\n>\n> [1]: https://public.dhe.ibm.com/systems/power/docs/aix/61/aixcmds2_pdf.pdf page 133(143)\n\nWith this explanation, I totally agree that your patch is better than\nmine.\n\nThanks,\nDscho\n"},{"id":"393903","messageId":"nycvar.QRO.7.76.6.2003242330540.46@tvgsbejvaqbjf.bet","threadId":"53053","inReplyTo":"xmqqy2rr5amm.fsf@gitster.c.googlers.com","subject":"Re: [PATCH v2 6/8] t7063: drop non-POSIX argument \"-ls\" from find(1)","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2020-03-24T22:31:10Z","receivedAt":"2020-03-24T22:31:16Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Junio,\n\nOn Mon, 23 Mar 2020, Junio C Hamano wrote:\n\n> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n>\n> > diff --git a/t/t7063-status-untracked-cache.sh\n> > b/t/t7063-status-untracked-cache.sh\n> > index 190ae149cf3c..ab7e8b5fea01 100755\n> > --- a/t/t7063-status-untracked-cache.sh\n> > +++ b/t/t7063-status-untracked-cache.sh\n> > @@ -18,7 +18,12 @@ GIT_FORCE_UNTRACKED_CACHE=true\n> >  export GIT_FORCE_UNTRACKED_CACHE\n> >\n> >  sync_mtime () {\n> > -       find . -type d -ls >/dev/null\n> > +       if test_have_prereq BUSYBOX\n> > +       then\n> > +               find . -type d -print0 | xargs -0r ls -ld >/dev/null\n> > +       else\n> > +               find . -type d -ls >/dev/null\n> > +       fi\n>\n> Given that this is only to work around the lazy mtime sync found on\n> BSDs, if we were to have any if/then/else, shouldn't we be rather\n> doing\n>\n> \tif test_have_prereq NEEDS_SYNC_MTIME_BECAUSE_WE_ARE_ON_BSD\n> \tthen\n> \t\tfind . -type d -ls >/dev/null\n> \tfi\n>\n> to make it a no-op for most everybody (including Windows)?\n\nI like that approach.\n\nThank you,\nDscho\n"},{"id":"393908","messageId":"xmqqtv2dz5mf.fsf@gitster.c.googlers.com","threadId":"53053","inReplyTo":"nycvar.QRO.7.76.6.2003242328380.46@tvgsbejvaqbjf.bet","subject":"Re: [PATCH v2 7/8] t4124: fix test for non-compliant diff(1)","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2020-03-24T23:37:44Z","receivedAt":"2020-03-24T23:37:51Z","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> With this explanation, I totally agree that your patch is better than\n> mine.\n\nMeaning that we'd have a fallback checker that understands \"diff -u\"\noutput, because the presense of \"diff -u\" cannot be relied upon and\nwe'd need to keep the original that understands \"diff -c\" anyway?\n\nIf that is what you meant, I am 100% fine with that.\n\n"},{"id":"393911","messageId":"xmqqk139z584.fsf@gitster.c.googlers.com","threadId":"53053","inReplyTo":"nycvar.QRO.7.76.6.2003242330540.46@tvgsbejvaqbjf.bet","subject":"Re: [PATCH v2 6/8] t7063: drop non-POSIX argument \"-ls\" from find(1)","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2020-03-24T23:46:19Z","receivedAt":"2020-03-24T23:46:27Z","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 Junio,\n>\n> On Mon, 23 Mar 2020, Junio C Hamano wrote:\n>\n>> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n>>\n>> > diff --git a/t/t7063-status-untracked-cache.sh\n>> > b/t/t7063-status-untracked-cache.sh\n>> > index 190ae149cf3c..ab7e8b5fea01 100755\n>> > --- a/t/t7063-status-untracked-cache.sh\n>> > +++ b/t/t7063-status-untracked-cache.sh\n>> > @@ -18,7 +18,12 @@ GIT_FORCE_UNTRACKED_CACHE=true\n>> >  export GIT_FORCE_UNTRACKED_CACHE\n>> >\n>> >  sync_mtime () {\n>> > -       find . -type d -ls >/dev/null\n>> > +       if test_have_prereq BUSYBOX\n>> > +       then\n>> > +               find . -type d -print0 | xargs -0r ls -ld >/dev/null\n>> > +       else\n>> > +               find . -type d -ls >/dev/null\n>> > +       fi\n>>\n>> Given that this is only to work around the lazy mtime sync found on\n>> BSDs, if we were to have any if/then/else, shouldn't we be rather\n>> doing\n>>\n>> \tif test_have_prereq NEEDS_SYNC_MTIME_BECAUSE_WE_ARE_ON_BSD\n>> \tthen\n>> \t\tfind . -type d -ls >/dev/null\n>> \tfi\n>>\n>> to make it a no-op for most everybody (including Windows)?\n>\n> I like that approach.\n\nI actually think I was being half stupid --- what are we going to\ntell those who want a stripped down system with busybox based on\nBSD?  I think the condition for \"if\" is OK (as long as we have a\nreal prereq suitable for the approach), but the actual \"let's make\nsure the inodes are stat(2)ed\" should avoid relying on \"find -ls\".\n\nIf we can assume that a typical busybox build offers find with -print0\nand xargs with -0, I think the version you sent is probably the best\n(with or without \"do so only on BSD\" I suggested) approach.\n\nThanks.\n\n\n"},{"id":"393967","messageId":"20200325142421.GA20898@danh.dev","threadId":"53053","inReplyTo":"xmqqy2rp1tff.fsf@gitster.c.googlers.com","subject":"Re: [PATCH v2 7/8] t4124: fix test for non-compliant diff(1)","fromName":"Danh Doan","fromEmail":"congdanhqx@gmail.com","sentAt":"2020-03-25T14:24:21Z","receivedAt":"2020-03-25T14:24:29Z","isPatch":true,"sender":{"key":"congdanhqx@gmail.com","avatar":"https://avatars.githubusercontent.com/u/42673067?v=4"},"body":"On 2020-03-24 11:47:32-0700, Junio C Hamano <gitster@pobox.com> wrote:\n> Danh Doan <congdanhqx@gmail.com> writes:\n> \n> > Hence, if we're going to drop support for system that doesn't\n> > understand \"diff -u\", we're going to:\n> > - remove support for those variables:\n> >   + GIT_TEST_CMP_USE_COPIED_CONTEXT\n> \n> Folks who prefer \"-c\" even their platforms all are capable of \"-u\"\n> may miss this, but I think that is a very small minority, and they\n> would be OK (it is after all only needed when diagnosing test\n> failures of our test suite, and by definition, those who are working\n> to improve Git would know how to read \"-u\" output).\n> \n> >   + GIT_TEST_CMP\n> \n> I am not sure why you need to drop this one?  This is more about\n> switching between \"diff\" and \"cmp\", and there are reasons why folks\n> prefer latter especially when they are not debugging the tests.\n\nI was thinking it could simplify the test_cmp code.\nThere was a problem which needs to be addressed by 2/8.\n\nYes, people may prefer to use cmp(1) because cmp(1) should be faster\nthan diff(1).\n\nAnyway, it seems like we've decided to keep using normal-diff because\nof HP-UX.\n\n-- \nDanh\n"},{"id":"393992","messageId":"nycvar.QRO.7.76.6.2003251923340.46@tvgsbejvaqbjf.bet","threadId":"53053","inReplyTo":"xmqqtv2dz5mf.fsf@gitster.c.googlers.com","subject":"Re: [PATCH v2 7/8] t4124: fix test for non-compliant diff(1)","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2020-03-25T18:23:58Z","receivedAt":"2020-03-25T18:24:13Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Junio,\n\nOn Tue, 24 Mar 2020, Junio C Hamano wrote:\n\n> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n>\n> > With this explanation, I totally agree that your patch is better than\n> > mine.\n>\n> Meaning that we'd have a fallback checker that understands \"diff -u\"\n> output, because the presense of \"diff -u\" cannot be relied upon and\n> we'd need to keep the original that understands \"diff -c\" anyway?\n>\n> If that is what you meant, I am 100% fine with that.\n\nYes, that's what I meant. Thanks for clearing this up!\n\nCiao,\nDscho\n"},{"id":"394042","messageId":"08839cac15fcb8452918563e0a9512975ba65b92.1585197360.git.congdanhqx@gmail.com","threadId":"53053","inReplyTo":"cover.1585197360.git.congdanhqx@gmail.com","subject":"[PATCH v4 1/8] t4061: use POSIX compliant regex(7)","fromName":"Đoàn Trần Công Danh","fromEmail":"congdanhqx@gmail.com","sentAt":"2020-03-26T04:37:31Z","receivedAt":"2020-03-26T04:37:52Z","isPatch":true,"sender":{"key":"congdanhqx@gmail.com","avatar":"https://avatars.githubusercontent.com/u/42673067?v=4"},"body":"BRE interprets `+` literally, and\n`\\+` is undefined for POSIX BRE, from:\nhttps://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap09.html#tag_09_03_02\n\n> The interpretation of an ordinary character preceded\n> by an unescaped <backslash> ( '\\\\' ) is undefined, except for:\n> - The characters ')', '(', '{', and '}'\n> - The digits 1 to 9 inclusive\n> - A character inside a bracket expression\n\nThis test is failing with busybox sed, the default sed of Alpine Linux\n\nWe have 2 options here:\n\n- Using literal `+` because BRE will interpret it as-is, or\n- Using character class `[+]` to defend against a sed that expects ERE\n\nERE-expected sed is theoretical at this point,\nbut we haven't found it, yet.\nAnd, we may run into other problems with that sed.\nLet's go with first option and fix it later if that sed could be found.\n\nSigned-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>\n---\n t/t4061-diff-indent.sh | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/t/t4061-diff-indent.sh b/t/t4061-diff-indent.sh\nindex 2affd7a100..0f7a6d97a8 100755\n--- a/t/t4061-diff-indent.sh\n+++ b/t/t4061-diff-indent.sh\n@@ -17,7 +17,7 @@ compare_diff () {\n # Compare blame output using the expectation for a diff as reference.\n # Only look for the lines coming from non-boundary commits.\n compare_blame () {\n-\tsed -n -e \"1,4d\" -e \"s/^\\+//p\" <\"$1\" >.tmp-1\n+\tsed -n -e \"1,4d\" -e \"s/^+//p\" <\"$1\" >.tmp-1\n \tsed -ne \"s/^[^^][^)]*) *//p\" <\"$2\" >.tmp-2\n \ttest_cmp .tmp-1 .tmp-2 && rm -f .tmp-1 .tmp-2\n }\n-- \n2.26.0.rc2.357.g1e1ba0441d\n\n"},{"id":"394043","messageId":"cover.1585197360.git.congdanhqx@gmail.com","threadId":"53053","inReplyTo":"cover.1584838148.git.congdanhqx@gmail.com","subject":"[PATCH v4 0/8] fix test failure with busybox","fromName":"Đoàn Trần Công Danh","fromEmail":"congdanhqx@gmail.com","sentAt":"2020-03-26T04:37:30Z","receivedAt":"2020-03-26T04:37:52Z","isPatch":true,"sender":{"key":"congdanhqx@gmail.com","avatar":"https://avatars.githubusercontent.com/u/42673067?v=4"},"body":"Please ignore v3, there is an incorrect change in t4124.\nI found it when working on travis for linux-musl\n\nDespite non-compiance from busybox's sh(1), grep(1), diff(1), find(1)\nAlpine Linux is still a popular choice for container these days.\n\nFix false-positive failure in testsuite when run in Alpine Linux.\n\nĐoàn Trần Công Danh (8):\n  t4061: use POSIX compliant regex(7)\n  test-lib-functions: test_cmp: eval $GIT_TEST_CMP\n  t5003: drop the subshell in test_lazy_prereq\n  t5003: skip conversion test if unzip -a is unavailable\n  t5616: use rev-parse instead to get HEAD's object_id\n  t7063: drop non-POSIX argument \"-ls\" from find(1)\n  t4124: fix test for non-compliant diff(1)\n  t5703: feed raw data into test-tool unpack-sideband\n\n t/helper/test-pkt-line.c           |  2 +-\n t/t4061-diff-indent.sh             |  2 +-\n t/t4124-apply-ws-rule.sh           |  6 ++++++\n t/t5003-archive-zip.sh             | 24 ++++++++++++------------\n t/t5616-partial-clone.sh           |  2 +-\n t/t5703-upload-pack-ref-in-want.sh |  5 +----\n t/t7063-status-untracked-cache.sh  |  2 +-\n t/test-lib-functions.sh            |  2 +-\n 8 files changed, 24 insertions(+), 21 deletions(-)\n\nRange-diff against v3:\n -:  ---------- >  1:  780308d060 t3404: use test_cmp_rev\n -:  ---------- >  2:  5b7a64df40 cherry-pick: add test for `--skip` advice in `git commit`\n -:  ---------- >  3:  f028d661c7 cherry-pick: check commit error messages\n -:  ---------- >  4:  21b11c6d1d sequencer: write CHERRY_PICK_HEAD for reword and edit\n -:  ---------- >  5:  8d57f75749 commit: use enum value for multiple cherry-picks\n -:  ---------- >  6:  901ba7b1ef commit: encapsulate determine_whence() for sequencer\n -:  ---------- >  7:  430b75f720 commit: give correct advice for empty commit during a rebase\n -:  ---------- >  8:  0b4396f068 git-p4: make python2.7 the oldest supported version\n -:  ---------- >  9:  484d09c303 git-p4: change the expansion test from basestring to list\n -:  ---------- > 10:  1f8b46d0a4 git-p4: remove string type aliasing\n -:  ---------- > 11:  6cec21a82f git-p4: encode/decode communication with p4 for python3\n -:  ---------- > 12:  86dca24b7b git-p4: encode/decode communication with git for python3\n -:  ---------- > 13:  d38208a297 git-p4: convert path to unicode before processing them\n -:  ---------- > 14:  5a5577d808 git-p4: open .gitp4-usercache.txt in text mode\n -:  ---------- > 15:  50da1e7393 git-p4: use marshal format version 2 when sending to p4\n -:  ---------- > 16:  4294d741cc git-p4: fix freezing while waiting for fast-import progress\n -:  ---------- > 17:  a6b1306735 git-p4: use functools.reduce instead of reduce\n -:  ---------- > 18:  2e2aa8d903 git-p4: use dict.items() iteration for python3 compatibility\n -:  ---------- > 19:  ce425eb4e1 git-p4: simplify regex pattern generation for parsing diff-tree\n -:  ---------- > 20:  7575f4fdec git-p4: use python3's input() everywhere\n -:  ---------- > 21:  06ac2b3b6e advice: extract vadvise() from advise()\n -:  ---------- > 22:  fef0c76f18 advice: change \"setupStreamFailure\" to \"setUpstreamFailure\"\n -:  ---------- > 23:  b3b18d1621 advice: revamp advise API\n -:  ---------- > 24:  f665d63a91 tag: use new advice API to check visibility\n -:  ---------- > 25:  88238e02d5 http: add client cert support for HTTPS proxies\n -:  ---------- > 26:  af026519c9 http: add environment variable support for HTTPS proxies\n -:  ---------- > 27:  0915a5b4cd set_git_dir: fix crash when used with real_path()\n -:  ---------- > 28:  564956f358 update how-to-maintain-git\n -:  ---------- > 29:  6bb40ed20a ci: use python3 in linux-gcc and osx-gcc and python2 elsewhere\n -:  ---------- > 30:  3d7747e318 real_path: remove unsafe API\n -:  ---------- > 31:  4530a85b4c real_path_if_valid(): remove unsafe API\n -:  ---------- > 32:  49d3c4b481 get_superproject_working_tree(): return strbuf\n -:  ---------- > 33:  7422b2a0a1 commit-slab: clarify slabname##_peek()'s return value\n -:  ---------- > 34:  9c688735f6 pull: document more passthru options\n -:  ---------- > 35:  b739d971e5 connected.c: reprepare packs for corner cases\n -:  ---------- > 36:  757c2ba3e2 oidset: remove unnecessary include\n -:  ---------- > 37:  8312aa7d74 separate tar.* config to its own source file\n -:  ---------- > 38:  d00a5bdd50 submodule--helper.c: Rename 'cb_foreach' to 'foreach_cb'\n -:  ---------- > 39:  a7d14a4428 The first batch post 2.26 cycle\n 1:  34f96548de = 40:  08839cac15 t4061: use POSIX compliant regex(7)\n 2:  50f46986a6 = 41:  31d4a9b2e8 test-lib-functions: test_cmp: eval $GIT_TEST_CMP\n 3:  8719a07753 = 42:  f871a7f395 t5003: drop the subshell in test_lazy_prereq\n 4:  457eecaf9b = 43:  bc6bcc786d t5003: skip conversion test if unzip -a is unavailable\n 5:  d3bc855e17 = 44:  c6f7498d93 t5616: use rev-parse instead to get HEAD's object_id\n 6:  64472ec3bc ! 45:  b3acf4adcf t7063: drop non-POSIX argument \"-ls\" from find(1)\n    @@ Commit message\n         However, `-ls` flag isn't required by POSIX's find(1), and\n         busybox(1) doesn't implement it.\n     \n    -    From the original conversation, it seems like find(1) with \"-type d\"\n    -    could trigger enough \"lstat(2)\" to ask FreeBSD update mtime.\n    -\n    -    Use only filter \"-type d\" for now.\n    +    Use \"-exec ls -ld {} +\" instead.\n     \n         Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>\n     \n    @@ t/t7063-status-untracked-cache.sh: GIT_FORCE_UNTRACKED_CACHE=true\n      \n      sync_mtime () {\n     -\tfind . -type d -ls >/dev/null\n    -+\tfind . -type d >/dev/null\n    ++\tfind . -type d -exec ls -ld {} + >/dev/null\n      }\n      \n      avoid_racy() {\n 7:  51df6dd12d ! 46:  02c115e93a t4124: fix test for non-compliant diff(1)\n    @@ Commit message\n         POSIX's diff(1) requires output in normal diff format.\n         However, busybox's diff's output is written in unified format.\n     \n    -    POSIX requires no option for normal-diff format.\n    +    HP-UX's diff(1) doesn't understand \"-u\" as of now.\n     \n    -    A hint in test-lib-functions::test_cmp said `diff -u` isn't available\n    -    everywhere.\n    -\n    -    Workaround this problem by assuming `diff(1)` output is unified\n    +    Workaround this problem by checking \"diff -u\" output,\n         if we couldn't make anything from normal-diff format.\n     \n         Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>\n    @@ t/t4124-apply-ws-rule.sh: test_fix () {\n      \n      \t# find touched lines\n      \t$DIFF file target | sed -n -e \"s/^> //p\" >fixed\n    -+\t# busybox's diff(1) output unified format\n    ++\t# busybox's diff(1) doesn't output normal format\n     +\tif ! test -s fixed; then\n    -+\t\t$DIFF file target |\n    ++\t\t$DIFF -u file target |\n     +\t\tgrep -v '^+++ target' |\n    -+\t\tsed -e \"/^+/s/+//\" >fixed\n    ++\t\tsed -ne \"/^+/s/+//p\" >fixed\n     +\tfi\n      \n      \t# the changed lines are all expected to change\n 8:  843c7f66d9 = 47:  2b8e75aaa5 t5703: feed raw data into test-tool unpack-sideband\n-- \n2.26.0.rc2.357.g1e1ba0441d\n\n"},{"id":"394044","messageId":"31d4a9b2e8f29b8477be5a53890d86b28fe13f8a.1585197360.git.congdanhqx@gmail.com","threadId":"53053","inReplyTo":"cover.1585197360.git.congdanhqx@gmail.com","subject":"[PATCH v4 2/8] test-lib-functions: test_cmp: eval $GIT_TEST_CMP","fromName":"Đoàn Trần Công Danh","fromEmail":"congdanhqx@gmail.com","sentAt":"2020-03-26T04:37:32Z","receivedAt":"2020-03-26T04:37:55Z","isPatch":true,"sender":{"key":"congdanhqx@gmail.com","avatar":"https://avatars.githubusercontent.com/u/42673067?v=4"},"body":"Shell recognises first non-assignment token as command name.\nWith /bin/sh linked to either /bin/bash or /bin/dash,\n`cd t/perf && ./p0000-perf-lib-sanity.sh -d -i -v` reports:\n\n> test_cmp:1: command not found: diff -u\n\nUsing `eval` to unquote $GIT_TEST_CMP as same as precedence in `git_editor`.\n\nSigned-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>\n---\n t/test-lib-functions.sh | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/t/test-lib-functions.sh b/t/test-lib-functions.sh\nindex 352c213d52..ab0e47ae17 100644\n--- a/t/test-lib-functions.sh\n+++ b/t/test-lib-functions.sh\n@@ -905,7 +905,7 @@ test_expect_code () {\n # - not all diff versions understand \"-u\"\n \n test_cmp() {\n-\t$GIT_TEST_CMP \"$@\"\n+\teval \"$GIT_TEST_CMP\" '\"$@\"'\n }\n \n # Check that the given config key has the expected value.\n-- \n2.26.0.rc2.357.g1e1ba0441d\n\n"},{"id":"394045","messageId":"f871a7f39534c122bdcf4b8bd18971386e4fd1d0.1585197360.git.congdanhqx@gmail.com","threadId":"53053","inReplyTo":"cover.1585197360.git.congdanhqx@gmail.com","subject":"[PATCH v4 3/8] t5003: drop the subshell in test_lazy_prereq","fromName":"Đoàn Trần Công Danh","fromEmail":"congdanhqx@gmail.com","sentAt":"2020-03-26T04:37:33Z","receivedAt":"2020-03-26T04:37:56Z","isPatch":true,"sender":{"key":"congdanhqx@gmail.com","avatar":"https://avatars.githubusercontent.com/u/42673067?v=4"},"body":"test_lazy_prereq will be evaluated in a throw-away directory.\n\nDrop unnecessary subshell and mkdir.\n\nSigned-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>\n---\n t/t5003-archive-zip.sh | 8 ++------\n 1 file changed, 2 insertions(+), 6 deletions(-)\n\ndiff --git a/t/t5003-archive-zip.sh b/t/t5003-archive-zip.sh\nindex 106eddbd85..df1374a312 100755\n--- a/t/t5003-archive-zip.sh\n+++ b/t/t5003-archive-zip.sh\n@@ -7,12 +7,8 @@ test_description='git archive --format=zip test'\n SUBSTFORMAT=%H%n\n \n test_lazy_prereq UNZIP_SYMLINKS '\n-\t(\n-\t\tmkdir unzip-symlinks &&\n-\t\tcd unzip-symlinks &&\n-\t\t\"$GIT_UNZIP\" \"$TEST_DIRECTORY\"/t5003/infozip-symlinks.zip &&\n-\t\ttest -h symlink\n-\t)\n+\t\"$GIT_UNZIP\" \"$TEST_DIRECTORY\"/t5003/infozip-symlinks.zip &&\n+\ttest -h symlink\n '\n \n check_zip() {\n-- \n2.26.0.rc2.357.g1e1ba0441d\n\n"},{"id":"394046","messageId":"bc6bcc786d5858dd12fcfa667bbbdae4989e3d6c.1585197360.git.congdanhqx@gmail.com","threadId":"53053","inReplyTo":"cover.1585197360.git.congdanhqx@gmail.com","subject":"[PATCH v4 4/8] t5003: skip conversion test if unzip -a is unavailable","fromName":"Đoàn Trần Công Danh","fromEmail":"congdanhqx@gmail.com","sentAt":"2020-03-26T04:37:34Z","receivedAt":"2020-03-26T04:37:57Z","isPatch":true,"sender":{"key":"congdanhqx@gmail.com","avatar":"https://avatars.githubusercontent.com/u/42673067?v=4"},"body":"Alpine Linux's default unzip(1) doesn't support `-a`.\n\nSkip those tests on that platform.\n\nSigned-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>\n---\n t/t5003-archive-zip.sh | 16 ++++++++++------\n 1 file changed, 10 insertions(+), 6 deletions(-)\n\ndiff --git a/t/t5003-archive-zip.sh b/t/t5003-archive-zip.sh\nindex df1374a312..3b76d2eb65 100755\n--- a/t/t5003-archive-zip.sh\n+++ b/t/t5003-archive-zip.sh\n@@ -11,6 +11,10 @@ test_lazy_prereq UNZIP_SYMLINKS '\n \ttest -h symlink\n '\n \n+test_lazy_prereq UNZIP_CONVERT '\n+\t\"$GIT_UNZIP\" -a \"$TEST_DIRECTORY\"/t5003/infozip-symlinks.zip\n+'\n+\n check_zip() {\n \tzipfile=$1.zip\n \tlistfile=$1.lst\n@@ -35,33 +39,33 @@ check_zip() {\n \textracted=${dir_with_prefix}a\n \toriginal=a\n \n-\ttest_expect_success UNZIP \" extract ZIP archive with EOL conversion\" '\n+\ttest_expect_success UNZIP_CONVERT \" extract ZIP archive with EOL conversion\" '\n \t\t(mkdir $dir && cd $dir && \"$GIT_UNZIP\" -a ../$zipfile)\n \t'\n \n-\ttest_expect_success UNZIP \" validate that text files are converted\" \"\n+\ttest_expect_success UNZIP_CONVERT \" validate that text files are converted\" \"\n \t\ttest_cmp_bin $extracted/text.cr $extracted/text.crlf &&\n \t\ttest_cmp_bin $extracted/text.cr $extracted/text.lf\n \t\"\n \n-\ttest_expect_success UNZIP \" validate that binary files are unchanged\" \"\n+\ttest_expect_success UNZIP_CONVERT \" validate that binary files are unchanged\" \"\n \t\ttest_cmp_bin $original/binary.cr   $extracted/binary.cr &&\n \t\ttest_cmp_bin $original/binary.crlf $extracted/binary.crlf &&\n \t\ttest_cmp_bin $original/binary.lf   $extracted/binary.lf\n \t\"\n \n-\ttest_expect_success UNZIP \" validate that diff files are converted\" \"\n+\ttest_expect_success UNZIP_CONVERT \" validate that diff files are converted\" \"\n \t\ttest_cmp_bin $extracted/diff.cr $extracted/diff.crlf &&\n \t\ttest_cmp_bin $extracted/diff.cr $extracted/diff.lf\n \t\"\n \n-\ttest_expect_success UNZIP \" validate that -diff files are unchanged\" \"\n+\ttest_expect_success UNZIP_CONVERT \" validate that -diff files are unchanged\" \"\n \t\ttest_cmp_bin $original/nodiff.cr   $extracted/nodiff.cr &&\n \t\ttest_cmp_bin $original/nodiff.crlf $extracted/nodiff.crlf &&\n \t\ttest_cmp_bin $original/nodiff.lf   $extracted/nodiff.lf\n \t\"\n \n-\ttest_expect_success UNZIP \" validate that custom diff is unchanged \" \"\n+\ttest_expect_success UNZIP_CONVERT \" validate that custom diff is unchanged \" \"\n \t\ttest_cmp_bin $original/custom.cr   $extracted/custom.cr &&\n \t\ttest_cmp_bin $original/custom.crlf $extracted/custom.crlf &&\n \t\ttest_cmp_bin $original/custom.lf   $extracted/custom.lf\n-- \n2.26.0.rc2.357.g1e1ba0441d\n\n"},{"id":"394047","messageId":"c6f7498d934e79f751cbdfdea62571e6012a3cbf.1585197360.git.congdanhqx@gmail.com","threadId":"53053","inReplyTo":"cover.1585197360.git.congdanhqx@gmail.com","subject":"[PATCH v4 5/8] t5616: use rev-parse instead to get HEAD's object_id","fromName":"Đoàn Trần Công Danh","fromEmail":"congdanhqx@gmail.com","sentAt":"2020-03-26T04:37:35Z","receivedAt":"2020-03-26T04:37:59Z","isPatch":true,"sender":{"key":"congdanhqx@gmail.com","avatar":"https://avatars.githubusercontent.com/u/42673067?v=4"},"body":"Only HEAD's object_id is necessary, rev-list is an overkill.\n\nDespite POSIX requires grep(1) treat single pattern with <newline>\nas multiple patterns.\nbusybox's grep(1) (as of v1.31.1) haven't implemented it yet.\n\nUse rev-parse to simplify the test and avoid busybox unimplemented\nfeatures.\n\nSigned-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>\n---\n t/t5616-partial-clone.sh | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/t/t5616-partial-clone.sh b/t/t5616-partial-clone.sh\nindex 77bb91e976..09e640cae4 100755\n--- a/t/t5616-partial-clone.sh\n+++ b/t/t5616-partial-clone.sh\n@@ -49,7 +49,7 @@ test_expect_success 'do partial clone 1' '\n test_expect_success 'verify that .promisor file contains refs fetched' '\n \tls pc1/.git/objects/pack/pack-*.promisor >promisorlist &&\n \ttest_line_count = 1 promisorlist &&\n-\tgit -C srv.bare rev-list HEAD >headhash &&\n+\tgit -C srv.bare rev-parse --verify HEAD >headhash &&\n \tgrep \"$(cat headhash) HEAD\" $(cat promisorlist) &&\n \tgrep \"$(cat headhash) refs/heads/master\" $(cat promisorlist)\n '\n-- \n2.26.0.rc2.357.g1e1ba0441d\n\n"},{"id":"394048","messageId":"02c115e93aa27bb0a8ebfb65a69d12b4cd26fc9b.1585197360.git.congdanhqx@gmail.com","threadId":"53053","inReplyTo":"cover.1585197360.git.congdanhqx@gmail.com","subject":"[PATCH v4 7/8] t4124: fix test for non-compliant diff(1)","fromName":"Đoàn Trần Công Danh","fromEmail":"congdanhqx@gmail.com","sentAt":"2020-03-26T04:37:37Z","receivedAt":"2020-03-26T04:38:01Z","isPatch":true,"sender":{"key":"congdanhqx@gmail.com","avatar":"https://avatars.githubusercontent.com/u/42673067?v=4"},"body":"POSIX's diff(1) requires output in normal diff format.\nHowever, busybox's diff's output is written in unified format.\n\nHP-UX's diff(1) doesn't understand \"-u\" as of now.\n\nWorkaround this problem by checking \"diff -u\" output,\nif we couldn't make anything from normal-diff format.\n\nSigned-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>\n---\n t/t4124-apply-ws-rule.sh | 6 ++++++\n 1 file changed, 6 insertions(+)\n\ndiff --git a/t/t4124-apply-ws-rule.sh b/t/t4124-apply-ws-rule.sh\nindex 971a5a7512..4a1bb141d9 100755\n--- a/t/t4124-apply-ws-rule.sh\n+++ b/t/t4124-apply-ws-rule.sh\n@@ -52,6 +52,12 @@ test_fix () {\n \n \t# find touched lines\n \t$DIFF file target | sed -n -e \"s/^> //p\" >fixed\n+\t# busybox's diff(1) doesn't output normal format\n+\tif ! test -s fixed; then\n+\t\t$DIFF -u file target |\n+\t\tgrep -v '^+++ target' |\n+\t\tsed -ne \"/^+/s/+//p\" >fixed\n+\tfi\n \n \t# the changed lines are all expected to change\n \tfixed_cnt=$(wc -l <fixed)\n-- \n2.26.0.rc2.357.g1e1ba0441d\n\n"},{"id":"394049","messageId":"b3acf4adcfdfd48f0728c5b05913d81b8ee6362f.1585197360.git.congdanhqx@gmail.com","threadId":"53053","inReplyTo":"cover.1585197360.git.congdanhqx@gmail.com","subject":"[PATCH v4 6/8] t7063: drop non-POSIX argument \"-ls\" from find(1)","fromName":"Đoàn Trần Công Danh","fromEmail":"congdanhqx@gmail.com","sentAt":"2020-03-26T04:37:36Z","receivedAt":"2020-03-26T04:38:02Z","isPatch":true,"sender":{"key":"congdanhqx@gmail.com","avatar":"https://avatars.githubusercontent.com/u/42673067?v=4"},"body":"Since commit 6b7728db81, (t7063: work around FreeBSD's lazy mtime\nupdate feature, 2016-08-03), we started to use ls as a trick to update\ndirectory's mtime.\n\nHowever, `-ls` flag isn't required by POSIX's find(1), and\nbusybox(1) doesn't implement it.\n\nUse \"-exec ls -ld {} +\" instead.\n\nSigned-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>\n---\n t/t7063-status-untracked-cache.sh | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/t/t7063-status-untracked-cache.sh b/t/t7063-status-untracked-cache.sh\nindex 190ae149cf..6738497ea7 100755\n--- a/t/t7063-status-untracked-cache.sh\n+++ b/t/t7063-status-untracked-cache.sh\n@@ -18,7 +18,7 @@ GIT_FORCE_UNTRACKED_CACHE=true\n export GIT_FORCE_UNTRACKED_CACHE\n \n sync_mtime () {\n-\tfind . -type d -ls >/dev/null\n+\tfind . -type d -exec ls -ld {} + >/dev/null\n }\n \n avoid_racy() {\n-- \n2.26.0.rc2.357.g1e1ba0441d\n\n"},{"id":"394050","messageId":"2b8e75aaa5b196fdd1ffca02ae53cc859fe1e522.1585197360.git.congdanhqx@gmail.com","threadId":"53053","inReplyTo":"cover.1585197360.git.congdanhqx@gmail.com","subject":"[PATCH v4 8/8] t5703: feed raw data into test-tool unpack-sideband","fromName":"Đoàn Trần Công Danh","fromEmail":"congdanhqx@gmail.com","sentAt":"2020-03-26T04:37:38Z","receivedAt":"2020-03-26T04:38:04Z","isPatch":true,"sender":{"key":"congdanhqx@gmail.com","avatar":"https://avatars.githubusercontent.com/u/42673067?v=4"},"body":"busybox's sed isn't binary clean.\nThus, triggers false-negative on this test.\n\nWe could replace sed with perl on this usecase.\nBut, we could slightly modify the helper to discard unwanted data in the\nbeginning.\n\nFix the false negative by updating this helper.\n\nHelped-by: Jeff King <peff@peff.net>\nSigned-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>\n---\n t/helper/test-pkt-line.c           | 2 +-\n t/t5703-upload-pack-ref-in-want.sh | 5 +----\n 2 files changed, 2 insertions(+), 5 deletions(-)\n\ndiff --git a/t/helper/test-pkt-line.c b/t/helper/test-pkt-line.c\nindex 282d536384..12ca698e17 100644\n--- a/t/helper/test-pkt-line.c\n+++ b/t/helper/test-pkt-line.c\n@@ -67,7 +67,7 @@ static void unpack_sideband(void)\n \t\tcase PACKET_READ_NORMAL:\n \t\t\tband = reader.line[0] & 0xff;\n \t\t\tif (band < 1 || band > 2)\n-\t\t\t\tdie(\"unexpected side band %d\", band);\n+\t\t\t\tcontinue; /* skip non-sideband packets */\n \t\t\tfd = band;\n \n \t\t\twrite_or_die(fd, reader.line + 1, reader.pktlen - 1);\ndiff --git a/t/t5703-upload-pack-ref-in-want.sh b/t/t5703-upload-pack-ref-in-want.sh\nindex 7fba3063bf..a34460f7d8 100755\n--- a/t/t5703-upload-pack-ref-in-want.sh\n+++ b/t/t5703-upload-pack-ref-in-want.sh\n@@ -13,10 +13,7 @@ get_actual_refs () {\n }\n \n get_actual_commits () {\n-\tsed -n -e '/packfile/,/0000/{\n-\t\t/packfile/d\n-\t\tp\n-\t\t}' <out | test-tool pkt-line unpack-sideband >o.pack &&\n+\ttest-tool pkt-line unpack-sideband <out >o.pack &&\n \tgit index-pack o.pack &&\n \tgit verify-pack -v o.idx >objs &&\n \tgrep commit objs | cut -d\" \" -f1 | sort >actual_commits\n-- \n2.26.0.rc2.357.g1e1ba0441d\n\n"},{"id":"394152","messageId":"xmqq7dz6ioit.fsf@gitster.c.googlers.com","threadId":"53053","inReplyTo":"02c115e93aa27bb0a8ebfb65a69d12b4cd26fc9b.1585197360.git.congdanhqx@gmail.com","subject":"Re: [PATCH v4 7/8] t4124: fix test for non-compliant diff(1)","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2020-03-27T01:18:18Z","receivedAt":"2020-03-27T01:18:27Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Đoàn Trần Công Danh  <congdanhqx@gmail.com> writes:\n\n> +\t# busybox's diff(1) doesn't output normal format\n> +\tif ! test -s fixed; then\n\nI've touched this line up and tweaked the log message while\napplying, as I didn't see anything else that is iffy and wanted to\nsave one round-trip.  Please see what's pushed out in perhaps a few\nhours (and please complain loudly if you don't like it), so that we\ncan merge it down to 'next' soonish.\n\nThanks.\n"}]}