How to get the correct diff for merge in tig

If I got into the main view of tig, I get a good schedule of commits and merges. I would rather just see how the merge is fixed in the trunk, but unlike the usual tig commits, where tig shows the full diff with the contents of the file, when merging it just shows a list of modified files in the diff view. How to make tig display the contents of a diff file at compile time?

commit fb56223ec50cf659a308b3c9979c912881147689
Refs: [master], {origin / master}, {origin / HEAD}, juju-1.21-alpha1-229-gfb56223
Merger: 7e7c95d a017b5a
Posted by: Juju bot
AuthorDate: Mon Sep 22 01:22:03 2014 +0100
Commit: 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/ 

apiserver / upgradeing_root.go | 20 +++++++++++ ---------
cmd / juju / ssh.go | 15 +++++++++++ ----
cmd / juju / ssh_test.go | 24 +++++++++++++++++++++++++
3 files changed, 46 inserts (+), 13 deletions (-)

the transition to individual files (j / k) in the view says to press the 'Enter' button to view the diff file, but pressing enter receives the error message β€œCould not find diff file”. Ideally, I will just consider combo diff to fix the merge.

[update] . I traced through tig using sysdig, and it looks like it is doing the following, which when compiling the merge will not show the actual diff. git show --encoding = UTF-8 --pretty = fuller --root --patch-with-stat --show-notes --no-color fb56223ec50cf659a308b3c9979c912881147689 -

I assume that what I am looking for at the merge means it is parsing the parents and then doing something like the following git diff 7e7c95d a017b5a

[update] , so the difference is actually wrong here, since this diff will be between the two parents and will contain more changes than the merge itself, diff differs better content rendering,

git diff fb56223 ^ fb56223

+5
source share
1 answer

It turns out that this is quite simple thanks to the integration of external teams.

I threw this at ~/.tigrc :

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

and now just press 7 for the differences I'm looking for.

+6
source

Source: https://habr.com/ru/post/1203109/


All Articles