Re: [PATCH 3/4] Clean: Remove unnecessary `\' (line continuation)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Michael Witten <mfwitten@xxxxxxxxx> writes:

> Signed-off-by: Michael Witten <mfwitten@xxxxxxxxx>
> ---
>  t/t8001-annotate.sh |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/t/t8001-annotate.sh b/t/t8001-annotate.sh
> index 45cb60e..68ac828 100755
> --- a/t/t8001-annotate.sh
> +++ b/t/t8001-annotate.sh
> @@ -8,7 +8,7 @@ PROG='git annotate'
>  
>  test_expect_success \
>      'Annotating an old revision works' \
> -    '[ $(git annotate file master | awk "{print \$3}" | grep -c "^A$") -eq 2 ] && \
> +    '[ $(git annotate file master | awk "{print \$3}" | grep -c "^A$") -eq 2 ] &&
>       [ $(git annotate file master | awk "{print \$3}" | grep -c "^B$") -eq 2 ]'

While this is not wrong per-se, I don't want to take too much half-way
churning.

If we were to properly do this, we should first rewrite it to use the more
modern style:

	test_expect_success 'Annotating an old revision works' '
		... test script comes here ...
        '

and just run annotate once without having any downstream pipe, i.e.

	git annotate file master >result &&
	awk "{ print \$3; }" <result >authors &&
	test 2 = $(grep A <authors | wc -l) &&
	test 2 = $(grep B <authors | wc -l)

so that we can catch breakage in "git annotate" itself more reliably
(e.g. even if the command showed two lines for each author, it is a
failure if the command itself did not exit with status 0).


--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]