Skip to content

Commit

Permalink
mergetool: don't require a work tree for --tool-help
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Charles Bailey authored and Junio C Hamano committed Oct 15, 2014
1 parent 1c7e2d2 commit 7bfb7c3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion git-mergetool.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 () {
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 7bfb7c3

Please sign in to comment.