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

[RFD] not grep but not log -S

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 13, 2026, 21:19 UTC
Message-ID
<xmqq4ileh822.fsf@gitster.g>

If you have a series of commits that record the contents of "what's cooking" reports (i.e., "git log origin/todo -- whats-cooking.txt" in your clone of this project), and have a specific topic name you are interested in (e.g., "jc/test-set-e-clean"), what's the easiest way to find out in which issues of the "what's cooking" report the topic appeared?

   $ git log -Sjc/test-set-e-clean -p whats-cooking.txt

would tell you when it appeared and when it went away, but does not mention anything about the (potentially) multiple issues the topic stayed in the report in between. Git being a tool to track contents but is primarily used to track _changes_ in contents, this may be unavoidable, but it is not very satisfying.

Looking for the string in each and every version, e.g.,
    $ git grep jc/test-set-e-clean $(printf "HEAD~%d " $(seq 0 20)) \
			whats-cooking.txt

may give something close to what I want, but it makes me feel dirty that I have to _guess_ how many is sufficient.

Next: Mirko Faina
Message 1 of 2 in “[RFD] not grep but not log -S”
  1. Junio C HamanoApr 13, 2026
  2. Mirko FainaApr 13, 2026

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.