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
Junio C Hamano <gitster@pobox.com>
Date
Jul 15, 2015, 16:29 UTC
Message-ID
<xmqq8uahxu3e.fsf@gitster.dls.corp.google.com>
In-Reply-To
<CA+55aFzPvwAghGtA-WH8i1PcNe55XORokaXF9hNu7OUXBx++6Q@mail.gmail.com>
Linus Torvalds <torvalds@linux-foundation.org> writes:
Show 8 quoted lines
> That said, I do wonder if we should just make "-p" imply "--cc". Right
> now we have the kind of odd situation that "git log -p" doesn't show
> merge patches, but "git show <cmit>" does show them. And you kind of
> have to know a lot about git to know the "--cc" option.
>
> In fact, that "git show" behavior really is very subtle, but very
> useful. It comes from show_rev_tweak_rev(), which is a magic git-show
> thing.

I would think "git log -p" that implies "--cc" would be a good change, as long as there is an easy escape hatch to let us do what we have to do with a rather lengthy "git log -p --first-parent -m" (i.e. show the change relative to its first parent while traversing the first parent chain) today. Perhaps only when there is no explicit "-m" but "-p" is given, automatically enable "--cc", or something like that.

Previous: Linus TorvaldsNext: Linus Torvalds
Message 6 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.