Re: [PATCH jk/checkout-attribute-lookup] t2003: work around path mangling issue on Windows

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

 



Johannes Sixt <j.sixt@xxxxxxxxxxxxx> writes:

> From: Johannes Sixt <j6t@xxxxxxxx>
>
> MSYS bash considers the part "/g" in the sed expression "s/./=/g" as an
> absolute path after an assignment, and mangles it to a C:/something
> string. Do not attract bash's attention by avoiding the equals sign.

If this breakage is about path mangling, I suspect it may be cleaner
to work it around by not using / as the pattern separator, e.g.

	sed -e s!.!=!g

Or perhaps use SHELL_PATH to point at a more reasonable
implementation of shell that does not have such an idiocy?

> Signed-off-by: Johannes Sixt <j6t@xxxxxxxx>
> ---
>  t/t2003-checkout-cache-mkdir.sh | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/t/t2003-checkout-cache-mkdir.sh b/t/t2003-checkout-cache-mkdir.sh
> index 4c97468..ff163cf 100755
> --- a/t/t2003-checkout-cache-mkdir.sh
> +++ b/t/t2003-checkout-cache-mkdir.sh
> @@ -94,14 +94,14 @@ test_expect_success 'apply filter from working tree .gitattributes with --prefix
>  	rm -fr path0 path1 path2 tmp* &&
>  	mkdir path1 &&
>  	mkdir tmp &&
> -	git config filter.replace-all.smudge "sed -e s/./=/g" &&
> +	git config filter.replace-all.smudge "sed -e s/./,/g" &&
>  	git config filter.replace-all.clean cat &&
>  	git config filter.replace-all.required true &&
>  	echo "file1 filter=replace-all" >path1/.gitattributes &&
>  	git checkout-index --prefix=tmp/ -f -a &&
>  	echo frotz >expected &&
>  	test_cmp expected tmp/path0 &&
> -	echo ====== >expected &&
> +	echo ,,,,,, >expected &&
>  	test_cmp expected tmp/path1/file1
>  '
--
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]