From: Adam Dinwoodie Date: Sun, 02 Feb 2020 19:22:26 GMT Subject: [PATCH] diff-options.txt: correct command syntax Message-ID: <20200202192226.29176-1-adam@dinwoodie.org> Change the example arguments in the description of the -G diff argument to be consistent throughout the description. Signed-off-by: Adam Dinwoodie --- Documentation/diff-options.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt index 09faee3b44..84a74cb2da 100644 --- a/Documentation/diff-options.txt +++ b/Documentation/diff-options.txt @@ -561,19 +561,19 @@ Binary files are searched as well. -G:: Look for differences whose patch text contains added/removed lines that match . + To illustrate the difference between `-S --pickaxe-regex` and `-G`, consider a commit with the following diff in the same file: + ---- + return !regexec(regexp, two->ptr, 1, ®match, 0); ... - hit = !regexec(regexp, mf2.ptr, 1, ®match, 0); ---- + -While `git log -G"regexec\(regexp"` will show this commit, `git log --S"regexec\(regexp" --pickaxe-regex` will not (because the number of +While `git log -G` will show this commit, `git log +-S --pickaxe-regex` will not (because the number of occurrences of that string did not change). + Unless `--text` is supplied patches of binary files without a textconv -- 2.25.0