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

Re: Bug in git log -S

From
Johannes Sixt <j6t@kdbg.org>
Date
May 13, 2024, 05:55 UTC
Message-ID
<8bfa50e3-996a-407b-9c02-a9fcacfebc4f@kdbg.org>
In-Reply-To
<ED9E5AD9-D15D-4E63-AF80-209EAAEBAD5C@gmail.com>
Am 13.05.24 um 03:40 schrieb Sam Clymer:
> There is a bug in git log -S where it doesn’t find every instance of
> the search string.

-S does not search for *every* instance of the search string, but only for those that change the number of occurrences of the search string in the repository.

For example, if you have a commit that only moves a line of code around that contains the search string, i.e., it removes the search string in one place and adds it in another places, this commit will not be listed, because it does not change the number of times that the search string occurs in the repository.

There is also -G. Maybe it is what you are looking for?
-- Hannes
Previous: Sam ClymerNext: Sam Clymer
Message 2 of 5 in “Bug in git log -S”
  1. Sam ClymerMay 13, 2024
  2. Johannes SixtMay 13, 2024
  3. Sam ClymerMay 13, 2024
  4. Johannes SixtMay 13, 2024
  5. Jeff KingMay 15, 2024

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.