How to open git difftool for multiple files in a single Bcomp3 window?

十年热恋 提交于 2019-12-10 11:41:52

问题


When using git difftool --tool=bc3 from Git-Bash I got a BC3 window for each file. But to see the next window I had to close the previous one.

I wanted to see all diffed files at the same time as tabs in a single BC3 window.


回答1:


I found the right hint on StackOverflow: #17736427.
Using git difftool --dir-diff (having BC3 configured as difftool) is OK for me.
Who wants to use this, may find the BC3 switch /expandall helpful.

My previous solution was, to call git-difftool recursively.
May be this trick is helpful for someone else. So I want to share it here.

Change your git-config like this:

[difftool "bc3_all"] cmd = "git difftool --tool=bc3_single \"$REMOTE\" &" [difftool "bc3_single"] cmd = "bcomp \"$REMOTE\" \"$LOCAL\""

My first attempt was to start BC3 directly as a background process:

[difftool "bc3"] cmd = "bcomp \"$REMOTE\" \"$LOCAL\" &"

It did not work, because $LOCAL is usually a temparary file.
When the BC3 window(s) show up, the $LOCAL file is already deleted.



来源:https://stackoverflow.com/questions/33897826/how-to-open-git-difftool-for-multiple-files-in-a-single-bcomp3-window

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!