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

Re: Bug in git log -S

From
SCSam Clymer <clymersam@gmail.com>
Date
May 13, 2024, 18:58 UTC
Message-ID
<8B9537F6-A76A-4CF8-9EE4-2CC3C98D5784@gmail.com>
In-Reply-To
<8bfa50e3-996a-407b-9c02-a9fcacfebc4f@kdbg.org>
There does seem to be a bug on my end. I am searching for “net8.0-windows” and it’s not finding an instance where it’s added. It is not a line of code that is moved around it is purely added so I think there is indeed something wrong with git log -S.
Please let me know if I can be of help in resolving this.

Many thanks, Sam Clymer

Show 19 quoted lines
> On May 13, 2024, at 1:55 AM, Johannes Sixt <j6t@kdbg.org> wrote:
> 
> 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: Johannes SixtNext: Johannes Sixt
Message 3 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.