summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Ågren <martin.agren@gmail.com>2020-02-06 20:53:01 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-02-09 17:25:24 (GMT)
commit9299f84921e0bd076cf998aa852fadb73627756f (patch)
tree1a9f469832b9b968e346e76904af2057431fad82
parenta7312d1a28ff3ab0a5a5427b35f01d943103cba8 (diff)
downloadgit-9299f84921e0bd076cf998aa852fadb73627756f.zip
git-9299f84921e0bd076cf998aa852fadb73627756f.tar.gz
git-9299f84921e0bd076cf998aa852fadb73627756f.tar.bz2
diff-options.txt: avoid "regex" overload in example
When we exemplify the difference between `-G` and `-S` (using `--pickaxe-regex`), we do so using an example diff and git-diff invocation involving "regexec", "regexp", "regmatch", ... The example is correct, but we can make it easier to untangle by avoiding writing "regex.*" unless it's really needed to make our point. Use some made-up, non-regexy words instead. Reported-by: Adam Dinwoodie <adam@dinwoodie.org> Signed-off-by: Martin Ågren <martin.agren@gmail.com> Reviewed-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--Documentation/diff-options.txt8
1 files changed, 4 insertions, 4 deletions
diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt
index 09faee3..bb31f0c 100644
--- a/Documentation/diff-options.txt
+++ b/Documentation/diff-options.txt
@@ -567,13 +567,13 @@ To illustrate the difference between `-S<regex> --pickaxe-regex` and
file:
+
----
-+ return !regexec(regexp, two->ptr, 1, &regmatch, 0);
++ return frotz(nitfol, two->ptr, 1, 0);
...
-- hit = !regexec(regexp, mf2.ptr, 1, &regmatch, 0);
+- hit = frotz(nitfol, mf2.ptr, 1, 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"frotz\(nitfol"` will show this commit, `git log
+-S"frotz\(nitfol" --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