From: Junio C Hamano Date: Tue, 03 Mar 2009 16:42:12 GMT Subject: Re: [PATCH] doc: clarify how -S works Message-ID: <7v1vted0d7.fsf@gitster.siamese.dyndns.org> In-Reply-To: <20090303154041.GA31265@coredump.intra.peff.net> Jeff King 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. > 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:: > - Look for differences that contain the change in . > + Look for differences that introduce or remove an instance of > + . 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 ?