* [PATCH] t6006-*.sh: Fix truncation tests
@ 2014-05-20 13:54 Ramsay Jones
2014-05-20 14:19 ` Alexey Shumkin
2014-05-20 14:48 ` [PATCH] t6006 (rev-list-format): quote format strings to avoid error on some shells Alexey Shumkin
0 siblings, 2 replies; 11+ messages in thread
From: Ramsay Jones @ 2014-05-20 13:54 UTC (permalink / raw)
To: Alex.Crezoff; +Cc: Junio C Hamano, GIT Mailing-list
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
---
Hi Alexey,
If you need to re-roll your 'as/pretty-truncate' branch, could
you please squash the relevant parts of this patch into the
corresponding patches of your patch series. (ie this is a patch
against the head of the current pu branch ...).
Without this patch I get:
$ ./t6006-rev-list-format.sh
ok 1 - setup
ok 2 - format percent
ok 3 - format hash
ok 4 - format tree
ok 5 - format parents
ok 6 - format author
ok 7 - format committer
ok 8 - format encoding
ok 9 - format subject
./t6006-rev-list-format.sh: 152: ./t6006-rev-list-format.sh: Syntax error: "(" unexpected
FATAL: Unexpected exit with code 2
$
(if you have bash as /bin/sh you get different but related errors).
The additional quoting suppresses the 'command redirection' errors, etc...
Thanks.
ATB
Ramsay Jones
t/t6006-rev-list-format.sh | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/t/t6006-rev-list-format.sh b/t/t6006-rev-list-format.sh
index 9bc089b..e1dec3e 100755
--- a/t/t6006-rev-list-format.sh
+++ b/t/t6006-rev-list-format.sh
@@ -149,7 +149,7 @@ commit $head1
$added
EOF
-test_format subject-truncated %<($truncate_count,trunc)%s <<EOF
+test_format subject-truncated %\<\($truncate_count,trunc\)%s <<EOF
commit $head2
changed (ge${changed_utf8_part}ndert)..
commit $head1
@@ -256,7 +256,7 @@ commit $head1
$added_iso88591
EOF
-test_format complex-subject-trunc %<($truncate_count,trunc)%s <<EOF
+test_format complex-subject-trunc %\<\($truncate_count,trunc\)%s <<EOF
commit $head3
Test printing of c..
commit $head2
@@ -265,7 +265,7 @@ commit $head1
added (hinzugef${added_utf8_part_iso88591}gt..
EOF
-test_format complex-subject-mtrunc %<($truncate_count,mtrunc)%s <<EOF
+test_format complex-subject-mtrunc %\<\($truncate_count,mtrunc\)%s <<EOF
commit $head3
Test prin..ex bodies
commit $head2
@@ -274,7 +274,7 @@ commit $head1
added (hi..f${added_utf8_part_iso88591}gt) foo
EOF
-test_format complex-subject-ltrunc %<($truncate_count,ltrunc)%s <<EOF
+test_format complex-subject-ltrunc %\<\($truncate_count,ltrunc\)%s <<EOF
commit $head3
.. of complex bodies
commit $head2
@@ -311,7 +311,7 @@ commit $head1
$added
EOF
-test_format complex-subject-commitencoding-unset-trunc %<($truncate_count,trunc)%s <<EOF
+test_format complex-subject-commitencoding-unset-trunc %\<\($truncate_count,trunc\)%s <<EOF
commit $head3
Test printing of c..
commit $head2
@@ -320,7 +320,7 @@ commit $head1
added (hinzugef${added_utf8_part}gt..
EOF
-test_format complex-subject-commitencoding-unset-mtrunc %<($truncate_count,mtrunc)%s <<EOF
+test_format complex-subject-commitencoding-unset-mtrunc %\<\($truncate_count,mtrunc\)%s <<EOF
commit $head3
Test prin..ex bodies
commit $head2
@@ -329,7 +329,7 @@ commit $head1
added (hi..f${added_utf8_part}gt) foo
EOF
-test_format complex-subject-commitencoding-unset-ltrunc %<($truncate_count,ltrunc)%s <<EOF
+test_format complex-subject-commitencoding-unset-ltrunc %\<\($truncate_count,ltrunc\)%s <<EOF
commit $head3
.. of complex bodies
commit $head2
--
1.9.0
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH] t6006-*.sh: Fix truncation tests
2014-05-20 13:54 [PATCH] t6006-*.sh: Fix truncation tests Ramsay Jones
@ 2014-05-20 14:19 ` Alexey Shumkin
2014-05-20 14:34 ` Alexey Shumkin
` (2 more replies)
2014-05-20 14:48 ` [PATCH] t6006 (rev-list-format): quote format strings to avoid error on some shells Alexey Shumkin
1 sibling, 3 replies; 11+ messages in thread
From: Alexey Shumkin @ 2014-05-20 14:19 UTC (permalink / raw)
To: Ramsay Jones; +Cc: Junio C Hamano, GIT Mailing-list
On Tue, May 20, 2014 at 02:54:20PM +0100, Ramsay Jones wrote:
>
> Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
> ---
>
> Hi Alexey,
>
> If you need to re-roll your 'as/pretty-truncate' branch, could
> you please squash the relevant parts of this patch into the
> corresponding patches of your patch series. (ie this is a patch
> against the head of the current pu branch ...).
>
> Without this patch I get:
>
> $ ./t6006-rev-list-format.sh
> ok 1 - setup
> ok 2 - format percent
> ok 3 - format hash
> ok 4 - format tree
> ok 5 - format parents
> ok 6 - format author
> ok 7 - format committer
> ok 8 - format encoding
> ok 9 - format subject
> ./t6006-rev-list-format.sh: 152: ./t6006-rev-list-format.sh: Syntax error: "(" unexpected
> FATAL: Unexpected exit with code 2
> $
Ooops, my fault.
>
> (if you have bash as /bin/sh you get different but related errors).
> The additional quoting suppresses the 'command redirection' errors, etc...
It's strange but I do have Bash as /bin/sh and unfortunately I have no
this error
AFAIU, Junio already applied my patches (existance of a branch
as/pretty-truncate tells us that). So, we can only send other patches that
fix errors brought with former patches.
You can send, too.
>
> Thanks.
>
> ATB
> Ramsay Jones
>
> t/t6006-rev-list-format.sh | 14 +++++++-------
> 1 file changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/t/t6006-rev-list-format.sh b/t/t6006-rev-list-format.sh
> index 9bc089b..e1dec3e 100755
> --- a/t/t6006-rev-list-format.sh
> +++ b/t/t6006-rev-list-format.sh
> @@ -149,7 +149,7 @@ commit $head1
> $added
> EOF
>
> -test_format subject-truncated %<($truncate_count,trunc)%s <<EOF
> +test_format subject-truncated %\<\($truncate_count,trunc\)%s <<EOF
> commit $head2
> changed (ge${changed_utf8_part}ndert)..
> commit $head1
> @@ -256,7 +256,7 @@ commit $head1
> $added_iso88591
> EOF
>
> -test_format complex-subject-trunc %<($truncate_count,trunc)%s <<EOF
> +test_format complex-subject-trunc %\<\($truncate_count,trunc\)%s <<EOF
> commit $head3
> Test printing of c..
> commit $head2
> @@ -265,7 +265,7 @@ commit $head1
> added (hinzugef${added_utf8_part_iso88591}gt..
> EOF
>
> -test_format complex-subject-mtrunc %<($truncate_count,mtrunc)%s <<EOF
> +test_format complex-subject-mtrunc %\<\($truncate_count,mtrunc\)%s <<EOF
> commit $head3
> Test prin..ex bodies
> commit $head2
> @@ -274,7 +274,7 @@ commit $head1
> added (hi..f${added_utf8_part_iso88591}gt) foo
> EOF
>
> -test_format complex-subject-ltrunc %<($truncate_count,ltrunc)%s <<EOF
> +test_format complex-subject-ltrunc %\<\($truncate_count,ltrunc\)%s <<EOF
> commit $head3
> .. of complex bodies
> commit $head2
> @@ -311,7 +311,7 @@ commit $head1
> $added
> EOF
>
> -test_format complex-subject-commitencoding-unset-trunc %<($truncate_count,trunc)%s <<EOF
> +test_format complex-subject-commitencoding-unset-trunc %\<\($truncate_count,trunc\)%s <<EOF
> commit $head3
> Test printing of c..
> commit $head2
> @@ -320,7 +320,7 @@ commit $head1
> added (hinzugef${added_utf8_part}gt..
> EOF
>
> -test_format complex-subject-commitencoding-unset-mtrunc %<($truncate_count,mtrunc)%s <<EOF
> +test_format complex-subject-commitencoding-unset-mtrunc %\<\($truncate_count,mtrunc\)%s <<EOF
> commit $head3
> Test prin..ex bodies
> commit $head2
> @@ -329,7 +329,7 @@ commit $head1
> added (hi..f${added_utf8_part}gt) foo
> EOF
>
> -test_format complex-subject-commitencoding-unset-ltrunc %<($truncate_count,ltrunc)%s <<EOF
> +test_format complex-subject-commitencoding-unset-ltrunc %\<\($truncate_count,ltrunc\)%s <<EOF
> commit $head3
> .. of complex bodies
> commit $head2
> --
> 1.9.0
--
Alexey Shumkin
E-mail: Alex.Crezoff@gmail.com
ICQ: 118001447
Jabber (GoogleTalk): Alex.Crezoff@gmail.com
Skype: crezoff
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] t6006-*.sh: Fix truncation tests
2014-05-20 14:19 ` Alexey Shumkin
@ 2014-05-20 14:34 ` Alexey Shumkin
2014-05-20 15:01 ` Ramsay Jones
2014-05-20 17:10 ` Junio C Hamano
2 siblings, 0 replies; 11+ messages in thread
From: Alexey Shumkin @ 2014-05-20 14:34 UTC (permalink / raw)
To: Ramsay Jones; +Cc: Junio C Hamano, GIT Mailing-list
On Tue, May 20, 2014 at 06:19:36PM +0400, Alexey Shumkin wrote:
> On Tue, May 20, 2014 at 02:54:20PM +0100, Ramsay Jones wrote:
> >
> > Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
> > ---
> >
> > Hi Alexey,
> >
> > If you need to re-roll your 'as/pretty-truncate' branch, could
> > you please squash the relevant parts of this patch into the
> > corresponding patches of your patch series. (ie this is a patch
> > against the head of the current pu branch ...).
> >
> > Without this patch I get:
> >
> > $ ./t6006-rev-list-format.sh
> > ok 1 - setup
> > ok 2 - format percent
> > ok 3 - format hash
> > ok 4 - format tree
> > ok 5 - format parents
> > ok 6 - format author
> > ok 7 - format committer
> > ok 8 - format encoding
> > ok 9 - format subject
> > ./t6006-rev-list-format.sh: 152: ./t6006-rev-list-format.sh: Syntax error: "(" unexpected
> > FATAL: Unexpected exit with code 2
> > $
> Ooops, my fault.
> >
> > (if you have bash as /bin/sh you get different but related errors).
> > The additional quoting suppresses the 'command redirection' errors, etc...
> It's strange but I do have Bash as /bin/sh and unfortunately I have no
> this error
>
> AFAIU, Junio already applied my patches (existance of a branch
> as/pretty-truncate tells us that). So, we can only send other patches that
> fix errors brought with former patches.
> You can send, too.
> >
> > Thanks.
> >
> > ATB
> > Ramsay Jones
> >
> > t/t6006-rev-list-format.sh | 14 +++++++-------
> > 1 file changed, 7 insertions(+), 7 deletions(-)
> >
> > diff --git a/t/t6006-rev-list-format.sh b/t/t6006-rev-list-format.sh
> > index 9bc089b..e1dec3e 100755
> > --- a/t/t6006-rev-list-format.sh
> > +++ b/t/t6006-rev-list-format.sh
> > @@ -149,7 +149,7 @@ commit $head1
> > $added
> > EOF
> >
> > -test_format subject-truncated %<($truncate_count,trunc)%s <<EOF
> > +test_format subject-truncated %\<\($truncate_count,trunc\)%s <<EOF
BTW, I would quoted that values rather than escaped
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH] t6006 (rev-list-format): quote format strings to avoid error on some shells
2014-05-20 13:54 [PATCH] t6006-*.sh: Fix truncation tests Ramsay Jones
2014-05-20 14:19 ` Alexey Shumkin
@ 2014-05-20 14:48 ` Alexey Shumkin
2014-05-20 15:03 ` Ramsay Jones
2014-05-21 12:59 ` Alexey Shumkin
1 sibling, 2 replies; 11+ messages in thread
From: Alexey Shumkin @ 2014-05-20 14:48 UTC (permalink / raw)
To: git; +Cc: Alexey Shumkin, Junio C Hamano, Ramsay Jones
Added in 0a144b3 (t4205, t6006: add failing tests for the case when
i18n.logOutputEncoding is set, 2014-05-19) tests give no error
(somehow) with Bash as /bin/sh but fail for some other shells.
Quote format strings to avoid errors.
Signed-off-by: Alexey Shumkin <Alex.Crezoff@gmail.com>
Suggested-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
---
t/t6006-rev-list-format.sh | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/t/t6006-rev-list-format.sh b/t/t6006-rev-list-format.sh
index c6e9a73..19434ad 100755
--- a/t/t6006-rev-list-format.sh
+++ b/t/t6006-rev-list-format.sh
@@ -149,7 +149,7 @@ commit $head1
$added
EOF
-test_format subject-truncated %<($truncate_count,trunc)%s <<EOF
+test_format subject-truncated "%<($truncate_count,trunc)%s" <<EOF
commit $head2
changed (ge${changed_utf8_part}ndert)..
commit $head1
@@ -259,7 +259,7 @@ commit $head1
$added_iso88591
EOF
-test_format complex-subject-trunc %<($truncate_count,trunc)%s <<EOF
+test_format complex-subject-trunc "%<($truncate_count,trunc)%s" <<EOF
commit $head3
Test printing of c..
commit $head2
@@ -268,7 +268,7 @@ commit $head1
added (hinzugef${added_utf8_part_iso88591}gt..
EOF
-test_format complex-subject-mtrunc %<($truncate_count,mtrunc)%s <<EOF
+test_format complex-subject-mtrunc "%<($truncate_count,mtrunc)%s" <<EOF
commit $head3
Test prin..ex bodies
commit $head2
@@ -277,7 +277,7 @@ commit $head1
added (hi..f${added_utf8_part_iso88591}gt) foo
EOF
-test_format complex-subject-ltrunc %<($truncate_count,ltrunc)%s <<EOF
+test_format complex-subject-ltrunc "%<($truncate_count,ltrunc)%s" <<EOF
commit $head3
.. of complex bodies
commit $head2
@@ -314,7 +314,7 @@ commit $head1
$added
EOF
-test_format complex-subject-commitencoding-unset-trunc %<($truncate_count,trunc)%s <<EOF
+test_format complex-subject-commitencoding-unset-trunc "%<($truncate_count,trunc)%s" <<EOF
commit $head3
Test printing of c..
commit $head2
@@ -323,7 +323,7 @@ commit $head1
added (hinzugef${added_utf8_part}gt..
EOF
-test_format complex-subject-commitencoding-unset-mtrunc %<($truncate_count,mtrunc)%s <<EOF
+test_format complex-subject-commitencoding-unset-mtrunc "%<($truncate_count,mtrunc)%s" <<EOF
commit $head3
Test prin..ex bodies
commit $head2
@@ -332,7 +332,7 @@ commit $head1
added (hi..f${added_utf8_part}gt) foo
EOF
-test_format complex-subject-commitencoding-unset-ltrunc %<($truncate_count,ltrunc)%s <<EOF
+test_format complex-subject-commitencoding-unset-ltrunc "%<($truncate_count,ltrunc)%s" <<EOF
commit $head3
.. of complex bodies
commit $head2
--
1.9.2-17
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH] t6006-*.sh: Fix truncation tests
2014-05-20 14:19 ` Alexey Shumkin
2014-05-20 14:34 ` Alexey Shumkin
@ 2014-05-20 15:01 ` Ramsay Jones
2014-05-20 16:02 ` Alexey Shumkin
2014-05-20 17:10 ` Junio C Hamano
2 siblings, 1 reply; 11+ messages in thread
From: Ramsay Jones @ 2014-05-20 15:01 UTC (permalink / raw)
To: Alexey Shumkin; +Cc: Junio C Hamano, GIT Mailing-list
On 20/05/14 15:19, Alexey Shumkin wrote:
> On Tue, May 20, 2014 at 02:54:20PM +0100, Ramsay Jones wrote:
>>
>> Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
>> ---
>>
>> Hi Alexey,
>>
>> If you need to re-roll your 'as/pretty-truncate' branch, could
>> you please squash the relevant parts of this patch into the
>> corresponding patches of your patch series. (ie this is a patch
>> against the head of the current pu branch ...).
>>
>> Without this patch I get:
>>
>> $ ./t6006-rev-list-format.sh
>> ok 1 - setup
>> ok 2 - format percent
>> ok 3 - format hash
>> ok 4 - format tree
>> ok 5 - format parents
>> ok 6 - format author
>> ok 7 - format committer
>> ok 8 - format encoding
>> ok 9 - format subject
>> ./t6006-rev-list-format.sh: 152: ./t6006-rev-list-format.sh: Syntax error: "(" unexpected
>> FATAL: Unexpected exit with code 2
>> $
> Ooops, my fault.
>>
>> (if you have bash as /bin/sh you get different but related errors).
>> The additional quoting suppresses the 'command redirection' errors, etc...
> It's strange but I do have Bash as /bin/sh and unfortunately I have no
> this error
Hmm, I see this:
$ bash t6006-rev-list-format.sh -i
ok 1 - setup
ok 2 - format percent
ok 3 - format hash
ok 4 - format tree
ok 5 - format parents
ok 6 - format author
ok 7 - format committer
ok 8 - format encoding
ok 9 - format subject
t6006-rev-list-format.sh: line 152: 20,trunc: command not found
not ok 10 - format subject-truncated
#
# git rev-list --pretty=format:'%/dev/fd/63%s' master >output.subject-truncated &&
# test_cmp expect.subject-truncated output.subject-truncated
#
$
(Since I'm on Linux Mint, my /bin/sh is dash, which produces the output in my previous mail).
ATB,
Ramsay Jones
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] t6006 (rev-list-format): quote format strings to avoid error on some shells
2014-05-20 14:48 ` [PATCH] t6006 (rev-list-format): quote format strings to avoid error on some shells Alexey Shumkin
@ 2014-05-20 15:03 ` Ramsay Jones
2014-05-21 12:59 ` Alexey Shumkin
1 sibling, 0 replies; 11+ messages in thread
From: Ramsay Jones @ 2014-05-20 15:03 UTC (permalink / raw)
To: Alexey Shumkin, git; +Cc: Junio C Hamano
On 20/05/14 15:48, Alexey Shumkin wrote:
> Added in 0a144b3 (t4205, t6006: add failing tests for the case when
> i18n.logOutputEncoding is set, 2014-05-19) tests give no error
> (somehow) with Bash as /bin/sh but fail for some other shells.
>
> Quote format strings to avoid errors.
>
> Signed-off-by: Alexey Shumkin <Alex.Crezoff@gmail.com>
> Suggested-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
> ---
> t/t6006-rev-list-format.sh | 14 +++++++-------
> 1 file changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/t/t6006-rev-list-format.sh b/t/t6006-rev-list-format.sh
> index c6e9a73..19434ad 100755
> --- a/t/t6006-rev-list-format.sh
> +++ b/t/t6006-rev-list-format.sh
> @@ -149,7 +149,7 @@ commit $head1
> $added
> EOF
>
> -test_format subject-truncated %<($truncate_count,trunc)%s <<EOF
> +test_format subject-truncated "%<($truncate_count,trunc)%s" <<EOF
> commit $head2
> changed (ge${changed_utf8_part}ndert)..
> commit $head1
> @@ -259,7 +259,7 @@ commit $head1
> $added_iso88591
> EOF
>
> -test_format complex-subject-trunc %<($truncate_count,trunc)%s <<EOF
> +test_format complex-subject-trunc "%<($truncate_count,trunc)%s" <<EOF
> commit $head3
> Test printing of c..
> commit $head2
> @@ -268,7 +268,7 @@ commit $head1
> added (hinzugef${added_utf8_part_iso88591}gt..
> EOF
>
> -test_format complex-subject-mtrunc %<($truncate_count,mtrunc)%s <<EOF
> +test_format complex-subject-mtrunc "%<($truncate_count,mtrunc)%s" <<EOF
> commit $head3
> Test prin..ex bodies
> commit $head2
> @@ -277,7 +277,7 @@ commit $head1
> added (hi..f${added_utf8_part_iso88591}gt) foo
> EOF
>
> -test_format complex-subject-ltrunc %<($truncate_count,ltrunc)%s <<EOF
> +test_format complex-subject-ltrunc "%<($truncate_count,ltrunc)%s" <<EOF
> commit $head3
> .. of complex bodies
> commit $head2
> @@ -314,7 +314,7 @@ commit $head1
> $added
> EOF
>
> -test_format complex-subject-commitencoding-unset-trunc %<($truncate_count,trunc)%s <<EOF
> +test_format complex-subject-commitencoding-unset-trunc "%<($truncate_count,trunc)%s" <<EOF
> commit $head3
> Test printing of c..
> commit $head2
> @@ -323,7 +323,7 @@ commit $head1
> added (hinzugef${added_utf8_part}gt..
> EOF
>
> -test_format complex-subject-commitencoding-unset-mtrunc %<($truncate_count,mtrunc)%s <<EOF
> +test_format complex-subject-commitencoding-unset-mtrunc "%<($truncate_count,mtrunc)%s" <<EOF
> commit $head3
> Test prin..ex bodies
> commit $head2
> @@ -332,7 +332,7 @@ commit $head1
> added (hi..f${added_utf8_part}gt) foo
> EOF
>
> -test_format complex-subject-commitencoding-unset-ltrunc %<($truncate_count,ltrunc)%s <<EOF
> +test_format complex-subject-commitencoding-unset-ltrunc "%<($truncate_count,ltrunc)%s" <<EOF
> commit $head3
> .. of complex bodies
> commit $head2
>
Yep, actually using string quotes works just as well! :-P
Thanks!
ATB,
Ramsay Jones
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] t6006-*.sh: Fix truncation tests
2014-05-20 15:01 ` Ramsay Jones
@ 2014-05-20 16:02 ` Alexey Shumkin
2014-05-20 16:43 ` Ramsay Jones
0 siblings, 1 reply; 11+ messages in thread
From: Alexey Shumkin @ 2014-05-20 16:02 UTC (permalink / raw)
To: Ramsay Jones; +Cc: Junio C Hamano, GIT Mailing-list
On Tue, May 20, 2014 at 04:01:22PM +0100, Ramsay Jones wrote:
> On 20/05/14 15:19, Alexey Shumkin wrote:
> > On Tue, May 20, 2014 at 02:54:20PM +0100, Ramsay Jones wrote:
> >>
> >> Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
> >> ---
> >>
> >> Hi Alexey,
> >>
> >> If you need to re-roll your 'as/pretty-truncate' branch, could
> >> you please squash the relevant parts of this patch into the
> >> corresponding patches of your patch series. (ie this is a patch
> >> against the head of the current pu branch ...).
> >>
> >> Without this patch I get:
> >>
> >> $ ./t6006-rev-list-format.sh
> >> ok 1 - setup
> >> ok 2 - format percent
> >> ok 3 - format hash
> >> ok 4 - format tree
> >> ok 5 - format parents
> >> ok 6 - format author
> >> ok 7 - format committer
> >> ok 8 - format encoding
> >> ok 9 - format subject
> >> ./t6006-rev-list-format.sh: 152: ./t6006-rev-list-format.sh: Syntax error: "(" unexpected
> >> FATAL: Unexpected exit with code 2
> >> $
> > Ooops, my fault.
> >>
> >> (if you have bash as /bin/sh you get different but related errors).
> >> The additional quoting suppresses the 'command redirection' errors, etc...
> > It's strange but I do have Bash as /bin/sh and unfortunately I have no
> > this error
>
> Hmm, I see this:
>
> $ bash t6006-rev-list-format.sh -i
AFAIK, this is not "running Bash as /bin/sh" :)
Maybe I'm wrong but Bash as /bin/sh is:
$ ls -l /bin/sh
lrwxrwxrwx 1 root root 4 May 12 18:35 /bin/sh -> bash
But it does not matter here much, you've noticed my foolish mistake :)
> ok 1 - setup
> ok 2 - format percent
> ok 3 - format hash
> ok 4 - format tree
> ok 5 - format parents
> ok 6 - format author
> ok 7 - format committer
> ok 8 - format encoding
> ok 9 - format subject
> t6006-rev-list-format.sh: line 152: 20,trunc: command not found
> not ok 10 - format subject-truncated
> #
> # git rev-list --pretty=format:'%/dev/fd/63%s' master >output.subject-truncated &&
> # test_cmp expect.subject-truncated output.subject-truncated
> #
> $
>
> (Since I'm on Linux Mint, my /bin/sh is dash, which produces the output in my previous mail).
>
> ATB,
> Ramsay Jones
>
>
>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] t6006-*.sh: Fix truncation tests
2014-05-20 16:02 ` Alexey Shumkin
@ 2014-05-20 16:43 ` Ramsay Jones
0 siblings, 0 replies; 11+ messages in thread
From: Ramsay Jones @ 2014-05-20 16:43 UTC (permalink / raw)
To: Alexey Shumkin; +Cc: Junio C Hamano, GIT Mailing-list
On 20/05/14 17:02, Alexey Shumkin wrote:
> On Tue, May 20, 2014 at 04:01:22PM +0100, Ramsay Jones wrote:
>> On 20/05/14 15:19, Alexey Shumkin wrote:
>>> On Tue, May 20, 2014 at 02:54:20PM +0100, Ramsay Jones wrote:
>>>>
>>>> Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
>>>> ---
>>>>
>>>> Hi Alexey,
>>>>
>>>> If you need to re-roll your 'as/pretty-truncate' branch, could
>>>> you please squash the relevant parts of this patch into the
>>>> corresponding patches of your patch series. (ie this is a patch
>>>> against the head of the current pu branch ...).
>>>>
>>>> Without this patch I get:
>>>>
>>>> $ ./t6006-rev-list-format.sh
>>>> ok 1 - setup
>>>> ok 2 - format percent
>>>> ok 3 - format hash
>>>> ok 4 - format tree
>>>> ok 5 - format parents
>>>> ok 6 - format author
>>>> ok 7 - format committer
>>>> ok 8 - format encoding
>>>> ok 9 - format subject
>>>> ./t6006-rev-list-format.sh: 152: ./t6006-rev-list-format.sh: Syntax error: "(" unexpected
>>>> FATAL: Unexpected exit with code 2
>>>> $
>>> Ooops, my fault.
>>>>
>>>> (if you have bash as /bin/sh you get different but related errors).
>>>> The additional quoting suppresses the 'command redirection' errors, etc...
>>> It's strange but I do have Bash as /bin/sh and unfortunately I have no
>>> this error
>>
>> Hmm, I see this:
>>
>> $ bash t6006-rev-list-format.sh -i
> AFAIK, this is not "running Bash as /bin/sh" :)
> Maybe I'm wrong but Bash as /bin/sh is:
> $ ls -l /bin/sh
> lrwxrwxrwx 1 root root 4 May 12 18:35 /bin/sh -> bash
Ah yes, I keep forgetting that bash behaves differently when invoked as 'sh'.
(i.e. it enters 'posix mode' in this case).
Indeed, this is (roughly) equivalent to:
$ bash --posix t6006-rev-list-format.sh
ok 1 - setup
ok 2 - format percent
ok 3 - format hash
...
ok 52 - oneline with empty message
ok 53 - single-character name is parsed correctly
# passed all 53 test(s)
1..53
$
... which works.
Thanks again.
ATB
Ramsay Jones
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] t6006-*.sh: Fix truncation tests
2014-05-20 14:19 ` Alexey Shumkin
2014-05-20 14:34 ` Alexey Shumkin
2014-05-20 15:01 ` Ramsay Jones
@ 2014-05-20 17:10 ` Junio C Hamano
2014-05-21 4:11 ` Alexey Shumkin
2 siblings, 1 reply; 11+ messages in thread
From: Junio C Hamano @ 2014-05-20 17:10 UTC (permalink / raw)
To: Alexey Shumkin; +Cc: Ramsay Jones, GIT Mailing-list
Alexey Shumkin <alex.crezoff@gmail.com> writes:
> AFAIU, Junio already applied my patches (existance of a branch
> as/pretty-truncate tells us that). So, we can only send other patches that
> fix errors brought with former patches.
No, NO, NOOOOO....
The existence of a branch merely means that I saw the patches, and
that I thought that the series was not completely useless. In other
words, it indicates that I wanted to make sure that I won't forget
about the topic, and it was worth my time to create the branch and
apply there for that purpose.
Please do not read anything more than that. Presense of a topic
branch by itself does not say that I _read_ the patches or I thought
they did not need reroll.
When such a branch is merged to 'next', that means I read the
patches myself, or I saw somebody whose judgement I and others in
the community trust read them and gave a positive response or an
Ack, and that I decided that the topic is in a good enough shape to
be worked on further with incremental updates.
You are talking about the latter state, but as/pretty-truncate is in
the former state.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] t6006-*.sh: Fix truncation tests
2014-05-20 17:10 ` Junio C Hamano
@ 2014-05-21 4:11 ` Alexey Shumkin
0 siblings, 0 replies; 11+ messages in thread
From: Alexey Shumkin @ 2014-05-21 4:11 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Ramsay Jones, GIT Mailing-list
On Tue, May 20, 2014 at 10:10:46AM -0700, Junio C Hamano wrote:
> Alexey Shumkin <alex.crezoff@gmail.com> writes:
>
> > AFAIU, Junio already applied my patches (existance of a branch
> > as/pretty-truncate tells us that). So, we can only send other patches that
> > fix errors brought with former patches.
>
> No, NO, NOOOOO....
>
> The existence of a branch merely means that I saw the patches, and
> that I thought that the series was not completely useless. In other
> words, it indicates that I wanted to make sure that I won't forget
> about the topic, and it was worth my time to create the branch and
> apply there for that purpose.
Oh, I got it!
I'll fix my typo (ISO8895-1 vs ISO8859-1) and quotes issue then.
And will reroll patches.
Thanks!
>
> Please do not read anything more than that. Presense of a topic
> branch by itself does not say that I _read_ the patches or I thought
> they did not need reroll.
>
> When such a branch is merged to 'next', that means I read the
> patches myself, or I saw somebody whose judgement I and others in
> the community trust read them and gave a positive response or an
> Ack, and that I decided that the topic is in a good enough shape to
> be worked on further with incremental updates.
>
> You are talking about the latter state, but as/pretty-truncate is in
> the former state.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] t6006 (rev-list-format): quote format strings to avoid error on some shells
2014-05-20 14:48 ` [PATCH] t6006 (rev-list-format): quote format strings to avoid error on some shells Alexey Shumkin
2014-05-20 15:03 ` Ramsay Jones
@ 2014-05-21 12:59 ` Alexey Shumkin
1 sibling, 0 replies; 11+ messages in thread
From: Alexey Shumkin @ 2014-05-21 12:59 UTC (permalink / raw)
To: git; +Cc: Junio C Hamano, Ramsay Jones
This patch is redundant then.
It will be squashed into next patch series.
On Tue, May 20, 2014 at 06:48:43PM +0400, Alexey Shumkin wrote:
> Added in 0a144b3 (t4205, t6006: add failing tests for the case when
> i18n.logOutputEncoding is set, 2014-05-19) tests give no error
> (somehow) with Bash as /bin/sh but fail for some other shells.
>
> Quote format strings to avoid errors.
>
> Signed-off-by: Alexey Shumkin <Alex.Crezoff@gmail.com>
> Suggested-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
> ---
> t/t6006-rev-list-format.sh | 14 +++++++-------
> 1 file changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/t/t6006-rev-list-format.sh b/t/t6006-rev-list-format.sh
> index c6e9a73..19434ad 100755
> --- a/t/t6006-rev-list-format.sh
> +++ b/t/t6006-rev-list-format.sh
> @@ -149,7 +149,7 @@ commit $head1
> $added
> EOF
>
> -test_format subject-truncated %<($truncate_count,trunc)%s <<EOF
> +test_format subject-truncated "%<($truncate_count,trunc)%s" <<EOF
> commit $head2
> changed (ge${changed_utf8_part}ndert)..
> commit $head1
> @@ -259,7 +259,7 @@ commit $head1
> $added_iso88591
> EOF
>
> -test_format complex-subject-trunc %<($truncate_count,trunc)%s <<EOF
> +test_format complex-subject-trunc "%<($truncate_count,trunc)%s" <<EOF
> commit $head3
> Test printing of c..
> commit $head2
> @@ -268,7 +268,7 @@ commit $head1
> added (hinzugef${added_utf8_part_iso88591}gt..
> EOF
>
> -test_format complex-subject-mtrunc %<($truncate_count,mtrunc)%s <<EOF
> +test_format complex-subject-mtrunc "%<($truncate_count,mtrunc)%s" <<EOF
> commit $head3
> Test prin..ex bodies
> commit $head2
> @@ -277,7 +277,7 @@ commit $head1
> added (hi..f${added_utf8_part_iso88591}gt) foo
> EOF
>
> -test_format complex-subject-ltrunc %<($truncate_count,ltrunc)%s <<EOF
> +test_format complex-subject-ltrunc "%<($truncate_count,ltrunc)%s" <<EOF
> commit $head3
> .. of complex bodies
> commit $head2
> @@ -314,7 +314,7 @@ commit $head1
> $added
> EOF
>
> -test_format complex-subject-commitencoding-unset-trunc %<($truncate_count,trunc)%s <<EOF
> +test_format complex-subject-commitencoding-unset-trunc "%<($truncate_count,trunc)%s" <<EOF
> commit $head3
> Test printing of c..
> commit $head2
> @@ -323,7 +323,7 @@ commit $head1
> added (hinzugef${added_utf8_part}gt..
> EOF
>
> -test_format complex-subject-commitencoding-unset-mtrunc %<($truncate_count,mtrunc)%s <<EOF
> +test_format complex-subject-commitencoding-unset-mtrunc "%<($truncate_count,mtrunc)%s" <<EOF
> commit $head3
> Test prin..ex bodies
> commit $head2
> @@ -332,7 +332,7 @@ commit $head1
> added (hi..f${added_utf8_part}gt) foo
> EOF
>
> -test_format complex-subject-commitencoding-unset-ltrunc %<($truncate_count,ltrunc)%s <<EOF
> +test_format complex-subject-commitencoding-unset-ltrunc "%<($truncate_count,ltrunc)%s" <<EOF
> commit $head3
> .. of complex bodies
> commit $head2
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2014-05-21 12:59 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-20 13:54 [PATCH] t6006-*.sh: Fix truncation tests Ramsay Jones
2014-05-20 14:19 ` Alexey Shumkin
2014-05-20 14:34 ` Alexey Shumkin
2014-05-20 15:01 ` Ramsay Jones
2014-05-20 16:02 ` Alexey Shumkin
2014-05-20 16:43 ` Ramsay Jones
2014-05-20 17:10 ` Junio C Hamano
2014-05-21 4:11 ` Alexey Shumkin
2014-05-20 14:48 ` [PATCH] t6006 (rev-list-format): quote format strings to avoid error on some shells Alexey Shumkin
2014-05-20 15:03 ` Ramsay Jones
2014-05-21 12:59 ` Alexey Shumkin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).