2014-09-22 66 views
5

如果我进入tig主视图,我会得到一个很好的提交和合并图。我更喜欢看合并提交到主干,但不同于正常提交tig,其中tig显示文件内容的完全差异,在合并提交时,它只显示差异视图中已更改文件的列表。我如何得到tig在合并提交上显示文件内容差异?如何在tig获得合并提交的适当差异

提交fb56223ec50cf659a308b3c9979c912881147689
参考文献:[主],{原点/主},{原点/ HEAD},朱朱-1.21-alpha1-229-gfb56223
合并:7e7c95d a017b5a
著者:且具机器人
AuthorDate :星期一09月22 1点22分03秒2014 0100
提交:且具机器人
CommitDate:星期一09月22日1点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/                                                           

apiserver/upgrading_root.go | 20 +++++++++++ ---------
cmd/juju/ssh.go | 15 +++++++++++ ----
cmd/juju/ssh_test.go | 24 ++++++++++++++++++++++++
3个文件已更改,46个插入(+),13个删除( - )

导航到个人文件(j/k)在视图中,按“Enter”查看文件差异,但按Enter键会显示“无法找到文件差异”错误消息。理想情况下,我只是看着合并提交的差异。

[更新]我通过与sysdig跟踪tig,它看起来像它做了以下哪些合并提交不会显示实际的差异。 混帐显示--encoding = UTF-8 --pretty =更充分--root --patch与 - 统计 - 显示,票据--no色fb56223ec50cf659a308b3c9979c912881147689 -

我想我在寻找在随后合并提交是解析父母的提交,然后像做以下 git的差异7e7c95d a017b5a

[更新]所以实际上的diff这里不正确的,因为这DIFF将是两个亲本之间,并且要包含更改然后合并本身,差异的最佳内容呈现似乎是

git diff fb56223^fb562 23

回答

6

原来,这是非常简单的通过外部命令集成,我把它放到〜/ .tigrc中,现在只需按7输入我正在查看的差异输出。

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