threads / discuss / 15808

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

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

## tl;dr

3 messages between Oct 7, 2008 and Oct 7, 2008.

replies: 2people: 2as markdown or json

Eric Raible· Oct 7, 2008, 02:04 UTC · lore
Hello All -

Hopefully I'm just being dense, but there's a useful tortoisesvn feature that (so far) I haven't found in gitk. Blasphemy! Sniveling windoze luser, etc^2.

Anyway what I'm looking for is the gitk equivalent of:
    git log -p --full-diff file.cpp

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

doesn't quite do it - it treats the "extra" diffs as part of the commit msg. Anyone got more if a clue than me?

Thanks - Eric
PS - Aside from aliases, am I missing a simpler spelling of the above
     git log command?
Jeff King· Oct 7, 2008, 02:27 UTC · re: Eric Raible · lore

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

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
Eric Raible· Oct 7, 2008, 03:45 UTC · re: Jeff King · lore

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

On Mon, Oct 6, 2008 at 7:27 PM, Jeff King <peff@peff.net> wrote:
Show 8 quoted lines
> 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).
Yes, that's exactly what I was looking for.
Thanks - Eric

← back to recent threads