summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7976ce1)
raw | patch | inline | side by side (parent: 7976ce1)
author | James Bowes <jbowes@dangerouslyinc.com> | |
Mon, 19 Mar 2007 02:11:54 +0000 (22:11 -0400) | ||
committer | Theodore Ts'o <tytso@mit.edu> | |
Mon, 19 Mar 2007 02:13:48 +0000 (22:13 -0400) |
Signed-off-by: James Bowes <jbowes@dangerouslyinc.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Documentation/config.txt | patch | blob | history | |
Documentation/git-mergetool.txt | patch | blob | history | |
git-mergetool.sh | patch | blob | history |
index 953acaee4c9b692802a4e98861dac8ceec315d54..66886424bb6c30f1829482230ff3da4810461f22 100644 (file)
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
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
index ae69a0eb83ea705b2564c5ed8d3f2ff1313ae8fd..5baaaca0b5433ae279b3961d72d0cffa8ca046e3 100644 (file)
-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 52386a5443ac19f1d8cbf7dc32c1237b2665b861..563c5c048f5f434b4208750de9f7b11aced36bfd 100755 (executable)
--- a/git-mergetool.sh
+++ b/git-mergetool.sh
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
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
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