Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Invoking external difftool from git-gui?

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?

like image 747
Debajit Avatar asked Aug 29 '12 02:08

Debajit


1 Answers

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

git-gui Tools->Add dialog difftool setup

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.

like image 53
genpfault Avatar answered Oct 11 '22 12:10

genpfault