From: Sam Vilain <sam.vilain@catalyst.net.nz>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, Sam Vilain <sam.vilain@catalyst.net.nz>
Subject: [PATCH] git-mergetool: add support for ediff
Date: Sat, 30 Jun 2007 20:56:19 +1200 [thread overview]
Message-ID: <11831937822950-git-send-email-sam.vilain@catalyst.net.nz> (raw)
In-Reply-To: <11831937823756-git-send-email-sam.vilain@catalyst.net.nz>
There was emerge already but I much prefer this mode.
Signed-off-by: Sam Vilain <sam.vilain@catalyst.net.nz>
---
Documentation/config.txt | 3 ++-
Documentation/git-mergetool.txt | 3 ++-
git-mergetool.sh | 19 ++++++++++++++-----
3 files changed, 18 insertions(+), 7 deletions(-)
diff --git a/Documentation/config.txt b/Documentation/config.txt
index 50503e8..4661e24 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -550,7 +550,8 @@ merge.summary::
merge.tool::
Controls which merge resolution program is used by
gitlink:git-mergetool[l]. Valid values are: "kdiff3", "tkdiff",
- "meld", "xxdiff", "emerge", "vimdiff", "gvimdiff", and "opendiff".
+ "meld", "xxdiff", "emerge", "ediff", "vimdiff", "gvimdiff", and
+ "opendiff".
merge.verbosity::
Controls the amount of output shown by the recursive merge
diff --git a/Documentation/git-mergetool.txt b/Documentation/git-mergetool.txt
index 6c32c6d..1efe6e4 100644
--- a/Documentation/git-mergetool.txt
+++ b/Documentation/git-mergetool.txt
@@ -25,7 +25,8 @@ OPTIONS
-t or --tool=<tool>::
Use the merge resolution program specified by <tool>.
Valid merge tools are:
- kdiff3, tkdiff, meld, xxdiff, emerge, vimdiff, gvimdiff, and opendiff
+ kdiff3, tkdiff, meld, xxdiff, emerge, ediff, vimdiff, gvimdiff,
+ and opendiff
+
If a merge resolution program is not specified, 'git mergetool'
will use the configuration variable merge.tool. If the
diff --git a/git-mergetool.sh b/git-mergetool.sh
index 7b66309..6fda8af 100755
--- a/git-mergetool.sh
+++ b/git-mergetool.sh
@@ -258,6 +258,15 @@ merge_file () {
status=$?
save_backup
;;
+ ediff)
+ if base_present ; then
+ emacs --eval "(ediff-merge-files-with-ancestor \"$LOCAL\" \"$REMOTE\" \"$BASE\" nil \"$path\")"
+ else
+ emacs --eval "(ediff-merge-files \"$LOCAL\" \"$REMOTE\" nil \"$path\")"
+ fi
+ status=$?
+ save_backup
+ ;;
esac
if test "$status" -ne 0; then
echo "merge of $path failed" 1>&2
@@ -299,7 +308,7 @@ done
if test -z "$merge_tool"; then
merge_tool=`git-config merge.tool`
case "$merge_tool" in
- kdiff3 | tkdiff | xxdiff | meld | opendiff | emerge | vimdiff | gvimdiff | "")
+ kdiff3 | tkdiff | xxdiff | meld | opendiff | emerge | ediff | vimdiff | gvimdiff | "")
;; # happy
*)
echo >&2 "git config option merge.tool set to unknown tool: $merge_tool"
@@ -320,15 +329,15 @@ if test -z "$merge_tool" ; then
fi
fi
if echo "${VISUAL:-$EDITOR}" | grep 'emacs' > /dev/null 2>&1; then
- merge_tool_candidates="$merge_tool_candidates emerge"
+ merge_tool_candidates="$merge_tool_candidates emerge ediff"
fi
if echo "${VISUAL:-$EDITOR}" | grep 'vim' > /dev/null 2>&1; then
merge_tool_candidates="$merge_tool_candidates vimdiff"
fi
- merge_tool_candidates="$merge_tool_candidates opendiff emerge vimdiff"
+ merge_tool_candidates="$merge_tool_candidates opendiff ediff emerge vimdiff"
echo "merge tool candidates: $merge_tool_candidates"
for i in $merge_tool_candidates; do
- if test $i = emerge ; then
+ if test $i = emerge || test $i = ediff ; then
cmd=emacs
else
cmd=$i
@@ -351,7 +360,7 @@ case "$merge_tool" in
exit 1
fi
;;
- emerge)
+ emerge|ediff)
if ! type "emacs" > /dev/null 2>&1; then
echo "Emacs is not available"
exit 1
--
1.5.2.1.1131.g3b90
next prev parent reply other threads:[~2007-06-30 8:57 UTC|newest]
Thread overview: 55+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-30 8:56 a bunch of outstanding updates Sam Vilain
2007-06-30 8:56 ` [PATCH] repack: improve documentation on -a option Sam Vilain
2007-06-30 8:56 ` [PATCH] git-svn: use git-log rather than rev-list | xargs cat-file Sam Vilain
2007-06-30 8:56 ` [PATCH] git-svn: cache max revision in rev_db databases Sam Vilain
2007-06-30 8:56 ` [PATCH] GIT-VERSION-GEN: don't convert - delimiter to .'s Sam Vilain
2007-06-30 8:56 ` [PATCH] git-remote: document -n Sam Vilain
2007-06-30 8:56 ` [PATCH] git-remote: allow 'git-remote fetch' as a synonym for 'git fetch' Sam Vilain
2007-06-30 8:56 ` [PATCH] git-merge-ff: fast-forward only merge Sam Vilain
2007-06-30 8:56 ` Sam Vilain [this message]
2007-06-30 8:56 ` [PATCH] contrib/hooks: add post-update hook for updating working copy Sam Vilain
2007-06-30 8:56 ` [PATCH] git-repack: generational repacking (and example hook script) Sam Vilain
2007-07-03 3:36 ` Nicolas Pitre
2007-07-03 4:58 ` Sam Vilain
2007-07-03 14:45 ` Nicolas Pitre
2007-07-03 14:55 ` Shawn O. Pearce
2007-07-04 0:05 ` Sam Vilain
2007-07-04 1:01 ` Johannes Schindelin
2007-07-04 6:16 ` Sam Vilain
2007-07-04 7:02 ` Alex Riesen
2007-07-04 15:42 ` Nicolas Pitre
2007-06-30 17:19 ` [PATCH] contrib/hooks: add post-update hook for updating working copy Junio C Hamano
2007-07-01 22:30 ` Sam Vilain
2007-07-02 1:10 ` Junio C Hamano
2007-06-30 17:19 ` [PATCH] git-mergetool: add support for ediff Junio C Hamano
2007-07-01 22:33 ` Sam Vilain
2007-06-30 14:28 ` [PATCH] git-merge-ff: fast-forward only merge Johannes Schindelin
2007-06-30 18:32 ` Matthias Lederhofer
2007-06-30 17:19 ` [PATCH] git-remote: allow 'git-remote fetch' as a synonym for 'git fetch' Junio C Hamano
2007-06-30 11:12 ` [PATCH] git-remote: document -n Frank Lichtenheld
2007-06-30 17:19 ` [PATCH] GIT-VERSION-GEN: don't convert - delimiter to .'s Junio C Hamano
2007-07-11 10:49 ` Jakub Narebski
2007-07-01 3:50 ` [PATCH] git-svn: cache max revision in rev_db databases Junio C Hamano
2007-07-01 5:31 ` Eric Wong
2007-07-01 6:49 ` Junio C Hamano
2007-06-30 11:15 ` [PATCH] repack: improve documentation on -a option Frank Lichtenheld
2007-06-30 17:19 ` Junio C Hamano
2007-06-30 11:05 ` a bunch of outstanding updates Frank Lichtenheld
-- strict thread matches above, loose matches on Subject: below --
2007-06-29 1:00 [PATCH] git-mergetool: add support for ediff Sam Vilain
2007-06-29 1:31 ` Jason Sewall
2007-06-29 4:03 ` Theodore Tso
2007-07-02 2:04 ` Theodore Tso
2007-07-02 2:32 ` Junio C Hamano
2007-07-02 3:05 ` Theodore Tso
2007-07-02 4:49 ` Junio C Hamano
2007-07-02 14:48 ` Theodore Tso
2007-07-02 23:11 ` Junio C Hamano
2007-07-02 21:32 ` Sam Vilain
2007-07-02 21:58 ` Theodore Tso
2007-07-02 22:16 ` Theodore Tso
2007-07-02 23:19 ` Sam Vilain
2007-07-03 1:09 ` Theodore Tso
2007-07-03 6:27 ` Sam Vilain
2007-07-28 9:22 ` David Kastrup
2007-07-29 2:38 ` Theodore Tso
2007-07-29 8:54 ` David Kastrup
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=11831937822950-git-send-email-sam.vilain@catalyst.net.nz \
--to=sam.vilain@catalyst.net.nz \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).