summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Bailey <cbailey32@bloomberg.net>2014-10-11 01:39:37 -0700
committerJunio C Hamano <gitster@pobox.com>2014-10-15 14:12:20 -0700
commit7bfb7c357cd33a9f3a72d65b0df96e054d2a9f06 (patch)
treeb76313afc645ff845b9a343a1b68056ce60db782
parent1c7e2d23e4f22f1599570d9c5d0cc2f4156b5b74 (diff)
downloadgit-7bfb7c357cd33a9f3a72d65b0df96e054d2a9f06.tar.gz
mergetool: don't require a work tree for --tool-help
Signed-off-by: Charles Bailey <cbailey32@bloomberg.net> Signed-off-by: David Aguilar <davvid@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rwxr-xr-xgit-mergetool.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/git-mergetool.sh b/git-mergetool.sh
index 0ff6566a0e..8098d2dc07 100755
--- a/git-mergetool.sh
+++ b/git-mergetool.sh
@@ -10,11 +10,11 @@
USAGE='[--tool=tool] [--tool-help] [-y|--no-prompt|--prompt] [file to merge] ...'
SUBDIRECTORY_OK=Yes
+NONGIT_OK=Yes
OPTIONS_SPEC=
TOOL_MODE=merge
. git-sh-setup
. git-mergetool--lib
-require_work_tree
# Returns true if the mode reflects a symlink
is_symlink () {
@@ -377,6 +377,9 @@ prompt_after_failed_merge () {
done
}
+git_dir_init
+require_work_tree
+
if test -z "$merge_tool"
then
merge_tool=$(get_merge_tool "$merge_tool") || exit