Re: [PATCH 2/2] diff: document the pattern format for diff.orderFile

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

 



Richard Hansen <hansenr@xxxxxxxxxx> writes:

> Document the format of the patterns used for the diff.orderFile
> setting and diff's '-O' option by referring the reader to the
> gitignore[5] page.
>
> Signed-off-by: Richard Hansen <hansenr@xxxxxxxxxx>
> ---
>  Documentation/diff-config.txt  | 3 ++-
>  Documentation/diff-options.txt | 3 ++-
>  2 files changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/Documentation/diff-config.txt b/Documentation/diff-config.txt
> index 875212045..a35ecdd6b 100644
> --- a/Documentation/diff-config.txt
> +++ b/Documentation/diff-config.txt
> @@ -100,7 +100,8 @@ diff.noprefix::
>  
>  diff.orderFile::
>  	File indicating how to order files within a diff, using
> -	one shell glob pattern per line.
> +	one glob pattern per line.
> +	See linkgit:gitignore[5] for the pattern format.


I do not think it is wise to suggest referring to gitignore, as the
logic of matching is quite different, other than the fact that they
both use wildmatch() internally.  Also, unlike gitignore, orderfile
does not allow any negative matching i.e. "!<pattern>".

>  	If `diff.orderFile` is a relative pathname, it is treated as
>  	relative to the top of the work tree.
>  	Can be overridden by the '-O' option to linkgit:git-diff[1].
> diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt
> index e6215c372..dc6b1af71 100644
> --- a/Documentation/diff-options.txt
> +++ b/Documentation/diff-options.txt
> @@ -467,7 +467,8 @@ endif::git-format-patch[]
>  
>  -O<orderfile>::
>  	Output the patch in the order specified in the
> -	<orderfile>, which has one shell glob pattern per line.
> +	<orderfile>, which has one glob pattern per line.
> +	See linkgit:gitignore[5] for the pattern format.
>  	This overrides the `diff.orderFile` configuration variable
>  	(see linkgit:git-config[1]).  To cancel `diff.orderFile`,
>  	use `-O/dev/null`.



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