Skip to content

Commit 7bfb7c3

Browse files
hashplinggitster
authored andcommitted
mergetool: don't require a work tree for --tool-help
Signed-off-by: Charles Bailey <[email protected]> Signed-off-by: David Aguilar <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 1c7e2d2 commit 7bfb7c3

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

git-mergetool.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@
1010

1111
USAGE='[--tool=tool] [--tool-help] [-y|--no-prompt|--prompt] [file to merge] ...'
1212
SUBDIRECTORY_OK=Yes
13+
NONGIT_OK=Yes
1314
OPTIONS_SPEC=
1415
TOOL_MODE=merge
1516
. git-sh-setup
1617
. git-mergetool--lib
17-
require_work_tree
1818

1919
# Returns true if the mode reflects a symlink
2020
is_symlink () {
@@ -377,6 +377,9 @@ prompt_after_failed_merge () {
377377
done
378378
}
379379

380+
git_dir_init
381+
require_work_tree
382+
380383
if test -z "$merge_tool"
381384
then
382385
merge_tool=$(get_merge_tool "$merge_tool") || exit

0 commit comments

Comments
 (0)