Re: [PATCH 14/13] test-wildmatch: avoid Windows path mangling

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

 



Johannes Sixt <j.sixt@xxxxxxxxxxxxx> writes:

> From: Nguyễn Thái Ngọc Duy <pclouds@xxxxxxxxx>
>
> The MSYS bash mangles arguments that begin with a forward slash
> when they are passed to test-wildmatch. This causes tests to fail.
> Avoid mangling by prepending "XXX", which is removed by
> test-wildmatch before further processing.
>
> [J6t: reworded commit message]
>
> Reported-by: Johannes Sixt <j6t@xxxxxxxx>
> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@xxxxxxxxx>
> Signed-off-by: Johannes Sixt <j6t@xxxxxxxx>
> ---
>  Works well, and I'm fine with this work-around.
>
>  -- Hannes

Thanks, but you need to fix your format-patch somehow.

> @@ -187,8 +187,8 @@ match 0 0 '-' '[[-\]]'
>  match 1 1 '-adobe-courier-bold-o-normal--12-120-75-75-m-70-iso8859-1' '-*-*-*-*-*-*-12-*-*-*-m-*-*-*'
>  match 0 0 '-adobe-courier-bold-o-normal--12-120-75-75-X-70-iso8859-1' '-*-*-*-*-*-*-12-*-*-*-m-*-*-*'
>  match 0 0 '-adobe-courier-bold-o-normal--12-120-75-75-/-70-iso8859-1' '-*-*-*-*-*-*-12-*-*-*-m-*-*-*'
> -match 1 1 '/adobe/courier/bold/o/normal//12/120/75/75/m/70/iso8859/1' '/*/*/*/*/*/*/12/*/*/*/m/*/*/*'
> -match 0 0 '/adobe/courier/bold/o/normal//12/120/75/75/X/70/iso8859/1' '/*/*/*/*/*/*/12/*/*/*/m/*/*/*'
> +match 1 1 'XXX/adobe/courier/bold/o/normal//12/120/75/75/m/70/iso8859/1' 'XXX/*/*/*/*/*/*/12/*/*/*/m/*/*/*'
> +match 0 0 'XXX/adobe/courier/bold/o/normal//12/120/75/75/X/70/iso8859/1' 'XXX/*/*/*/*/*/*/12/*/*/*/m/*/*/*'
>  match 1 0 'abcd/abcdefg/abcdefghijk/abcdefghijklmnop.txt' '**/*a*b*g*n*t'
>  match 0 0 'abcd/abcdefg/abcdefghijk/abcdefghijklmnop.txtz' '**/*a*b*g*n*t'
>  diff --git a/test-wildmatch.c b/test-wildmatch.c

This hunk claims that there are 8 lines in preimage and postimage,
but it is not the case.  It has only 7 lines each.

You also have the first line of the next patch "diff --git" somehow
indented.  How did this happen?


> index 74c0864..e384c8e 100644
> --- a/test-wildmatch.c
> +++ b/test-wildmatch.c
> @@ -3,6 +3,14 @@
>   int main(int argc, char **argv)
>  {
> +	int i;
> +	for (i = 2; i < argc; i++) {
> +		if (argv[i][0] == '/')
> +			die("Forward slash is not allowed at the beginning of the\n"
> +			    "pattern because Windows does not like it. Use `XXX/' instead.");
> +		else if (!strncmp(argv[i], "XXX/", 4))
> +			argv[i] += 3;
> +	}
>  	if (!strcmp(argv[1], "wildmatch"))
>  		return !!wildmatch(argv[3], argv[2], 0);
>  	else if (!strcmp(argv[1], "iwildmatch"))

And again this claims that the preimage has 6 lines while the
postimage has 14.  Somebody is overcounting, or perhaps you removed
the first pre-context by hand without adjusting the line number?

--
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]