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
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
| Tomasz Kłoczko | Is it time for remove (crap) ALSA from kernel tree ? |
| Greg Kroah-Hartman | [PATCH 008/196] Chinese: add translation of volatile-considered-harmful.txt |
| David Miller | Slow DOWN, please!!! |
| Aubrey | O_DIRECT question |
git: | |
| Martin Langhoff | Re: pack operation is thrashing my server |
| Francis Moreau | emacs and git... |
| Mirko Stocker | Working with Git and CVS in a team. |
| Keith Packard | Re: parsecvs tool now creates git repositories |
| Chris Peterson | [PATCH] drivers/net: remove network drivers' last few uses of IRQF_SAMPLE_RANDOM |
| Natalie Protasevich | [BUG] New Kernel Bugs |
| Karen Xie | [RFC][PATCH 1/1] cxgb3i: cxgb3 iSCSI initiator |
| Jeff Garzik | [git patches] net driver updates for .27 |
| Jonathan Thornburg | svnd questions (encrypting all of a partition or disk) |
| Richard Stallman | Real men don't attack straw men |
| Daniel Ouellet | identifying sparse files and get ride of them trick available? |
| Brandon Lee | DELL PERC 5iR slow performance |
| high memory | 4 hours ago | Linux kernel |
| semaphore access speed | 7 hours ago | Applications and Utilities |
| the kernel how to power off the machine | 8 hours ago | Linux kernel |
| Easter Eggs in windows XP | 10 hours ago | Windows |
| Shared swap partition | 11 hours ago | Linux general |
| Root password | 11 hours ago | Linux general |
| Where/when DNOTIFY is used? | 13 hours ago | Linux kernel |
| How to convert Linux Kernel built-in module into a loadable module | 16 hours ago | Linux kernel |
| Linux 2.6.24 and I/O schedulers | 16 hours ago | Linux kernel |
| USB Driver -- Interrupt Polling -- A Little Help Please | 22 hours ago | Linux general |
