{"thread":{"id":"36709","subject":"[PATCH] t6006-*.sh: Fix truncation tests","startedAt":"2014-05-20T13:54:20Z","lastAt":"2014-05-21T12:59:33Z","messageCount":11,"participants":["Ramsay Jones","Alexey Shumkin","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"242262","messageId":"537B5E8C.3070803@ramsay1.demon.co.uk","threadId":"36709","inReplyTo":null,"subject":"[PATCH] t6006-*.sh: Fix truncation tests","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsay1.demon.co.uk","sentAt":"2014-05-20T13:54:20Z","receivedAt":"2014-05-20T13:54:20Z","isPatch":true,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"\nSigned-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>\n---\n\nHi Alexey,\n\nIf you need to re-roll your 'as/pretty-truncate' branch, could\nyou please squash the relevant parts of this patch into the\ncorresponding patches of your patch series. (ie this is a patch\nagainst the head of the current pu branch ...).\n\nWithout this patch I get:\n\n  $ ./t6006-rev-list-format.sh\n  ok 1 - setup\n  ok 2 - format percent\n  ok 3 - format hash\n  ok 4 - format tree\n  ok 5 - format parents\n  ok 6 - format author\n  ok 7 - format committer\n  ok 8 - format encoding\n  ok 9 - format subject\n  ./t6006-rev-list-format.sh: 152: ./t6006-rev-list-format.sh: Syntax error: \"(\" unexpected\n  FATAL: Unexpected exit with code 2\n  $ \n\n(if you have bash as /bin/sh you get different but related errors).\nThe additional quoting suppresses the 'command redirection' errors, etc...\n\nThanks.\n\nATB\nRamsay Jones\n\n t/t6006-rev-list-format.sh | 14 +++++++-------\n 1 file changed, 7 insertions(+), 7 deletions(-)\n\ndiff --git a/t/t6006-rev-list-format.sh b/t/t6006-rev-list-format.sh\nindex 9bc089b..e1dec3e 100755\n--- a/t/t6006-rev-list-format.sh\n+++ b/t/t6006-rev-list-format.sh\n@@ -149,7 +149,7 @@ commit $head1\n $added\n EOF\n \n-test_format subject-truncated %<($truncate_count,trunc)%s <<EOF\n+test_format subject-truncated %\\<\\($truncate_count,trunc\\)%s <<EOF\n commit $head2\n changed (ge${changed_utf8_part}ndert)..\n commit $head1\n@@ -256,7 +256,7 @@ commit $head1\n $added_iso88591\n EOF\n \n-test_format complex-subject-trunc %<($truncate_count,trunc)%s <<EOF\n+test_format complex-subject-trunc %\\<\\($truncate_count,trunc\\)%s <<EOF\n commit $head3\n Test printing of c..\n commit $head2\n@@ -265,7 +265,7 @@ commit $head1\n added (hinzugef${added_utf8_part_iso88591}gt..\n EOF\n \n-test_format complex-subject-mtrunc %<($truncate_count,mtrunc)%s <<EOF\n+test_format complex-subject-mtrunc %\\<\\($truncate_count,mtrunc\\)%s <<EOF\n commit $head3\n Test prin..ex bodies\n commit $head2\n@@ -274,7 +274,7 @@ commit $head1\n added (hi..f${added_utf8_part_iso88591}gt) foo\n EOF\n \n-test_format complex-subject-ltrunc %<($truncate_count,ltrunc)%s <<EOF\n+test_format complex-subject-ltrunc %\\<\\($truncate_count,ltrunc\\)%s <<EOF\n commit $head3\n .. of complex bodies\n commit $head2\n@@ -311,7 +311,7 @@ commit $head1\n $added\n EOF\n \n-test_format complex-subject-commitencoding-unset-trunc %<($truncate_count,trunc)%s <<EOF\n+test_format complex-subject-commitencoding-unset-trunc %\\<\\($truncate_count,trunc\\)%s <<EOF\n commit $head3\n Test printing of c..\n commit $head2\n@@ -320,7 +320,7 @@ commit $head1\n added (hinzugef${added_utf8_part}gt..\n EOF\n \n-test_format complex-subject-commitencoding-unset-mtrunc %<($truncate_count,mtrunc)%s <<EOF\n+test_format complex-subject-commitencoding-unset-mtrunc %\\<\\($truncate_count,mtrunc\\)%s <<EOF\n commit $head3\n Test prin..ex bodies\n commit $head2\n@@ -329,7 +329,7 @@ commit $head1\n added (hi..f${added_utf8_part}gt) foo\n EOF\n \n-test_format complex-subject-commitencoding-unset-ltrunc %<($truncate_count,ltrunc)%s <<EOF\n+test_format complex-subject-commitencoding-unset-ltrunc %\\<\\($truncate_count,ltrunc\\)%s <<EOF\n commit $head3\n .. of complex bodies\n commit $head2\n-- \n1.9.0\n"},{"id":"242265","messageId":"20140520141936.GA30187@ashu.dyn1.rarus.ru","threadId":"36709","inReplyTo":"537B5E8C.3070803@ramsay1.demon.co.uk","subject":"Re: [PATCH] t6006-*.sh: Fix truncation tests","fromName":"Alexey Shumkin","fromEmail":"alex.crezoff@gmail.com","sentAt":"2014-05-20T14:19:36Z","receivedAt":"2014-05-20T14:19:36Z","isPatch":true,"sender":{"key":"alex.crezoff@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1183752?v=4"},"body":"On Tue, May 20, 2014 at 02:54:20PM +0100, Ramsay Jones wrote:\n> \n> Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>\n> ---\n> \n> Hi Alexey,\n> \n> If you need to re-roll your 'as/pretty-truncate' branch, could\n> you please squash the relevant parts of this patch into the\n> corresponding patches of your patch series. (ie this is a patch\n> against the head of the current pu branch ...).\n> \n> Without this patch I get:\n> \n>   $ ./t6006-rev-list-format.sh\n>   ok 1 - setup\n>   ok 2 - format percent\n>   ok 3 - format hash\n>   ok 4 - format tree\n>   ok 5 - format parents\n>   ok 6 - format author\n>   ok 7 - format committer\n>   ok 8 - format encoding\n>   ok 9 - format subject\n>   ./t6006-rev-list-format.sh: 152: ./t6006-rev-list-format.sh: Syntax error: \"(\" unexpected\n>   FATAL: Unexpected exit with code 2\n>   $ \nOoops, my fault.\n> \n> (if you have bash as /bin/sh you get different but related errors).\n> The additional quoting suppresses the 'command redirection' errors, etc...\nIt's strange but I do have Bash as /bin/sh and unfortunately I have no\nthis error\n\nAFAIU, Junio already applied my patches (existance of a branch\nas/pretty-truncate tells us that). So, we can only send other patches that\nfix errors brought with former patches.\nYou can send, too.\n> \n> Thanks.\n> \n> ATB\n> Ramsay Jones\n> \n>  t/t6006-rev-list-format.sh | 14 +++++++-------\n>  1 file changed, 7 insertions(+), 7 deletions(-)\n> \n> diff --git a/t/t6006-rev-list-format.sh b/t/t6006-rev-list-format.sh\n> index 9bc089b..e1dec3e 100755\n> --- a/t/t6006-rev-list-format.sh\n> +++ b/t/t6006-rev-list-format.sh\n> @@ -149,7 +149,7 @@ commit $head1\n>  $added\n>  EOF\n>  \n> -test_format subject-truncated %<($truncate_count,trunc)%s <<EOF\n> +test_format subject-truncated %\\<\\($truncate_count,trunc\\)%s <<EOF\n>  commit $head2\n>  changed (ge${changed_utf8_part}ndert)..\n>  commit $head1\n> @@ -256,7 +256,7 @@ commit $head1\n>  $added_iso88591\n>  EOF\n>  \n> -test_format complex-subject-trunc %<($truncate_count,trunc)%s <<EOF\n> +test_format complex-subject-trunc %\\<\\($truncate_count,trunc\\)%s <<EOF\n>  commit $head3\n>  Test printing of c..\n>  commit $head2\n> @@ -265,7 +265,7 @@ commit $head1\n>  added (hinzugef${added_utf8_part_iso88591}gt..\n>  EOF\n>  \n> -test_format complex-subject-mtrunc %<($truncate_count,mtrunc)%s <<EOF\n> +test_format complex-subject-mtrunc %\\<\\($truncate_count,mtrunc\\)%s <<EOF\n>  commit $head3\n>  Test prin..ex bodies\n>  commit $head2\n> @@ -274,7 +274,7 @@ commit $head1\n>  added (hi..f${added_utf8_part_iso88591}gt) foo\n>  EOF\n>  \n> -test_format complex-subject-ltrunc %<($truncate_count,ltrunc)%s <<EOF\n> +test_format complex-subject-ltrunc %\\<\\($truncate_count,ltrunc\\)%s <<EOF\n>  commit $head3\n>  .. of complex bodies\n>  commit $head2\n> @@ -311,7 +311,7 @@ commit $head1\n>  $added\n>  EOF\n>  \n> -test_format complex-subject-commitencoding-unset-trunc %<($truncate_count,trunc)%s <<EOF\n> +test_format complex-subject-commitencoding-unset-trunc %\\<\\($truncate_count,trunc\\)%s <<EOF\n>  commit $head3\n>  Test printing of c..\n>  commit $head2\n> @@ -320,7 +320,7 @@ commit $head1\n>  added (hinzugef${added_utf8_part}gt..\n>  EOF\n>  \n> -test_format complex-subject-commitencoding-unset-mtrunc %<($truncate_count,mtrunc)%s <<EOF\n> +test_format complex-subject-commitencoding-unset-mtrunc %\\<\\($truncate_count,mtrunc\\)%s <<EOF\n>  commit $head3\n>  Test prin..ex bodies\n>  commit $head2\n> @@ -329,7 +329,7 @@ commit $head1\n>  added (hi..f${added_utf8_part}gt) foo\n>  EOF\n>  \n> -test_format complex-subject-commitencoding-unset-ltrunc %<($truncate_count,ltrunc)%s <<EOF\n> +test_format complex-subject-commitencoding-unset-ltrunc %\\<\\($truncate_count,ltrunc\\)%s <<EOF\n>  commit $head3\n>  .. of complex bodies\n>  commit $head2\n> -- \n> 1.9.0\n\n-- \nAlexey Shumkin\nE-mail: Alex.Crezoff@gmail.com\nICQ: 118001447\nJabber (GoogleTalk): Alex.Crezoff@gmail.com\nSkype: crezoff\n"},{"id":"242266","messageId":"20140520143401.GA31750@ashu.dyn1.rarus.ru","threadId":"36709","inReplyTo":"20140520141936.GA30187@ashu.dyn1.rarus.ru","subject":"Re: [PATCH] t6006-*.sh: Fix truncation tests","fromName":"Alexey Shumkin","fromEmail":"alex.crezoff@gmail.com","sentAt":"2014-05-20T14:34:01Z","receivedAt":"2014-05-20T14:34:01Z","isPatch":true,"sender":{"key":"alex.crezoff@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1183752?v=4"},"body":"On Tue, May 20, 2014 at 06:19:36PM +0400, Alexey Shumkin wrote:\n> On Tue, May 20, 2014 at 02:54:20PM +0100, Ramsay Jones wrote:\n> > \n> > Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>\n> > ---\n> > \n> > Hi Alexey,\n> > \n> > If you need to re-roll your 'as/pretty-truncate' branch, could\n> > you please squash the relevant parts of this patch into the\n> > corresponding patches of your patch series. (ie this is a patch\n> > against the head of the current pu branch ...).\n> > \n> > Without this patch I get:\n> > \n> >   $ ./t6006-rev-list-format.sh\n> >   ok 1 - setup\n> >   ok 2 - format percent\n> >   ok 3 - format hash\n> >   ok 4 - format tree\n> >   ok 5 - format parents\n> >   ok 6 - format author\n> >   ok 7 - format committer\n> >   ok 8 - format encoding\n> >   ok 9 - format subject\n> >   ./t6006-rev-list-format.sh: 152: ./t6006-rev-list-format.sh: Syntax error: \"(\" unexpected\n> >   FATAL: Unexpected exit with code 2\n> >   $ \n> Ooops, my fault.\n> > \n> > (if you have bash as /bin/sh you get different but related errors).\n> > The additional quoting suppresses the 'command redirection' errors, etc...\n> It's strange but I do have Bash as /bin/sh and unfortunately I have no\n> this error\n> \n> AFAIU, Junio already applied my patches (existance of a branch\n> as/pretty-truncate tells us that). So, we can only send other patches that\n> fix errors brought with former patches.\n> You can send, too.\n> > \n> > Thanks.\n> > \n> > ATB\n> > Ramsay Jones\n> > \n> >  t/t6006-rev-list-format.sh | 14 +++++++-------\n> >  1 file changed, 7 insertions(+), 7 deletions(-)\n> > \n> > diff --git a/t/t6006-rev-list-format.sh b/t/t6006-rev-list-format.sh\n> > index 9bc089b..e1dec3e 100755\n> > --- a/t/t6006-rev-list-format.sh\n> > +++ b/t/t6006-rev-list-format.sh\n> > @@ -149,7 +149,7 @@ commit $head1\n> >  $added\n> >  EOF\n> >  \n> > -test_format subject-truncated %<($truncate_count,trunc)%s <<EOF\n> > +test_format subject-truncated %\\<\\($truncate_count,trunc\\)%s <<EOF\nBTW, I would quoted that values rather than escaped\n"},{"id":"242269","messageId":"7a4473fce2948c31f561c6002ab0b1d5ab0ee841.1400597264.git.Alex.Crezoff@gmail.com","threadId":"36709","inReplyTo":"537B5E8C.3070803@ramsay1.demon.co.uk","subject":"[PATCH] t6006 (rev-list-format): quote format strings to avoid error on some shells","fromName":"Alexey Shumkin","fromEmail":"alex.crezoff@gmail.com","sentAt":"2014-05-20T14:48:43Z","receivedAt":"2014-05-20T14:48:43Z","isPatch":true,"sender":{"key":"alex.crezoff@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1183752?v=4"},"body":"Added in 0a144b3 (t4205, t6006: add failing tests for the case when\ni18n.logOutputEncoding is set, 2014-05-19) tests give no error\n(somehow) with Bash as /bin/sh but fail for some other shells.\n\nQuote format strings to avoid errors.\n\nSigned-off-by: Alexey Shumkin <Alex.Crezoff@gmail.com>\nSuggested-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>\n---\n t/t6006-rev-list-format.sh | 14 +++++++-------\n 1 file changed, 7 insertions(+), 7 deletions(-)\n\ndiff --git a/t/t6006-rev-list-format.sh b/t/t6006-rev-list-format.sh\nindex c6e9a73..19434ad 100755\n--- a/t/t6006-rev-list-format.sh\n+++ b/t/t6006-rev-list-format.sh\n@@ -149,7 +149,7 @@ commit $head1\n $added\n EOF\n \n-test_format subject-truncated %<($truncate_count,trunc)%s <<EOF\n+test_format subject-truncated \"%<($truncate_count,trunc)%s\" <<EOF\n commit $head2\n changed (ge${changed_utf8_part}ndert)..\n commit $head1\n@@ -259,7 +259,7 @@ commit $head1\n $added_iso88591\n EOF\n \n-test_format complex-subject-trunc %<($truncate_count,trunc)%s <<EOF\n+test_format complex-subject-trunc \"%<($truncate_count,trunc)%s\" <<EOF\n commit $head3\n Test printing of c..\n commit $head2\n@@ -268,7 +268,7 @@ commit $head1\n added (hinzugef${added_utf8_part_iso88591}gt..\n EOF\n \n-test_format complex-subject-mtrunc %<($truncate_count,mtrunc)%s <<EOF\n+test_format complex-subject-mtrunc \"%<($truncate_count,mtrunc)%s\" <<EOF\n commit $head3\n Test prin..ex bodies\n commit $head2\n@@ -277,7 +277,7 @@ commit $head1\n added (hi..f${added_utf8_part_iso88591}gt) foo\n EOF\n \n-test_format complex-subject-ltrunc %<($truncate_count,ltrunc)%s <<EOF\n+test_format complex-subject-ltrunc \"%<($truncate_count,ltrunc)%s\" <<EOF\n commit $head3\n .. of complex bodies\n commit $head2\n@@ -314,7 +314,7 @@ commit $head1\n $added\n EOF\n \n-test_format complex-subject-commitencoding-unset-trunc %<($truncate_count,trunc)%s <<EOF\n+test_format complex-subject-commitencoding-unset-trunc \"%<($truncate_count,trunc)%s\" <<EOF\n commit $head3\n Test printing of c..\n commit $head2\n@@ -323,7 +323,7 @@ commit $head1\n added (hinzugef${added_utf8_part}gt..\n EOF\n \n-test_format complex-subject-commitencoding-unset-mtrunc %<($truncate_count,mtrunc)%s <<EOF\n+test_format complex-subject-commitencoding-unset-mtrunc \"%<($truncate_count,mtrunc)%s\" <<EOF\n commit $head3\n Test prin..ex bodies\n commit $head2\n@@ -332,7 +332,7 @@ commit $head1\n added (hi..f${added_utf8_part}gt) foo\n EOF\n \n-test_format complex-subject-commitencoding-unset-ltrunc %<($truncate_count,ltrunc)%s <<EOF\n+test_format complex-subject-commitencoding-unset-ltrunc \"%<($truncate_count,ltrunc)%s\" <<EOF\n commit $head3\n .. of complex bodies\n commit $head2\n-- \n1.9.2-17\n"},{"id":"242271","messageId":"537B6E42.8040308@ramsay1.demon.co.uk","threadId":"36709","inReplyTo":"20140520141936.GA30187@ashu.dyn1.rarus.ru","subject":"Re: [PATCH] t6006-*.sh: Fix truncation tests","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsay1.demon.co.uk","sentAt":"2014-05-20T15:01:22Z","receivedAt":"2014-05-20T15:01:22Z","isPatch":true,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"On 20/05/14 15:19, Alexey Shumkin wrote:\n> On Tue, May 20, 2014 at 02:54:20PM +0100, Ramsay Jones wrote:\n>>\n>> Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>\n>> ---\n>>\n>> Hi Alexey,\n>>\n>> If you need to re-roll your 'as/pretty-truncate' branch, could\n>> you please squash the relevant parts of this patch into the\n>> corresponding patches of your patch series. (ie this is a patch\n>> against the head of the current pu branch ...).\n>>\n>> Without this patch I get:\n>>\n>>   $ ./t6006-rev-list-format.sh\n>>   ok 1 - setup\n>>   ok 2 - format percent\n>>   ok 3 - format hash\n>>   ok 4 - format tree\n>>   ok 5 - format parents\n>>   ok 6 - format author\n>>   ok 7 - format committer\n>>   ok 8 - format encoding\n>>   ok 9 - format subject\n>>   ./t6006-rev-list-format.sh: 152: ./t6006-rev-list-format.sh: Syntax error: \"(\" unexpected\n>>   FATAL: Unexpected exit with code 2\n>>   $ \n> Ooops, my fault.\n>>\n>> (if you have bash as /bin/sh you get different but related errors).\n>> The additional quoting suppresses the 'command redirection' errors, etc...\n> It's strange but I do have Bash as /bin/sh and unfortunately I have no\n> this error\n\nHmm, I see this:\n\n  $ bash t6006-rev-list-format.sh -i\n  ok 1 - setup\n  ok 2 - format percent\n  ok 3 - format hash\n  ok 4 - format tree\n  ok 5 - format parents\n  ok 6 - format author\n  ok 7 - format committer\n  ok 8 - format encoding\n  ok 9 - format subject\n  t6006-rev-list-format.sh: line 152: 20,trunc: command not found\n  not ok 10 - format subject-truncated\n  #\t\n  #\t\t\tgit rev-list --pretty=format:'%/dev/fd/63%s' master >output.subject-truncated &&\n  #\t\t\ttest_cmp expect.subject-truncated output.subject-truncated\n  #\t\t\n  $ \n\n(Since I'm on Linux Mint, my /bin/sh is dash, which produces the output in my previous mail).\n\nATB,\nRamsay Jones\n"},{"id":"242272","messageId":"537B6EAB.2070301@ramsay1.demon.co.uk","threadId":"36709","inReplyTo":"7a4473fce2948c31f561c6002ab0b1d5ab0ee841.1400597264.git.Alex.Crezoff@gmail.com","subject":"Re: [PATCH] t6006 (rev-list-format): quote format strings to avoid error on some shells","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsay1.demon.co.uk","sentAt":"2014-05-20T15:03:07Z","receivedAt":"2014-05-20T15:03:07Z","isPatch":true,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"On 20/05/14 15:48, Alexey Shumkin wrote:\n> Added in 0a144b3 (t4205, t6006: add failing tests for the case when\n> i18n.logOutputEncoding is set, 2014-05-19) tests give no error\n> (somehow) with Bash as /bin/sh but fail for some other shells.\n> \n> Quote format strings to avoid errors.\n> \n> Signed-off-by: Alexey Shumkin <Alex.Crezoff@gmail.com>\n> Suggested-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>\n> ---\n>  t/t6006-rev-list-format.sh | 14 +++++++-------\n>  1 file changed, 7 insertions(+), 7 deletions(-)\n> \n> diff --git a/t/t6006-rev-list-format.sh b/t/t6006-rev-list-format.sh\n> index c6e9a73..19434ad 100755\n> --- a/t/t6006-rev-list-format.sh\n> +++ b/t/t6006-rev-list-format.sh\n> @@ -149,7 +149,7 @@ commit $head1\n>  $added\n>  EOF\n>  \n> -test_format subject-truncated %<($truncate_count,trunc)%s <<EOF\n> +test_format subject-truncated \"%<($truncate_count,trunc)%s\" <<EOF\n>  commit $head2\n>  changed (ge${changed_utf8_part}ndert)..\n>  commit $head1\n> @@ -259,7 +259,7 @@ commit $head1\n>  $added_iso88591\n>  EOF\n>  \n> -test_format complex-subject-trunc %<($truncate_count,trunc)%s <<EOF\n> +test_format complex-subject-trunc \"%<($truncate_count,trunc)%s\" <<EOF\n>  commit $head3\n>  Test printing of c..\n>  commit $head2\n> @@ -268,7 +268,7 @@ commit $head1\n>  added (hinzugef${added_utf8_part_iso88591}gt..\n>  EOF\n>  \n> -test_format complex-subject-mtrunc %<($truncate_count,mtrunc)%s <<EOF\n> +test_format complex-subject-mtrunc \"%<($truncate_count,mtrunc)%s\" <<EOF\n>  commit $head3\n>  Test prin..ex bodies\n>  commit $head2\n> @@ -277,7 +277,7 @@ commit $head1\n>  added (hi..f${added_utf8_part_iso88591}gt) foo\n>  EOF\n>  \n> -test_format complex-subject-ltrunc %<($truncate_count,ltrunc)%s <<EOF\n> +test_format complex-subject-ltrunc \"%<($truncate_count,ltrunc)%s\" <<EOF\n>  commit $head3\n>  .. of complex bodies\n>  commit $head2\n> @@ -314,7 +314,7 @@ commit $head1\n>  $added\n>  EOF\n>  \n> -test_format complex-subject-commitencoding-unset-trunc %<($truncate_count,trunc)%s <<EOF\n> +test_format complex-subject-commitencoding-unset-trunc \"%<($truncate_count,trunc)%s\" <<EOF\n>  commit $head3\n>  Test printing of c..\n>  commit $head2\n> @@ -323,7 +323,7 @@ commit $head1\n>  added (hinzugef${added_utf8_part}gt..\n>  EOF\n>  \n> -test_format complex-subject-commitencoding-unset-mtrunc %<($truncate_count,mtrunc)%s <<EOF\n> +test_format complex-subject-commitencoding-unset-mtrunc \"%<($truncate_count,mtrunc)%s\" <<EOF\n>  commit $head3\n>  Test prin..ex bodies\n>  commit $head2\n> @@ -332,7 +332,7 @@ commit $head1\n>  added (hi..f${added_utf8_part}gt) foo\n>  EOF\n>  \n> -test_format complex-subject-commitencoding-unset-ltrunc %<($truncate_count,ltrunc)%s <<EOF\n> +test_format complex-subject-commitencoding-unset-ltrunc \"%<($truncate_count,ltrunc)%s\" <<EOF\n>  commit $head3\n>  .. of complex bodies\n>  commit $head2\n> \n\nYep, actually using string quotes works just as well! :-P\n\nThanks!\n\nATB,\nRamsay Jones\n"},{"id":"242277","messageId":"20140520160213.GA2947@ashu.dyn1.rarus.ru","threadId":"36709","inReplyTo":"537B6E42.8040308@ramsay1.demon.co.uk","subject":"Re: [PATCH] t6006-*.sh: Fix truncation tests","fromName":"Alexey Shumkin","fromEmail":"alex.crezoff@gmail.com","sentAt":"2014-05-20T16:02:13Z","receivedAt":"2014-05-20T16:02:13Z","isPatch":true,"sender":{"key":"alex.crezoff@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1183752?v=4"},"body":"On Tue, May 20, 2014 at 04:01:22PM +0100, Ramsay Jones wrote:\n> On 20/05/14 15:19, Alexey Shumkin wrote:\n> > On Tue, May 20, 2014 at 02:54:20PM +0100, Ramsay Jones wrote:\n> >>\n> >> Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>\n> >> ---\n> >>\n> >> Hi Alexey,\n> >>\n> >> If you need to re-roll your 'as/pretty-truncate' branch, could\n> >> you please squash the relevant parts of this patch into the\n> >> corresponding patches of your patch series. (ie this is a patch\n> >> against the head of the current pu branch ...).\n> >>\n> >> Without this patch I get:\n> >>\n> >>   $ ./t6006-rev-list-format.sh\n> >>   ok 1 - setup\n> >>   ok 2 - format percent\n> >>   ok 3 - format hash\n> >>   ok 4 - format tree\n> >>   ok 5 - format parents\n> >>   ok 6 - format author\n> >>   ok 7 - format committer\n> >>   ok 8 - format encoding\n> >>   ok 9 - format subject\n> >>   ./t6006-rev-list-format.sh: 152: ./t6006-rev-list-format.sh: Syntax error: \"(\" unexpected\n> >>   FATAL: Unexpected exit with code 2\n> >>   $ \n> > Ooops, my fault.\n> >>\n> >> (if you have bash as /bin/sh you get different but related errors).\n> >> The additional quoting suppresses the 'command redirection' errors, etc...\n> > It's strange but I do have Bash as /bin/sh and unfortunately I have no\n> > this error\n> \n> Hmm, I see this:\n> \n>   $ bash t6006-rev-list-format.sh -i\nAFAIK, this is not \"running Bash as /bin/sh\" :)\nMaybe I'm wrong but Bash as /bin/sh is:\n  $ ls -l /bin/sh\n  lrwxrwxrwx 1 root root 4 May 12 18:35 /bin/sh -> bash\n\nBut it does not matter here much, you've noticed my foolish mistake :)\n>   ok 1 - setup\n>   ok 2 - format percent\n>   ok 3 - format hash\n>   ok 4 - format tree\n>   ok 5 - format parents\n>   ok 6 - format author\n>   ok 7 - format committer\n>   ok 8 - format encoding\n>   ok 9 - format subject\n>   t6006-rev-list-format.sh: line 152: 20,trunc: command not found\n>   not ok 10 - format subject-truncated\n>   #\t\n>   #\t\t\tgit rev-list --pretty=format:'%/dev/fd/63%s' master >output.subject-truncated &&\n>   #\t\t\ttest_cmp expect.subject-truncated output.subject-truncated\n>   #\t\t\n>   $ \n> \n> (Since I'm on Linux Mint, my /bin/sh is dash, which produces the output in my previous mail).\n> \n> ATB,\n> Ramsay Jones\n> \n> \n> \n"},{"id":"242279","messageId":"537B8633.602@ramsay1.demon.co.uk","threadId":"36709","inReplyTo":"20140520160213.GA2947@ashu.dyn1.rarus.ru","subject":"Re: [PATCH] t6006-*.sh: Fix truncation tests","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsay1.demon.co.uk","sentAt":"2014-05-20T16:43:31Z","receivedAt":"2014-05-20T16:43:31Z","isPatch":true,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"On 20/05/14 17:02, Alexey Shumkin wrote:\n> On Tue, May 20, 2014 at 04:01:22PM +0100, Ramsay Jones wrote:\n>> On 20/05/14 15:19, Alexey Shumkin wrote:\n>>> On Tue, May 20, 2014 at 02:54:20PM +0100, Ramsay Jones wrote:\n>>>>\n>>>> Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>\n>>>> ---\n>>>>\n>>>> Hi Alexey,\n>>>>\n>>>> If you need to re-roll your 'as/pretty-truncate' branch, could\n>>>> you please squash the relevant parts of this patch into the\n>>>> corresponding patches of your patch series. (ie this is a patch\n>>>> against the head of the current pu branch ...).\n>>>>\n>>>> Without this patch I get:\n>>>>\n>>>>   $ ./t6006-rev-list-format.sh\n>>>>   ok 1 - setup\n>>>>   ok 2 - format percent\n>>>>   ok 3 - format hash\n>>>>   ok 4 - format tree\n>>>>   ok 5 - format parents\n>>>>   ok 6 - format author\n>>>>   ok 7 - format committer\n>>>>   ok 8 - format encoding\n>>>>   ok 9 - format subject\n>>>>   ./t6006-rev-list-format.sh: 152: ./t6006-rev-list-format.sh: Syntax error: \"(\" unexpected\n>>>>   FATAL: Unexpected exit with code 2\n>>>>   $ \n>>> Ooops, my fault.\n>>>>\n>>>> (if you have bash as /bin/sh you get different but related errors).\n>>>> The additional quoting suppresses the 'command redirection' errors, etc...\n>>> It's strange but I do have Bash as /bin/sh and unfortunately I have no\n>>> this error\n>>\n>> Hmm, I see this:\n>>\n>>   $ bash t6006-rev-list-format.sh -i\n> AFAIK, this is not \"running Bash as /bin/sh\" :)\n> Maybe I'm wrong but Bash as /bin/sh is:\n>   $ ls -l /bin/sh\n>   lrwxrwxrwx 1 root root 4 May 12 18:35 /bin/sh -> bash\n\nAh yes, I keep forgetting that bash behaves differently when invoked as 'sh'.\n(i.e. it enters 'posix mode' in this case).\n\nIndeed, this is (roughly) equivalent to:\n\n  $ bash --posix t6006-rev-list-format.sh\n  ok 1 - setup\n  ok 2 - format percent\n  ok 3 - format hash\n  ...\n  ok 52 - oneline with empty message\n  ok 53 - single-character name is parsed correctly\n  # passed all 53 test(s)\n  1..53\n  $ \n\n... which works.\n\nThanks again.\n\nATB\nRamsay Jones\n"},{"id":"242286","messageId":"xmqqr43o1ill.fsf@gitster.dls.corp.google.com","threadId":"36709","inReplyTo":"20140520141936.GA30187@ashu.dyn1.rarus.ru","subject":"Re: [PATCH] t6006-*.sh: Fix truncation tests","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2014-05-20T17:10:46Z","receivedAt":"2014-05-20T17:10:46Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Alexey Shumkin <alex.crezoff@gmail.com> writes:\n\n> AFAIU, Junio already applied my patches (existance of a branch\n> as/pretty-truncate tells us that). So, we can only send other patches that\n> fix errors brought with former patches.\n\nNo, NO, NOOOOO....\n\nThe existence of a branch merely means that I saw the patches, and\nthat I thought that the series was not completely useless.  In other\nwords, it indicates that I wanted to make sure that I won't forget\nabout the topic, and it was worth my time to create the branch and\napply there for that purpose.\n\nPlease do not read anything more than that.  Presense of a topic\nbranch by itself does not say that I _read_ the patches or I thought\nthey did not need reroll.\n\nWhen such a branch is merged to 'next', that means I read the\npatches myself, or I saw somebody whose judgement I and others in\nthe community trust read them and gave a positive response or an\nAck, and that I decided that the topic is in a good enough shape to\nbe worked on further with incremental updates.\n\nYou are talking about the latter state, but as/pretty-truncate is in\nthe former state.\n"},{"id":"242354","messageId":"20140521041100.GA10495@dell-note","threadId":"36709","inReplyTo":"xmqqr43o1ill.fsf@gitster.dls.corp.google.com","subject":"Re: [PATCH] t6006-*.sh: Fix truncation tests","fromName":"Alexey Shumkin","fromEmail":"alex.crezoff@gmail.com","sentAt":"2014-05-21T04:11:00Z","receivedAt":"2014-05-21T04:11:00Z","isPatch":true,"sender":{"key":"alex.crezoff@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1183752?v=4"},"body":"On Tue, May 20, 2014 at 10:10:46AM -0700, Junio C Hamano wrote:\n> Alexey Shumkin <alex.crezoff@gmail.com> writes:\n> \n> > AFAIU, Junio already applied my patches (existance of a branch\n> > as/pretty-truncate tells us that). So, we can only send other patches that\n> > fix errors brought with former patches.\n> \n> No, NO, NOOOOO....\n> \n> The existence of a branch merely means that I saw the patches, and\n> that I thought that the series was not completely useless.  In other\n> words, it indicates that I wanted to make sure that I won't forget\n> about the topic, and it was worth my time to create the branch and\n> apply there for that purpose.\nOh, I got it!\nI'll fix my typo (ISO8895-1 vs ISO8859-1) and quotes issue then.\nAnd will reroll patches.\n\nThanks!\n> \n> Please do not read anything more than that.  Presense of a topic\n> branch by itself does not say that I _read_ the patches or I thought\n> they did not need reroll.\n> \n> When such a branch is merged to 'next', that means I read the\n> patches myself, or I saw somebody whose judgement I and others in\n> the community trust read them and gave a positive response or an\n> Ack, and that I decided that the topic is in a good enough shape to\n> be worked on further with incremental updates.\n> \n> You are talking about the latter state, but as/pretty-truncate is in\n> the former state.\n"},{"id":"242374","messageId":"20140521125933.GA4544@dell-note","threadId":"36709","inReplyTo":"7a4473fce2948c31f561c6002ab0b1d5ab0ee841.1400597264.git.Alex.Crezoff@gmail.com","subject":"Re: [PATCH] t6006 (rev-list-format): quote format strings to avoid error on some shells","fromName":"Alexey Shumkin","fromEmail":"alex.crezoff@gmail.com","sentAt":"2014-05-21T12:59:33Z","receivedAt":"2014-05-21T12:59:33Z","isPatch":true,"sender":{"key":"alex.crezoff@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1183752?v=4"},"body":"This patch is redundant then.\nIt will be squashed into next patch series.\n\nOn Tue, May 20, 2014 at 06:48:43PM +0400, Alexey Shumkin wrote:\n> Added in 0a144b3 (t4205, t6006: add failing tests for the case when\n> i18n.logOutputEncoding is set, 2014-05-19) tests give no error\n> (somehow) with Bash as /bin/sh but fail for some other shells.\n> \n> Quote format strings to avoid errors.\n> \n> Signed-off-by: Alexey Shumkin <Alex.Crezoff@gmail.com>\n> Suggested-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>\n> ---\n>  t/t6006-rev-list-format.sh | 14 +++++++-------\n>  1 file changed, 7 insertions(+), 7 deletions(-)\n> \n> diff --git a/t/t6006-rev-list-format.sh b/t/t6006-rev-list-format.sh\n> index c6e9a73..19434ad 100755\n> --- a/t/t6006-rev-list-format.sh\n> +++ b/t/t6006-rev-list-format.sh\n> @@ -149,7 +149,7 @@ commit $head1\n>  $added\n>  EOF\n>  \n> -test_format subject-truncated %<($truncate_count,trunc)%s <<EOF\n> +test_format subject-truncated \"%<($truncate_count,trunc)%s\" <<EOF\n>  commit $head2\n>  changed (ge${changed_utf8_part}ndert)..\n>  commit $head1\n> @@ -259,7 +259,7 @@ commit $head1\n>  $added_iso88591\n>  EOF\n>  \n> -test_format complex-subject-trunc %<($truncate_count,trunc)%s <<EOF\n> +test_format complex-subject-trunc \"%<($truncate_count,trunc)%s\" <<EOF\n>  commit $head3\n>  Test printing of c..\n>  commit $head2\n> @@ -268,7 +268,7 @@ commit $head1\n>  added (hinzugef${added_utf8_part_iso88591}gt..\n>  EOF\n>  \n> -test_format complex-subject-mtrunc %<($truncate_count,mtrunc)%s <<EOF\n> +test_format complex-subject-mtrunc \"%<($truncate_count,mtrunc)%s\" <<EOF\n>  commit $head3\n>  Test prin..ex bodies\n>  commit $head2\n> @@ -277,7 +277,7 @@ commit $head1\n>  added (hi..f${added_utf8_part_iso88591}gt) foo\n>  EOF\n>  \n> -test_format complex-subject-ltrunc %<($truncate_count,ltrunc)%s <<EOF\n> +test_format complex-subject-ltrunc \"%<($truncate_count,ltrunc)%s\" <<EOF\n>  commit $head3\n>  .. of complex bodies\n>  commit $head2\n> @@ -314,7 +314,7 @@ commit $head1\n>  $added\n>  EOF\n>  \n> -test_format complex-subject-commitencoding-unset-trunc %<($truncate_count,trunc)%s <<EOF\n> +test_format complex-subject-commitencoding-unset-trunc \"%<($truncate_count,trunc)%s\" <<EOF\n>  commit $head3\n>  Test printing of c..\n>  commit $head2\n> @@ -323,7 +323,7 @@ commit $head1\n>  added (hinzugef${added_utf8_part}gt..\n>  EOF\n>  \n> -test_format complex-subject-commitencoding-unset-mtrunc %<($truncate_count,mtrunc)%s <<EOF\n> +test_format complex-subject-commitencoding-unset-mtrunc \"%<($truncate_count,mtrunc)%s\" <<EOF\n>  commit $head3\n>  Test prin..ex bodies\n>  commit $head2\n> @@ -332,7 +332,7 @@ commit $head1\n>  added (hi..f${added_utf8_part}gt) foo\n>  EOF\n>  \n> -test_format complex-subject-commitencoding-unset-ltrunc %<($truncate_count,ltrunc)%s <<EOF\n> +test_format complex-subject-commitencoding-unset-ltrunc \"%<($truncate_count,ltrunc)%s\" <<EOF\n>  commit $head3\n>  .. of complex bodies\n>  commit $head2\n"}]}