[PATCH] mergetool: Add support for vimdiff.

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <git@...>
Cc: <junkio@...>, <tytso@...>
Date: Sunday, March 18, 2007 - 6:28 pm

Signed-off-by: James Bowes <jbowes@dangerouslyinc.com>
---
 git-mergetool.sh |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/git-mergetool.sh b/git-mergetool.sh
index 52386a5..563c5c0 100755
--- a/git-mergetool.sh
+++ b/git-mergetool.sh
@@ -185,9 +185,9 @@ merge_file () {
 		mv -- "$BACKUP" "$path.orig"
 	    fi
 	    ;;
-	meld)
+	meld|vimdiff)
 	    touch "$BACKUP"
-	    meld -- "$LOCAL" "$path" "$REMOTE"
+	    $merge_tool -- "$LOCAL" "$path" "$REMOTE"
 	    if test "$path" -nt "$BACKUP" ; then
 		status=0;
 	    else
@@ -305,6 +305,8 @@ if test -z "$merge_tool" ; then
 	merge_tool=meld
     elif type emacs >/dev/null 2>&1; then
 	merge_tool=emerge
+    elif type vimdiff >/dev/null 2>&1; then
+	merge_tool=vimdiff
     else
 	echo "No available merge resolution programs available."
 	exit 1
@@ -312,7 +314,7 @@ if test -z "$merge_tool" ; then
 fi
 
 case "$merge_tool" in
-    kdiff3|tkdiff|meld|xxdiff)
+    kdiff3|tkdiff|meld|xxdiff|vimdiff)
 	if ! type "$merge_tool" > /dev/null 2>&1; then
 	    echo "The merge tool $merge_tool is not available"
 	    exit 1
-- 
1.5.0.3

-
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
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] mergetool: Add support for vimdiff., James Bowes, (Sun Mar 18, 6:28 pm)
Re: [PATCH] mergetool: Add support for vimdiff., Theodore Tso, (Sun Mar 18, 10:18 pm)