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

Re: RFH: gitk equivalent of "git log -p --full-diff file.cpp"

From
Jeff King <peff@peff.net>
Date
Oct 7, 2008, 02:27 UTC
Message-ID
<20081007022705.GA4496@coredump.intra.peff.net>
In-Reply-To
<279b37b20810061904n4f50f650l81590cb6fd239282@mail.gmail.com>
On Mon, Oct 06, 2008 at 07:04:14PM -0700, Eric Raible wrote:
> Anyway what I'm looking for is the gitk equivalent of:
> 
>     git log -p --full-diff file.cpp

Try turning off the option "Limit diffs to listed paths" in the preferences menu (or adding "set limitdiffs 0" to your ~/.gitk).

> That is to say: I want to see all commits which touch a given
> file along with all of the other files changed by that commit.
> 
>     gitk -p --full-diff EntryPoints.cpp

You definitely don't want the "-p" here, which is what is causing the extra diffs as part of the commit message. What happens is that gitk actually gets the diff separately from the history (since it gets each diff on the fly as you highlight it). The command line arguments go towards getting the history; so gitk isn't expecting parse any diff (and you will make gitk startup a _lot_ slower as it waits for git to generate the diffs for every revision).

The "--full-diff" is simply ignored, since the actual diff happens during a later command. In theory, gitk could remember your --full-diff and use it later. But I think for your use, the preference setting is probably good enough.

> PS - Aside from aliases, am I missing a simpler spelling of the above
>      git log command?

Nope, it looks right to me. At one point, we discussed a "full-diff" config option (and I think I maybe even posted a patch), but nobody really cared.

-Peff
Previous: Eric RaibleNext: Eric Raible
Message 2 of 3 in “RFH: gitk equivalent of "git log -p --full-diff file.cpp"”
  1. Eric RaibleOct 7, 2008
  2. Jeff KingOct 7, 2008
  3. Eric RaibleOct 7, 2008

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.