Skip to content

Commit 9299f84

Browse files
Martin Ågrengitster
authored andcommitted
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 <[email protected]> Signed-off-by: Martin Ågren <[email protected]> Reviewed-by: Taylor Blau <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent a7312d1 commit 9299f84

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Documentation/diff-options.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -567,13 +567,13 @@ To illustrate the difference between `-S<regex> --pickaxe-regex` and
567567
file:
568568
+
569569
----
570-
+ return !regexec(regexp, two->ptr, 1, &regmatch, 0);
570+
+ return frotz(nitfol, two->ptr, 1, 0);
571571
...
572-
- hit = !regexec(regexp, mf2.ptr, 1, &regmatch, 0);
572+
- hit = frotz(nitfol, mf2.ptr, 1, 0);
573573
----
574574
+
575-
While `git log -G"regexec\(regexp"` will show this commit, `git log
576-
-S"regexec\(regexp" --pickaxe-regex` will not (because the number of
575+
While `git log -G"frotz\(nitfol"` will show this commit, `git log
576+
-S"frotz\(nitfol" --pickaxe-regex` will not (because the number of
577577
occurrences of that string did not change).
578578
+
579579
Unless `--text` is supplied patches of binary files without a textconv

0 commit comments

Comments
 (0)