Re: [PATCH next] t7407: use 'cut' utility rather than bash's substring expansion notation

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

 



On Thursday 20 August 2009, Brandon Casey wrote:
> From: Brandon Casey <drafnel@xxxxxxxxx>
>
> The substring expansion notation is a bashism that we have not so far
> adopted.  There is precedence for using the 'cut' utility for extracting
> a substring.  So do so here.
>
> Signed-off-by: Brandon Casey <casey@xxxxxxxxxxxxxxx>
> ---
>  t/t7407-submodule-foreach.sh |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/t/t7407-submodule-foreach.sh b/t/t7407-submodule-foreach.sh
> index de1730d..44ea8ac 100755
> --- a/t/t7407-submodule-foreach.sh
> +++ b/t/t7407-submodule-foreach.sh
> @@ -207,8 +207,8 @@ cat > expect <<EOF
>   $nested2sha1 nested1/nested2 (heads/master)
>   $nested3sha1 nested1/nested2/nested3 (heads/master)
>   $submodulesha1 nested1/nested2/nested3/submodule (heads/master)
> - $sub1sha1 sub1 (${sub1sha1:0:7})
> - $sub2sha1 sub2 (${sub1sha1:0:7})
> + $sub1sha1 sub1 ($(echo $sub1sha1 | cut -c 1-7))
> + $sub2sha1 sub2 ($(echo $sub1sha1 | cut -c 1-7))

Typo (both in the original, and the patch), should be:
	$sub2sha1 sub2 ($(echo $sub2sha1 | cut -c 1-7))

>   $sub3sha1 sub3 (heads/master)
>  EOF

Otherwise:

Acked-by: Johan Herland <johan@xxxxxxxxxxx>

Thanks,


...Johan

-- 
Johan Herland, <johan@xxxxxxxxxxx>
www.herland.net
--
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]