All of lore.kernel.org
 help / color / mirror / Atom feed
* External Diff Tool
@ 2009-07-29 20:16 Eric Stegemoller
  2009-07-29 20:45 ` Bert Wesarg
  0 siblings, 1 reply; 11+ messages in thread
From: Eric Stegemoller @ 2009-07-29 20:16 UTC (permalink / raw)
  To: git

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: External Diff Tool
  2009-07-29 20:16 External Diff Tool Eric Stegemoller
@ 2009-07-29 20:45 ` Bert Wesarg
  2009-07-30 19:22   ` Eric Stegemoller
  0 siblings, 1 reply; 11+ messages in thread
From: Bert Wesarg @ 2009-07-29 20:45 UTC (permalink / raw)
  To: Eric Stegemoller; +Cc: git

On Wed, Jul 29, 2009 at 22:16, Eric Stegemoller<estegemoller@idmcomp.com> wrote:
> Hello,
>
>  git config --global diff.tool TestTool
>  git config --global difftool.TestTool.cmd ""c:/TestTool/test.exe" "$LOCAL"
Try with quoting the " inside the config value:

  git config --global difftool.TestTool.cmd "\"c:/TestTool/test.exe\"
\"$LOCAL\" \"$REMOTE\""

Bert

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: External Diff Tool
  2009-07-29 20:45 ` Bert Wesarg
@ 2009-07-30 19:22   ` Eric Stegemoller
  2009-07-31 10:18     ` Johannes Schindelin
  2009-08-01 11:12     ` David Aguilar
  0 siblings, 2 replies; 11+ messages in thread
From: Eric Stegemoller @ 2009-07-30 19:22 UTC (permalink / raw)
  To: Bert Wesarg; +Cc: git

Bert Wesarg wrote:
> On Wed, Jul 29, 2009 at 22:16, Eric Stegemoller<estegemoller@idmcomp.com> wrote:
>   
>> Hello,
>>
>>  git config --global diff.tool TestTool
>>  git config --global difftool.TestTool.cmd ""c:/TestTool/test.exe" "$LOCAL"
>>     
> 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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: External Diff Tool
  2009-07-30 19:22   ` Eric Stegemoller
@ 2009-07-31 10:18     ` Johannes Schindelin
  2009-08-01 11:12     ` David Aguilar
  1 sibling, 0 replies; 11+ messages in thread
From: Johannes Schindelin @ 2009-07-31 10:18 UTC (permalink / raw)
  To: Eric Stegemoller; +Cc: Bert Wesarg, git

Hi,

On Thu, 30 Jul 2009, Eric Stegemoller wrote:

> Bert Wesarg wrote:
> > On Wed, Jul 29, 2009 at 22:16, Eric Stegemoller<estegemoller@idmcomp.com>
> > wrote:
> >   
> > > Hello,
> > >
> > >  git config --global diff.tool TestTool
> > >  git config --global difftool.TestTool.cmd ""c:/TestTool/test.exe"
> > >  "$LOCAL"
> > >     
> > 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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: External Diff Tool
  2009-07-30 19:22   ` Eric Stegemoller
  2009-07-31 10:18     ` Johannes Schindelin
@ 2009-08-01 11:12     ` David Aguilar
  2009-08-04 14:12       ` Eric Stegemoller
  1 sibling, 1 reply; 11+ messages in thread
From: David Aguilar @ 2009-08-01 11:12 UTC (permalink / raw)
  To: Eric Stegemoller; +Cc: Bert Wesarg, git

