summaryrefslogtreecommitdiff
path: root/git-mergetool.sh
diff options
context:
space:
mode:
authorDan McGee <dpmcgee@gmail.com>2007-06-06 01:19:47 (GMT)
committerTheodore Ts'o <tytso@mit.edu>2007-06-10 12:27:29 (GMT)
commit730b5b45fb8a7751106885d350466c197b671b1c (patch)
tree044bfa742a590ca404b1d92233a6eed7c6a7f6c0 /git-mergetool.sh
parente58db03bbee4af96e60b6ac88b84c1c11b8b037e (diff)
downloadgit-730b5b45fb8a7751106885d350466c197b671b1c.zip
git-730b5b45fb8a7751106885d350466c197b671b1c.tar.gz
git-730b5b45fb8a7751106885d350466c197b671b1c.tar.bz2
[PATCH] git-mergetool: Allow gvimdiff to be used as a mergetool
Signed-off-by: Dan McGee <dpmcgee@gmail.com> Acked-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'git-mergetool.sh')
-rwxr-xr-xgit-mergetool.sh12
1 files changed, 10 insertions, 2 deletions
diff --git a/git-mergetool.sh b/git-mergetool.sh
index bb21b03..c9a90cd 100755
--- a/git-mergetool.sh
+++ b/git-mergetool.sh
@@ -215,6 +215,12 @@ merge_file () {
check_unchanged
save_backup
;;
+ gvimdiff)
+ touch "$BACKUP"
+ gvimdiff -f -- "$LOCAL" "$path" "$REMOTE"
+ check_unchanged
+ save_backup
+ ;;
xxdiff)
touch "$BACKUP"
if base_present ; then
@@ -293,7 +299,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 | "")
+ kdiff3 | tkdiff | xxdiff | meld | opendiff | emerge | vimdiff | gvimdiff | "")
;; # happy
*)
echo >&2 "git config option merge.tool set to unknown tool: $merge_tool"
@@ -312,6 +318,8 @@ if test -z "$merge_tool" ; then
merge_tool=xxdiff
elif type meld >/dev/null 2>&1 && test -n "$DISPLAY"; then
merge_tool=meld
+ elif type gvimdiff >/dev/null 2>&1 && test -n "$DISPLAY"; then
+ merge_tool=gvimdiff
elif type opendiff >/dev/null 2>&1; then
merge_tool=opendiff
elif type emacs >/dev/null 2>&1; then
@@ -325,7 +333,7 @@ if test -z "$merge_tool" ; then
fi
case "$merge_tool" in
- kdiff3|tkdiff|meld|xxdiff|vimdiff|opendiff)
+ kdiff3|tkdiff|meld|xxdiff|vimdiff|gvimdiff|opendiff)
if ! type "$merge_tool" > /dev/null 2>&1; then
echo "The merge tool $merge_tool is not available"
exit 1