I would like to be able to use ediff with \"git mergetool\".
I found some patches that alter the source code, which I don\'t want to do. Instead, I\'d like to add ed
Here's a variant of tarsius's setup. It handles when the ancestor file $BASE doesn't exist, and it allows you to abort the merge without trashing git's state about the conflict (by not automatically saving on exit). It also has newlines backslashed so that you can keep the formatting.
[mergetool.ediff]
cmd = emacs --eval \" \
(progn \
(setq ediff-quit-hook 'kill-emacs) \
(if (file-readable-p \\\"$BASE\\\") \
(ediff-merge-files-with-ancestor \\\"$LOCAL\\\" \\\"$REMOTE\\\" \
\\\"$BASE\\\" nil \\\"$MERGED\\\") \
(ediff-merge-files \\\"$LOCAL\\\" \\\"$REMOTE\\\" nil \\\"$MERGED\\\")))\"