Skip to content

Commit

Permalink
mergetool: add support for ECMerge
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Steffen Prohaska authored and Shawn O. Pearce committed Oct 18, 2007
1 parent e3fa2c7 commit ca8e6b7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Documentation/git-mergetool.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 11 additions & 1 deletion git-mergetool.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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")"
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit ca8e6b7

Please sign in to comment.