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

Re: git log fails to show all changes for a file

From
John Keeping <john@keeping.me.uk>
Date
Jul 14, 2015, 07:45 UTC
Message-ID
<20150714074508.GE1451@serenity.lan>
In-Reply-To
<20150714073035.GA22707@aepfle.de>
On Tue, Jul 14, 2015 at 09:30:35AM +0200, Olaf Hering wrote:
Show 12 quoted lines
> 
> I wonder why this command fails to show all commits that modify a given
> function: 
> 
>   linux.git $ git log -p -M --stat -- drivers/hv/channel_mgmt.c
> 
> With commit 1f656ff3fdddc2f59649cc84b633b799908f1f7b init_vp_index() has
> "const uuid_le *type_guid" already. And somewhere between commit
> d3ba720dd58cdf6630fee4b89482c465d5ad0d0f and the one above the "const"
> was added. But git log does not show this commit.
> 
> Why is that so, and whats the command to really show all and every change?

It was added in an evil merge (f9da455b93f6ba076935b4ef4589f61e529ae046), try:

	git log -p -M --stat --cc -- drivers/hv/channel_mgmt.c
Previous: Olaf HeringNext: Olaf Hering
Message 2 of 13 in “git log fails to show all changes for a file”
  1. Olaf HeringJul 14, 2015
  2. John KeepingJul 14, 2015
  3. Olaf HeringJul 14, 2015
  4. Andreas SchwabJul 14, 2015
  5. Linus TorvaldsJul 14, 2015
  6. Junio C HamanoJul 15, 2015
  7. Linus TorvaldsJul 15, 2015
  8. Junio C HamanoJul 15, 2015
  9. Linus TorvaldsJul 15, 2015
  10. Junio C HamanoJul 15, 2015
  11. Jeff KingJul 15, 2015
  12. Junio C HamanoJul 15, 2015
  13. Linus TorvaldsJul 15, 2015

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.