Re: [PATCH 2/2] entry: fix filter lookup

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

 



John Keeping <john@xxxxxxxxxxxxx> writes:

> diff --git a/t/t2003-checkout-cache-mkdir.sh b/t/t2003-checkout-cache-mkdir.sh
> index 63fd0a8..4c97468 100755
> --- a/t/t2003-checkout-cache-mkdir.sh
> +++ b/t/t2003-checkout-cache-mkdir.sh
> @@ -90,4 +90,30 @@ test_expect_success SYMLINKS 'use --prefix=tmp- where tmp-path1 is a symlink' '
>  	test -f tmp-path1/file1
>  '
>  
> +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.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 &&
> +	test_cmp expected tmp/path1/file1
> +'
> +
> +test_expect_success 'apply CRLF filter from working tree .gitattributes with --prefix' '
> +	rm -fr path0 path1 path2 tmp* &&
> +	mkdir path1 &&
> +	mkdir tmp &&
> +	echo "file1 eol=crlf" >path1/.gitattributes &&
> +	git checkout-index --prefix=tmp/ -f -a &&
> +	echo rezrovQ >expected &&
> +	tr \\015 Q <tmp/path1/file1 >actual &&
> +	test_cmp expected actual
> +'

Nicely done.  Thanks.
--
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]