From: Richard Hansen Date: Wed, 11 Jan 2017 01:14:35 GMT Subject: Re: [PATCH 2/2] diff: document the pattern format for diff.orderFile Message-ID: <17d48ccd-fd19-3922-8ee8-af6558d22632@google.com> In-Reply-To: On 2017-01-10 15:14, Junio C Hamano wrote: > Richard Hansen 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 >> --- >> 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. "!". I was looking at the code to see how the two file formats differed and noticed that match_order() doesn't set the WM_PATHNAME flag when it calls wildmatch(). That's unintentional (a bug), right? -Richard > >> 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:: >> Output the patch in the order specified in the >> - , which has one shell glob pattern per line. >> + , 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`.