summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar James Bowes <jbowes@dangerouslyinc.com>2007-03-18 22:11:54 -0400
committerLibravatar Theodore Ts'o <tytso@mit.edu>2007-03-18 22:13:48 -0400
commit9cec65399d3575774910b21c1cfd762a5e88a245 (patch)
treeea9a9901df003f61123a0dc68980d9200e0f7ecb
parentUpdate main git.html page to point at 1.5.0.5 documentation (diff)
downloadtgif-9cec65399d3575774910b21c1cfd762a5e88a245.tar.xz
mergetool: Add support for vimdiff.
Signed-off-by: James Bowes <jbowes@dangerouslyinc.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
-rw-r--r--Documentation/config.txt2
-rw-r--r--Documentation/git-mergetool.txt2
-rwxr-xr-xgit-mergetool.sh8
3 files changed, 7 insertions, 5 deletions
diff --git a/Documentation/config.txt b/Documentation/config.txt
index 953acaee4c..66886424bb 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -460,7 +460,7 @@ merge.summary::
merge.tool::
Controls which merge resolution program is used by
gitlink:git-mergetool[l]. Valid values are: "kdiff3", "tkdiff",
- "meld", "xxdiff", "emerge"
+ "meld", "xxdiff", "emerge", "vimdiff"
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 ae69a0eb83..5baaaca0b5 100644
--- a/Documentation/git-mergetool.txt
+++ b/Documentation/git-mergetool.txt
@@ -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, and emerge.
+ kdiff3, tkdiff, meld, xxdiff, emerge, and vimdiff.
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 52386a5443..563c5c048f 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