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
$ /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.
Read the manual, especially `merge.tool' and `merge.<tool>.cmd'. I
never used git-merge, so I don't know how this ought to behave.
-ap
> 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?
I had another look at this. The library in emacs is called emerge,
which is already supported by git.
-ap
Goes into great detail about using diff, patch, etc.
Here it is:
$15.56: "Comparing and Merging Files with GNU diff and patch"
by David MacKenzie, Paul Eggert, and Richard Stallman
"Comparing and Merging Files with GNU diff and patch" nerdbooks
Paperback (6"x9"), 120 pages
Retail Price: $19.95 (£12.95 in UK)
ISBN: 0-9541617-5-0
Product details
* Paperback: 120 pages
* Publisher: Network Theory Limited (1 Jan 2003) <<<==========
* Language English
* ISBN-10: 0954161750
* ISBN-13: 978-0954161750
* Product Dimensions: 22.4 x 15.2 x 0.8 cm
* Average Customer Review: No customer reviews yet. Be the first.
david