Code

mergetool: add support for ECMerge
authorSteffen Prohaska <prohaska@zib.de>
Wed, 17 Oct 2007 17:16:12 +0000 (19:16 +0200)
committerShawn O. Pearce <spearce@spearce.org>
Thu, 18 Oct 2007 07:46:24 +0000 (03:46 -0400)
Add support to mergetool for ECMerge available from
http://www.elliecomputing.com/Products/merge_overview.asp

Signed-off-by: Steffen Prohaska <prohaska@zib.de>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Documentation/git-mergetool.txt
git-mergetool.sh

index 78b2f433b083147491b8570228e082db0fe15fb6..a26c260162cf6cbab922dfd6320b1d440d7090ca 100644 (file)
@@ -25,7 +25,7 @@ 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, vimdiff, gvimdiff, ecmerge, and opendiff
 +
 If a merge resolution program is not specified, 'git mergetool'
 will use the configuration variable merge.tool.  If the
index 4f89cbe8e6ce86175a56b400bdcc34576db34d28..94511f9d1ace4e41bd225cd25643b17770b075b1 100755 (executable)
@@ -250,6 +250,16 @@ merge_file () {
            check_unchanged
            save_backup
            ;;
+       ecmerge)
+           touch "$BACKUP"
+           if base_present; then
+               "$merge_tool_path" "$BASE" "$LOCAL" "$REMOTE" --mode=merge3 --to="$path"
+           else
+               "$merge_tool_path" "$LOCAL" "$REMOTE" --mode=merge2 --to="$path"
+           fi
+           check_unchanged
+           save_backup
+           ;;
        emerge)
            if base_present ; then
                "$merge_tool_path" -f emerge-files-with-ancestor-command "$LOCAL" "$REMOTE" "$BASE" "$(basename "$path")"
@@ -299,7 +309,7 @@ done
 
 valid_tool() {
        case "$1" in
-               kdiff3 | tkdiff | xxdiff | meld | opendiff | emerge | vimdiff | gvimdiff)
+               kdiff3 | tkdiff | xxdiff | meld | opendiff | emerge | vimdiff | gvimdiff | ecmerge)
                        ;; # happy
                *)
                        return 1