Re: [RFC/ PATCH 4/5] t3030: update porcelain expected message

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

 



Diane Gasselin <diane.gasselin@xxxxxxxxxxxxxxx> writes:

> From: Diane <diane.gasselin@xxxxxxxxxxxxxxx>
>
> As porcelain messages have been changed, the expected porcelain message
> tested in this test needs to be changed.
>
> Signed-off-by: Diane Gasselin <diane.gasselin@xxxxxxxxxxxxxxx>
> Signed-off-by: Axel Bonnet <axel.bonnet@xxxxxxxxxxxxxxx>
> Signed-off-by: Clément Poulain <clement.poulain@xxxxxxxxxxxxxxx>
> ---
>  t/t3030-merge-recursive.sh |    8 +++++++-
>  1 files changed, 7 insertions(+), 1 deletions(-)
>
> diff --git a/t/t3030-merge-recursive.sh b/t/t3030-merge-recursive.sh
> index 9929f82..9ac5df8 100755
> --- a/t/t3030-merge-recursive.sh
> +++ b/t/t3030-merge-recursive.sh
> @@ -268,6 +268,11 @@ test_expect_success 'merge-recursive result' '
>  	test_cmp expected actual
>  
>  '
> +cat> expected2 <<EOF

Style:

 (1) redirection ">" and "<" stick to the target file and have a SP on the
     other end.

 (2) if you are not actively $substituting inside here document,
     quote EOF to assure readers that nothing funny is going on.

i.e.

	cat >expected2 <<\EOF
        ... your HERE document here ...
	EOF

The same comment applies to [PATCH 5/5].  Also when you want to create an
empty file, don't use "touch F"; say ">F" instead.

> -	grep "Your local changes to .* would be overwritten by merge." out
> +	grep -A 2 "Your local changes to" out > tmp &&

I think "grep -A $n" is a GNUism, not even in POSIX.  Avoid it.

Perhaps

	sed -n "/^Your local changes to/,\$p" out >tmp &&
--
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]