[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to configure git diff tool to use emacs diff tool
From: |
n179911 |
Subject: |
Re: How to configure git diff tool to use emacs diff tool |
Date: |
Wed, 30 Sep 2009 22:14:10 -0700 |
I tried you script. When I run it at command line with 2 different files:
$ /Users/paul/bin/ediff.sh src/ComposeMessageActivity.java src/NewActivity.java
it works.
But after i set that up to git merge.tool
$ git config --global merge.tool /Users/paul/bin/ediff.sh
$ git diff
It does not invoke the ediff. It still uses the shell diff tool.
Thank you for any idea.
On Wed, Sep 30, 2009 at 7:23 PM, Andreas Politz <politza@fh-trier.de> wrote:
> hap 497 <hap497@gmail.com> writes:
>
>> Hi,
>>
>> One can configure git merge tool to use vimdiff
>>
>> $git config --global merge.tool vimdiff
>>
>> How can I change it to use emacs diff? And is it possible to use
>> emacsclient for diff?
>> http://www.emacswiki.org/emacs/EmacsClient#toc1 (so that I can speed
>> things up by not launching a new emacs every time).
>>
>> Thank you.
>
> It seems obvious, how to do this. The emacs function is `ediff-files' and it
> takes 2 arguments, namely the files to run diff on. Combine this with
> the --eval option of emacs(client) in a shell.
>
> $ cat ~/bin/ediff
> #!/bin/sh
>
> emacsclient --eval "(ediff-files \"$1\" \"$2\")"
>
> -ap
>
>
>
>
- Re: How to configure git diff tool to use emacs diff tool,
n179911 <=