git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] mergetool: don't require a work tree for --tool-help
@ 2014-07-19 16:35 Charles Bailey
  2014-07-19 16:35 ` [PATCH 2/2] difftool: don't assume that default sh is sane Charles Bailey
  0 siblings, 1 reply; 6+ messages in thread
From: Charles Bailey @ 2014-07-19 16:35 UTC (permalink / raw)
  To: git, David Aguilar

From: Charles Bailey <cbailey32@bloomberg.net>

Signed-off-by: Charles Bailey <cbailey32@bloomberg.net>
---
You can call git difftool --tool-help outside of a work tree but not
mergetool --tool-help but there's not real reason for this restriction
and it can be easily relaxed by deferring the require_work_tree call
until after the options have been parsed.

 git-mergetool.sh | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/git-mergetool.sh b/git-mergetool.sh
index 9a046b7..e969dd0 100755
--- a/git-mergetool.sh
+++ b/git-mergetool.sh
@@ -14,7 +14,6 @@ OPTIONS_SPEC=
 TOOL_MODE=merge
 . git-sh-setup
 . git-mergetool--lib
-require_work_tree
 
 # Returns true if the mode reflects a symlink
 is_symlink () {
@@ -372,6 +371,8 @@ prompt_after_failed_merge () {
 	done
 }
 
+require_work_tree
+
 if test -z "$merge_tool"
 then
 	# Check if a merge tool has been configured
-- 
2.0.2.611.g8c85416

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-07-29  8:02 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-19 16:35 [PATCH 1/2] mergetool: don't require a work tree for --tool-help Charles Bailey
2014-07-19 16:35 ` [PATCH 2/2] difftool: don't assume that default sh is sane Charles Bailey
2014-07-19 17:21   ` John Keeping
2014-07-19 18:29     ` Charles Bailey
2014-07-29  7:53   ` David Aguilar
2014-07-29  8:03     ` David Aguilar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).