aboutsummaryrefslogtreecommitdiff
path: root/mergetools
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-02-07 14:41:57 -0800
committerJunio C Hamano <gitster@pobox.com>2013-02-07 14:41:57 -0800
commit55f56fee0765820d5c841e47b22f33f5a7253e16 (patch)
tree77f46ce5ac859508725ae00d0f60b95b7799b671 /mergetools
parentb9a5f6811d186ec2420df39e3ec8087c7166a636 (diff)
parent073678b8e6324a155fa99f40eee0637941a70a34 (diff)
downloadgit-55f56fee0765820d5c841e47b22f33f5a7253e16.tar.gz
git-55f56fee0765820d5c841e47b22f33f5a7253e16.tar.xz
Merge branch 'jk/mergetool'
Cleans up mergetool/difftool combo. * jk/mergetool: mergetools: simplify how we handle "vim" and "defaults" mergetool--lib: don't call "exit" in setup_tool mergetool--lib: improve show_tool_help() output mergetools/vim: remove redundant diff command git-difftool: use git-mergetool--lib for "--tool-help" git-mergetool: don't hardcode 'mergetool' in show_tool_help git-mergetool: remove redundant assignment git-mergetool: move show_tool_help to mergetool--lib
Diffstat (limited to 'mergetools')
-rw-r--r--mergetools/defaults22
-rw-r--r--mergetools/gvimdiff1
-rw-r--r--mergetools/gvimdiff21
-rw-r--r--mergetools/vimdiff (renamed from mergetools/vim)12
-rw-r--r--mergetools/vimdiff21
5 files changed, 5 insertions, 32 deletions
diff --git a/mergetools/defaults b/mergetools/defaults
deleted file mode 100644
index 21e63ecc3..000000000
--- a/mergetools/defaults
+++ /dev/null
@@ -1,22 +0,0 @@
-# Redefined by builtin tools
-can_merge () {
- return 0
-}
-
-can_diff () {
- return 0
-}
-
-diff_cmd () {
- status=1
- return $status
-}
-
-merge_cmd () {
- status=1
- return $status
-}
-
-translate_merge_tool_path () {
- echo "$1"
-}
diff --git a/mergetools/gvimdiff b/mergetools/gvimdiff
new file mode 100644
index 000000000..04a5bb0ea
--- /dev/null
+++ b/mergetools/gvimdiff
@@ -0,0 +1 @@
+. "$MERGE_TOOLS_DIR/vimdiff"
diff --git a/mergetools/gvimdiff2 b/mergetools/gvimdiff2
new file mode 100644
index 000000000..04a5bb0ea
--- /dev/null
+++ b/mergetools/gvimdiff2
@@ -0,0 +1 @@
+. "$MERGE_TOOLS_DIR/vimdiff"
diff --git a/mergetools/vim b/mergetools/vimdiff
index 619594ae4..39d032771 100644
--- a/mergetools/vim
+++ b/mergetools/vimdiff
@@ -1,14 +1,6 @@
diff_cmd () {
- case "$1" in
- gvimdiff|vimdiff)
- "$merge_tool_path" -R -f -d \
- -c 'wincmd l' -c 'cd $GIT_PREFIX' "$LOCAL" "$REMOTE"
- ;;
- gvimdiff2|vimdiff2)
- "$merge_tool_path" -R -f -d \
- -c 'wincmd l' -c 'cd $GIT_PREFIX' "$LOCAL" "$REMOTE"
- ;;
- esac
+ "$merge_tool_path" -R -f -d \
+ -c 'wincmd l' -c 'cd $GIT_PREFIX' "$LOCAL" "$REMOTE"
}
merge_cmd () {
diff --git a/mergetools/vimdiff2 b/mergetools/vimdiff2
new file mode 100644
index 000000000..04a5bb0ea
--- /dev/null
+++ b/mergetools/vimdiff2
@@ -0,0 +1 @@
+. "$MERGE_TOOLS_DIR/vimdiff"