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

Re: git log -S doesn't search stash WIPs

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Feb 8, 2008, 12:18 UTC
Message-ID
<alpine.LSU.1.00.0802081208580.11591@racer.site>
In-Reply-To
<57518fd10802080246p4a929b62tc6e260a16d3587@mail.gmail.com>
Hi,
On Fri, 8 Feb 2008, Jonathan del Strother wrote:
> "git log --all -Sfoo" doesn't find strings introduced in stash WIP
> commits, only the stash index.
It is a little unfortunate that a stash will do this:
HEAD ------- stash
    \       /
      index

In other words, the index will be "committed" as a regular commit, but the working directory will actually be a "merge commit".

So you need to add "--cc" to see the commit.

Further, the stash is not just a branch. The stash is actually a stack of reflogs. So could you try again, with

	$ git log --cc -Sfoo --walk-reflogs stash
?

Hth, Dscho

Previous: Jonathan del StrotherNext: Jonathan del Strother
Message 2 of 3 in “git log -S doesn't search stash WIPs”
  1. Jonathan del StrotherFeb 8, 2008
  2. Johannes SchindelinFeb 8, 2008
  3. Jonathan del StrotherFeb 9, 2008

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.