如何在tig中获得合适提交的正确差异

kap*_*ilt 5 tig

如果我进入tig主视图,我会得到一个很好的提交和合并图.我更喜欢看看合并提交到主干但不像普通提交tig,其中tig显示带文件内容的完整差异,在合并提交时它只显示差异视图中已更改文件的列表.如何让tig在合并提交时显示文件内容diff?

commit fb56223ec50cf659a308b3c9979c912881147689
Refs:[master],{origin/master},{origin/HEAD},juju-1.21-alpha1-229-gfb56223
合并:7e7c95d a017b5a
作者:Juju bot作者
日期:Mon Sep 22 01:22:03 2014 +0100
承诺:Juju bot
CommitDate:Mon Sep 22 01:22:03 2014 +0100

Merge pull request #803 from mjs/check-ssh-api-methods-are-allowed-during-upgrade

cmd/juju: ensure that API calls used by "juju ssh" are allowed during upgrades

We recently had a regression where an API call required by "juju ssh" wasn't being allowed by the API server while upgrades are in progress. "juju ssh" is one of the few commands that is supposed to work during upgrades.                                                  

The Client used by "juju ssh" is now forced into an interface and this is checked using reflection against what the API server will allow during upgrades. Effectively, the compiler helps to check that the required API methods will be allowed.

http://reviews.vapour.ws/r/64/diff/                                                                                                                                                                                                                                           
Run Code Online (Sandbox Code Playgroud)

apiserver/upgrading_root.go | 20 +++++++++++ ---------
CMD /朱朱/ ssh.go | 15 +++++++++++ ----
CMD /朱朱/ ssh_test.go | 24 ++++++++++++++++++++++++
3档改变,46个插入(+),13个缺失( - )

导航到视图中的单个文件(j/k),按"Enter"查看文件差异,但按Enter键会出现"找不到文件差异"错误消息.理想情况下,我只是在查看合并提交的组合差异.

[更新]我用sysdig跟踪tig,它看起来像执行以下操作,在合并提交时不会显示实际的差异.git show --encoding = UTF-8 --pretty = fuller --root --patch-with-stat --show-notes --no-color fb56223ec50cf659a308b3c9979c912881147689 -

我想我正在寻找合并提交然后是解析父母提交然后做类似下面的git diff 7e7c95d a017b5a

[更新]所以差异实际上在这里是不正确的,因为差异将在两个父母之间,并且更多地包括变化然后合并本身,差异的最佳内容渲染似乎是

git diff fb56223 ^ fb56223

kap*_*ilt 6

事实证明这是非常简单的通过外部命令集成,我把它放到〜/ .tigrc中,现在只需按7就可以看到diff输出.

bind diff 7!git diff%(commit)^%(commit)