On Thu, Jul 30, 2009 at 03:22:25PM -0400, Eric Stegemoller wrote:
> Bert Wesarg wrote:
>> On Wed, Jul 29, 2009 at 22:16, Eric Stegemoller<estegemoller@idmcomp.com> wrote:
>>   
>>> Hello,
>>>
>>>  git config --global diff.tool TestTool
>>>  git config --global difftool.TestTool.cmd ""c:/TestTool/test.exe" "$LOCAL"
>> 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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: External Diff Tool
  2009-08-01 11:12     ` David Aguilar
@ 2009-08-04 14:12       ` Eric Stegemoller
  2009-08-04 17:02         ` Diffing M$-Word Dr. Lars Hanke
  0 siblings, 1 reply; 11+ messages in thread
From: Eric Stegemoller @ 2009-08-04 14:12 UTC (permalink / raw)
  To: David Aguilar; +Cc: Bert Wesarg, git

David Aguilar wrote:
> On Thu, Jul 30, 2009 at 03:22:25PM -0400, Eric Stegemoller wrote:
>   
>> Bert Wesarg wrote:
>>     
>>> On Wed, Jul 29, 2009 at 22:16, Eric Stegemoller<estegemoller@idmcomp.com> wrote:
>>>   
>>>       
>>>> Hello,
>>>>
>>>>  git config --global diff.tool TestTool
>>>>  git config --global difftool.TestTool.cmd ""c:/TestTool/test.exe" "$LOCAL"
>>>>         
>>> 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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Diffing M$-Word
  2009-08-04 14:12       ` Eric Stegemoller
@ 2009-08-04 17:02         ` Dr. Lars Hanke
  2009-08-04 17:10           ` Matthieu Moy
                             ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Dr. Lars Hanke @ 2009-08-04 17:02 UTC (permalink / raw)
  To: git

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.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Diffing M$-Word
  2009-08-04 17:02         ` Diffing M$-Word Dr. Lars Hanke
@ 2009-08-04 17:10           ` Matthieu Moy
  2009-08-04 17:10           ` John Tapsell
  2009-08-04 19:31           ` Johannes Sixt
  2 siblings, 0 replies; 11+ messages in thread
From: Matthieu Moy @ 2009-08-04 17:10 UTC (permalink / raw)
  To: Dr. Lars Hanke; +Cc: git

"Dr. Lars Hanke" <lars@lhanke.de> writes:

> 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.

antiword can be your friend.

See http://git.or.cz/gitwiki/GitTips#opendocument for some receipe
with OpenOffice documents, they apply equally well with .doc document
with antiword.

-- 
Matthieu

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Diffing M$-Word
  2009-08-04 17:02         ` Diffing M$-Word Dr. Lars Hanke
  2009-08-04 17:10           ` Matthieu Moy
@ 2009-08-04 17:10           ` John Tapsell
  2009-08-04 19:31           ` Johannes Sixt
  2 siblings, 0 replies; 11+ messages in thread
From: John Tapsell @ 2009-08-04 17:10 UTC (permalink / raw)
  To: Dr. Lars Hanke; +Cc: git

2009/8/4 Dr. Lars Hanke <lars@lhanke.de>:
> 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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Diffing M$-Word
  2009-08-04 17:02         ` Diffing M$-Word Dr. Lars Hanke
  2009-08-04 17:10           ` Matthieu Moy
  2009-08-04 17:10           ` John Tapsell
@ 2009-08-04 19:31           ` Johannes Sixt
  2009-08-05 19:35             ` Dr. Lars Hanke
  2 siblings, 1 reply; 11+ messages in thread
From: Johannes Sixt @ 2009-08-04 19:31 UTC (permalink / raw)
  To: Dr. Lars Hanke; +Cc: git

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Diffing M$-Word
  2009-08-04 19:31           ` Johannes Sixt
@ 2009-08-05 19:35             ` Dr. Lars Hanke
  0 siblings, 0 replies; 11+ messages in thread
From: Dr. Lars Hanke @ 2009-08-05 19:35 UTC (permalink / raw)
  To: Johannes Sixt; +Cc: git


>> 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.

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2009-08-05 19:36 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-29 20:16 External Diff Tool Eric Stegemoller
2009-07-29 20:45 ` Bert Wesarg
2009-07-30 19:22   ` Eric Stegemoller
2009-07-31 10:18     ` Johannes Schindelin
2009-08-01 11:12     ` David Aguilar
2009-08-04 14:12       ` Eric Stegemoller
2009-08-04 17:02         ` Diffing M$-Word Dr. Lars Hanke
2009-08-04 17:10           ` Matthieu Moy
2009-08-04 17:10           ` John Tapsell
2009-08-04 19:31           ` Johannes Sixt
2009-08-05 19:35             ` Dr. Lars Hanke

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.