git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
John Tapsell <johnflux@gmail.com>
Date
Mar 3, 2009, 17:39 UTC
Message-ID
<43d8ce650903030939u73f09171uf4041b6d9824b698@mail.gmail.com>
In-Reply-To
<20090303171138.GA454@coredump.intra.peff.net>
2009/3/3 Jeff King <peff@peff.net>:
Show 21 quoted lines
> On Tue, Mar 03, 2009 at 08:42:12AM -0800, Junio C Hamano wrote:
>
>> 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.
>
> Hmm. I actually like the pickaxe behavior and find it useful for
> searching. IOW, I consider it a porcelain feature, just perhaps not the
> one that some people are expecting.
>
>> >  -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>?
>
> Yes, that is technically correct. I was trying to find a wording that
> was a little less "this is literally what it does" and more "this is
> what you might find it useful for".

Is there any way to have an option to also match any line containing the string? That might be the best way to document it, as well as being very useful:

-s<string>
   Look for any additions, removals or changes in any line containing <string>
-S<string>
   Look only for any additions or removals of the <string> in any line
John
Previous: Jeff KingNext: Jeff King
Message 9 of 17 in “git log -Sfoo ignores indentation (whitespace?) changes...”
  1. Peter Valdemar Mørch (Lists)Mar 3, 2009
  2. Jeff KingMar 3, 2009
  3. doc: clarify how -S worksJeff King, Mar 3, 2009
  4. John TapsellMar 3, 2009
  5. Jeff KingMar 3, 2009
  6. John TapsellMar 3, 2009
  7. Junio C HamanoMar 3, 2009
  8. Jeff KingMar 3, 2009
  9. John TapsellMar 3, 2009
  10. Jeff KingMar 3, 2009
  11. Junio C HamanoMar 3, 2009
  12. Peter Valdemar Mørch (Lists)Mar 3, 2009
  13. Jeff KingMar 3, 2009
  14. Junio C HamanoMar 3, 2009
  15. Michael J GruberMar 3, 2009
  16. Jeff KingMar 3, 2009
  17. Junio C HamanoMar 3, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.