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

problem with git-diff-tree -S

From
Paul Mackerras <paulus@samba.org>
Date
Jun 30, 2005, 12:48 UTC
Message-ID
<17091.59948.453311.980846@cargo.ozlabs.ibm.com>

I'm trying to implement a find function in gitk that will find commits where the patch includes a particular string, using git-diff-tree. It's not doing what I expect - am I expecting the wrong thing, or is there a bug in git-diff-tree?

As an example, take commit 92a582ed2757456ca9599f8b4ea2064f2154eb02, "[IA64] sparse cleanup of TIOCA files". If I put that ID in a file called id and do:

git-diff-tree --stdin -p <id
the resulting patch includes the lines:

-uint64_t +static uint64_t

+int sn_topology_open(struct inode *inode, struct file *file); +int sn_topology_release(struct inode *inode, struct file *file);

+extern struct list_head tioca_list;
Now if I do:
git-diff-tree --stdin -r -s -Ssn_topology <id
I get the ID printed to stdout, but if I do:
git-diff-tree --stdin -r -s -Stioca <id

I get nothing on stdout, and similarly if I use "-Sstatic". What's going on?

Paul.
Next: Junio C Hamano
Message 1 of 2 in “problem with git-diff-tree -S”
  1. Paul MackerrasJun 30, 2005
  2. diffcore-pickaxe: switch to "counting" behaviour.Junio C Hamano, Jul 17, 2005

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.