From: Eric Stegemoller <hidden> Date: 2016-06-15 22:47:07
Hello,
First off I am using Git for windows. I am trying to configure git to
use an external diff tool. I am nearly there. I have it launching the
correct program when "git difftool testfile.txt" is invoked. However, it
appears the file paths are not being passed. I suspect I may not be
using the $LOCAL and $REMOTE variables correctly. Below is how I have
configured things thus far. Any help or suggestions would be greatly
appreciated.
git config --global diff.tool TestTool
git config --global difftool.TestTool.cmd ""c:/TestTool/test.exe"
"$LOCAL" "$REMOTE""
git config --global difftool.prompt false
Thanks,
Eric
Try with quoting the " inside the config value:
git config --global difftool.TestTool.cmd "\"c:/TestTool/test.exe\"
\"$LOCAL\" \"$REMOTE\""
Bert
Thanks, but this did not solve it. Interestingly, I have captured the
command line that is sent out by GIT and it is calling the correct
program but not adding anything to the command line. So, nothing is
there. Seeing this I have been experimenting around with the parameters
and I still it is calling the correct program but sending a blank
command line. Any suggestions on how to pursue this?
Eric
Try with quoting the " inside the config value:
git config --global difftool.TestTool.cmd "\"c:/TestTool/test.exe\"
\"$LOCAL\" \"$REMOTE\""
Bert
Thanks, but this did not solve it. Interestingly, I have captured the
command line that is sent out by GIT and it is calling the correct
program but not adding anything to the command line. So, nothing is
there. Seeing this I have been experimenting around with the parameters
and I still it is calling the correct program but sending a blank
command line. Any suggestions on how to pursue this?
First thing I'd do is to call it with GIT_TRACE=1. If that does not help,
I would modify the source to see what is happening.
I see that you're on Windows, and I could imagine this to be a
Windows-specific problem.
Ciao,
Dscho
Try with quoting the " inside the config value:
git config --global difftool.TestTool.cmd "\"c:/TestTool/test.exe\"
\"$LOCAL\" \"$REMOTE\""
Bert
Thanks, but this did not solve it. Interestingly, I have captured the
command line that is sent out by GIT and it is calling the correct
program but not adding anything to the command line. So, nothing is
there. Seeing this I have been experimenting around with the parameters
and I still it is calling the correct program but sending a blank
command line. Any suggestions on how to pursue this?
Eric
I think shell is to blame here.
Try editing ~/.gitconfig by hand.
I think the suggestion above forgot to escape the $ character.
Since the $'s weren't escaped, the shell interpolated the
$LOCAL, etc. variables and replaced them with the empty
string.
--
David
Try with quoting the " inside the config value:
git config --global difftool.TestTool.cmd "\"c:/TestTool/test.exe\"
\"$LOCAL\" \"$REMOTE\""
Bert
Thanks, but this did not solve it. Interestingly, I have captured the
command line that is sent out by GIT and it is calling the correct
program but not adding anything to the command line. So, nothing is
there. Seeing this I have been experimenting around with the parameters
and I still it is calling the correct program but sending a blank
command line. Any suggestions on how to pursue this?
Eric
I think shell is to blame here.
Try editing ~/.gitconfig by hand.
I think the suggestion above forgot to escape the $ character.
Since the $'s weren't escaped, the shell interpolated the
$LOCAL, etc. variables and replaced them with the empty
string.
Escaping the $'s did the trick! Thanks for everyones help.
Thanks,
Eric
From: Dr. Lars Hanke <hidden> Date: 2016-06-15 22:47:09
At work I have to write a lot of reports using M$-Word and found that
git is capable of managing these in an easy and meaningful way. However,
diffing of course does not work. I checked the web for solutions, but
somehow, I did not hit the correct search pattern.
I think it should be possible to define Word itself as the external diff
tool, as described in one of today's posts
> git config --global diff.tool TestTool
> git config --global difftool.TestTool.cmd "C:/Programme/Microsoft
Office/Office/Winword.exe" "\$LOCAL" "\$REMOTE" "\\mSomething"
i.e. open both versions and auto-execute a macro, which in turn will do
the compare. Well, just an idea, my knowledge about the M$ and Windoze
in general stuff is weak. Has this or something else been tried? Is
there any howto for this around?
Probably a similar approach could be chosen for OOo - for me as a
TeXnician, using git is straight forward anyhow. ;)
Regards,
- lars.
From: John Tapsell <hidden> Date: 2016-06-15 22:47:09
2009/8/4 Dr. Lars Hanke [off-list ref]:
At work I have to write a lot of reports using M$-Word and found that git is
capable of managing these in an easy and meaningful way. However, diffing of
course does not work. I checked the web for solutions, but somehow, I did
not hit the correct search pattern.
With the openoffice format, .odt, the file is just a zip file that you
can unzip either manually or with a commit hook (and rezip with a
checkout hook).
I think Microsoft's format .docx could do something similar.
That sort of diff will help git do it's job properly (e.g. you can
then see when a particular image has changed etc), but not useful for
a human to view.
I think a way to specify a difftool based on extension would certainly
be useful. Then distros could provide default useful difftools (for
comparing images, etc)
John
From: Johannes Sixt <hidden> Date: 2016-06-15 22:47:09
Dr. Lars Hanke schrieb:
At work I have to write a lot of reports using M$-Word and found that
git is capable of managing these in an easy and meaningful way. However,
diffing of course does not work. I checked the web for solutions, but
somehow, I did not hit the correct search pattern.
I use a dual solution. I defined catdoc as a textconv filter so that I can
see textual changes in gitk; and I use my winworddiff crude hack that I
posted here
http://thread.gmane.org/gmane.comp.version-control.git/59288
as a external diff program (note: *not* a difftool). With these, I can
limp along sufficiently.
-- Hannes
From: Dr. Lars Hanke <hidden> Date: 2016-06-15 22:47:09
quoted
At work I have to write a lot of reports using M$-Word and found that
git is capable of managing these in an easy and
I use a dual solution. I defined catdoc as a textconv filter so that I
can see textual changes in gitk; and I use my winworddiff crude hack
that I posted here
http://thread.gmane.org/gmane.comp.version-control.git/59288
as a external diff program (note: *not* a difftool). With these, I can
limp along sufficiently.
That sounds good. I'll try to setup this solution at work. I actually
started writing a similar thing in C# .NET, since I didn't know that you
could just add a .dot to supply a macro.
Thanks,
- lars.