"git difftool --tool-help" and "git mergetool --tool-help" incorreclty list "vim" as being an unavailable tool. This is because they attempt to find a tool named according to the mergetool scriptlet instead of the Git- recognized tool name. vimdiff, vimdiff2, gvimdiff, and gvimdiff2 are all provided by the "vim" scriptlet. This required git-mergetool--lib to special-case it when setting up the tool. Remove the exception for "vim" and allow the scriptlets to be found naturally by using symlinks to a single "vimdiff" scriptlet. This causes the --tool-help option to correctly list vimdiff, vimdiff2, gvimdiff, and gvimdiff2 in its output. Signed-off-by: David Aguilar <davvid@xxxxxxxxx> --- git-mergetool--lib.sh | 9 +-------- mergetools/gvimdiff | 1 + mergetools/gvimdiff2 | 1 + mergetools/{vim => vimdiff} | 0 mergetools/vimdiff2 | 1 + 5 files changed, 4 insertions(+), 8 deletions(-) create mode 120000 mergetools/gvimdiff create mode 120000 mergetools/gvimdiff2 rename mergetools/{vim => vimdiff} (100%) create mode 120000 mergetools/vimdiff2 diff --git a/git-mergetool--lib.sh b/git-mergetool--lib.sh index 4c1e129..db8218a 100644 --- a/git-mergetool--lib.sh +++ b/git-mergetool--lib.sh @@ -44,14 +44,7 @@ valid_tool () { } setup_tool () { - case "$1" in - vim*|gvim*) - tool=vim - ;; - *) - tool="$1" - ;; - esac + tool="$1" mergetools="$(git --exec-path)/mergetools" # Load the default definitions diff --git a/mergetools/gvimdiff b/mergetools/gvimdiff new file mode 120000 index 0000000..2a72558 --- /dev/null +++ b/mergetools/gvimdiff @@ -0,0 +1 @@ +vimdiff \ No newline at end of file diff --git a/mergetools/gvimdiff2 b/mergetools/gvimdiff2 new file mode 120000 index 0000000..2a72558 --- /dev/null +++ b/mergetools/gvimdiff2 @@ -0,0 +1 @@ +vimdiff \ No newline at end of file diff --git a/mergetools/vim b/mergetools/vimdiff similarity index 100% rename from mergetools/vim rename to mergetools/vimdiff diff --git a/mergetools/vimdiff2 b/mergetools/vimdiff2 new file mode 120000 index 0000000..2a72558 --- /dev/null +++ b/mergetools/vimdiff2 @@ -0,0 +1 @@ +vimdiff \ No newline at end of file -- 1.8.1.1.367.g22b1720.dirty -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html