Thread (5 messages) flat view 5 messages, 2 authors, 2016-06-15
DORMANTno replies

[PATCH v2 1/2] mergetool: don't require a work tree for --tool-help

From: David Aguilar <hidden>
Date: 2016-06-15 23:02:41
Subsystem: the rest · Maintainer: Linus Torvalds

From: Charles Bailey <redacted>

Signed-off-by: Charles Bailey <redacted>
Signed-off-by: David Aguilar <redacted>
---
Changes since v1:

NONGIT_OK=Yes was added to make it actually work outside of a git repo.

 git-mergetool.sh | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/git-mergetool.sh b/git-mergetool.sh
index 96a61ba..a502430 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 () {
@@ -378,6 +378,8 @@ prompt_after_failed_merge () {
 	done
 }
 
+require_work_tree
+
 if test -z "$merge_tool"
 then
 	# Check if a merge tool has been configured
-- 
2.1.2.377.g0e18f12
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help