Git Mailing List Archive mirror
 help / color / mirror / Atom feed
From: Johannes Sixt <j6t@kdbg.org>
To: Sam Clymer <clymersam@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: Bug in git log -S
Date: Mon, 13 May 2024 07:55:38 +0200	[thread overview]
Message-ID: <8bfa50e3-996a-407b-9c02-a9fcacfebc4f@kdbg.org> (raw)
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


  reply	other threads:[~2024-05-13  5:55 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-13  1:40 Bug in git log -S Sam Clymer
2024-05-13  5:55 ` Johannes Sixt [this message]
2024-05-13 18:58   ` Sam Clymer
2024-05-13 21:01     ` Johannes Sixt
2024-05-15  6:34       ` Jeff King

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8bfa50e3-996a-407b-9c02-a9fcacfebc4f@kdbg.org \
    --to=j6t@kdbg.org \
    --cc=clymersam@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).