Invoking external difftool from git-gui?

[亡魂溺海] 提交于 2019-12-22 06:52:36

问题


I have p4merge configured so that from the command line if I do a "git difftool ... " then the external diff tool opens up correctly.

I would like to open the external difftool from "git gui" instead of the command line. Is this possible?

Is seems git-gui allows one to add a tool. But it is unclear to me how to get it working. Any pointers?


回答1:


If you already have git difftool set up you can add an item for it:


Add Tool dialog transcription:

Tool Details box:
    Name: difftool
    Command: git difftool $FILENAME

Show a dialog before running: unchecked
    Ask the user to select a revision (sets $REVISION): unchecked
    Ask the user for additional arguments (sets $ARGS): unchecked

Don't show the command output window: checked
Run only if a diff is selected ($FILENAME not empty): checked
  Add globally: checked

Not super-useful though, since there doesn't seem to be a way to assign a hotkey or double-click action to it.

Might need to add a -y to the difftool command if it's asking you annoying questions.



来源:https://stackoverflow.com/questions/12169973/invoking-external-difftool-from-git-gui

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