Thread (4 messages) flat view 4 messages, 3 authors, 2016-06-15

Re: [PATCH] doc: clarify how -S works

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:46:19

Jeff King [off-list ref] writes:
I wonder if "gitdiffcore" is a little scary for new people who just want
to use "-S", but hopefully point (1) above will get rid of most of the
confusion, and those who follow the link want to learn all about diff.
As I mentioned in the other message, what --pickaxe achieves is very
different from what people would naturally want from --search, an
option that does not exist.

I do not mind a patch that adds a diffcore transformation that internally
generates a diff and searches the string given by the user in it, and
triggers that with --search option.  The transformation should come just
after (or before) the pickaxe in the call sequence inside diffcore_std();
name it diffcore_search() or something.

In retrospect, because --pickaxe was designed primarily for Porcelain use,
it was a mistake for it to have taken a short-and-sweet -S synonym.
quoted hunk
diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt
index 813a7b1..9276fae 100644
--- a/Documentation/diff-options.txt
+++ b/Documentation/diff-options.txt
@@ -176,7 +176,10 @@ override configuration settings.
 	number.
 
 -S<string>::
-	Look for differences that contain the change in <string>.
+	Look for differences that introduce or remove an instance of
+	<string>. Note that this is different than the string simply
+	appearing in diff output; see the 'pickaxe' entry in
+	linkgit:gitdiffcore[7] for more details.
Look for differences that change the number of occurrences of <string>?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help