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

Can't find the revelant commit with git-log

From
FMFrancis Moreau <francis.moro@gmail.com>
Date
Jan 25, 2011, 09:01 UTC
Message-ID
<m2ipxd2w78.fsf@gmail.com>
Hello,
I'm trying to find out a commit which removed a function inside a file.

The project is the Linux kernel, and I'm trying to look for changes which happened between v2.6.27 and v2.6.28. The changes happened in the following file: drivers/pci/intel-iommu.c where a function has been removed:

   $ git --version
   git version 1.7.4.rc3
   $ cd ~/linux-2.6/drivers/pci/
   $ git grep blacklist v2.6.27 -- drivers/pci/intel-iommu.c
   $
No ouput... hmm, I know it's in... oh maybe the path is incorrect
   $ git git grep blacklist v2.6.27 -- intel-iommu.c
   v2.6.27:intel-iommu.c:static int blacklist_iommu(const struct dmi_system_id *id)
   v2.6.27:intel-iommu.c:          .callback = blacklist_iommu,

ah, so Git failed previously without any comments on the wrong path... maybe it should ?

So at that point I know that in the revision v2.6.27, there's a function called "blacklist_iommu" in drivers/pci/intel-iommu.c

Now take a look if it's still there in v2.6.28:
   $ git git grep blacklist v2.6.28 -- intel-iommu.c
   $
This time nothing is printed but I know that the command is correct.

So now I'm interested in looking for the commit which removed this function. Fo this I'm trying to use git-log(1):

   $ git log --full-history --follow -S'static int blacklist_iommu(const struct dmi_system_id *id)' v2.6.27..v2.6.28 -- intel-iommu.c
   $ echo $?
   0
I tried different options but it fails.

Also I found that passing the exact string to '-S' is annoying, are there any way to just pass a part of the string such as "-Sblacklist_iommu" ?

Sorry if I miss the revelant git-log's option, but there're so many...
-- 
Francis
Next: René Scharfe
Message 1 of 30 in “Can't find the revelant commit with git-log”
  1. Francis MoreauJan 25, 2011
  2. René ScharfeJan 25, 2011
  3. Francis MoreauJan 25, 2011
  4. Francis MoreauJan 26, 2011
  5. Johannes SixtJan 26, 2011
  6. Francis MoreauJan 26, 2011
  7. Sverre RabbelierJan 26, 2011
  8. Francis MoreauJan 26, 2011
  9. Sverre RabbelierJan 26, 2011
  10. Francis MoreauJan 26, 2011
  11. Junio C HamanoJan 26, 2011
  12. Francis MoreauJan 26, 2011
  13. René ScharfeJan 26, 2011
  14. René ScharfeJan 28, 2011
  15. Junio C HamanoJan 29, 2011
  16. René ScharfeJan 29, 2011
  17. Junio C HamanoJan 29, 2011
  18. René ScharfeJan 29, 2011
  19. Junio C HamanoFeb 1, 2011
  20. Junio C HamanoFeb 7, 2011
  21. René ScharfeFeb 10, 2011
  22. René ScharfeJan 29, 2011
  23. René ScharfeJan 28, 2011
  24. Francis MoreauJan 29, 2011
  25. René ScharfeJan 29, 2011
  26. Francis MoreauJan 29, 2011
  27. René ScharfeJan 29, 2011
  28. Francis MoreauJan 26, 2011
  29. René ScharfeJan 26, 2011
  30. Francis MoreauJan 26, 2011

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.