gitui icon indicating copy to clipboard operation
gitui copied to clipboard

Add a shortcut key to run external diff tool

Open exoton opened this issue 4 years ago • 8 comments

Is your feature request related to a problem? Please describe. I much prefer to use an external diff tool but I couldn't find an easy way to do that.

Describe the solution you'd like I'd like to press a key and open an external diff tool that I have configured in my .gitconfig.

Describe alternatives you've considered At the moment I press "e" to edit a file and I run the diff tool from my editor.

exoton avatar Aug 29 '21 20:08 exoton

can you provide an example .gitconfig entry for this?

extrawurst avatar Sep 02 '21 16:09 extrawurst

[diff]
	external = ~/bin/gitdiff
	tool = bc3
[difftool "bc3"]
	trustExitCode = true
[merge]
	tool = bc3
[mergetool "bc3"]
	trustExitCode = true

exoton avatar Sep 02 '21 22:09 exoton

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Dec 02 '21 02:12 stale[bot]

+1 for external diff tool

pixelblender avatar Dec 07 '21 07:12 pixelblender

Using meld diff viewer as an example

git config --global diff.tool meld

will result in git.config section:

[diff]
  tool = meld

Then in a directory git difftool will give a overview of all changed files one at a time. And git difftool filename will give a diff of only one file.

Especially the last option would be nice as an extra option under a key shortcut (T for diffTool ?) in the Status view 'panels'. The first option is less useful in my opinion.

giel avatar Mar 13 '22 14:03 giel

recently checked difftastic, and would like to be able to use a syntax aware diff tool.

happysalada avatar Mar 27 '22 15:03 happysalada

Is there any follow-up on this issue?

OnePieceJoker avatar Mar 31 '22 07:03 OnePieceJoker

It would be very nice to have this available.

I currently use the edit command in gitui to simulate this behavior, keeping a GIT_EDITOR in my environment.

export GIT_EDITOR="git difftool -y" (or something like that)

This doesn't work in all contexts, but it does work for unstaged changes in the status screen, which is where i feel it's most useful.

brianmcfadden avatar Jul 16 '22 13:07 brianmcfadden

This issue has been automatically marked as stale because it has not had any activity half a year. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jan 21 '23 07:01 stale[bot]

Would love difftastic support for this.

silicakes avatar May 31 '23 14:05 silicakes

My workflow is to review each file in Beyond Compare, staging it when it passes self-review. It would be wonderful to be able to trigger a single-file difftool through gitui, enabling me to make any last minute changes before staging. As it stands, I keep another git graphical client around for the purpose, while wholly preferring the excellent gitui for all of my other git work.

Thanks for the generosity of your time and skills.

mlabbe avatar Jun 15 '23 18:06 mlabbe

Yes, difftastic alone is a reason i would want to see it. Loving the work so far, but that would be the cherry on top.

therealchfkch avatar Jan 19 '24 08:01 therealchfkch

This is much needed. Right now it is really manual to have to go to another editor and open the same file to merge conflict. Would love to be able to launch that same editor within Gitui.

AnhQuanTrl avatar Feb 28 '24 11:02 AnhQuanTrl