git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [POC PATCH] difftool: add support for the --interactive flag
@ 2009-03-30  8:48 David Aguilar
  0 siblings, 0 replies; only message in thread
From: David Aguilar @ 2009-03-30  8:48 UTC (permalink / raw)
  To: gitster; +Cc: git, Ping Yin, David Aguilar

'git diff --interactive' already provides a prompt so
we should inhibit the difftool-helper prompt by default.

Signed-off-by: David Aguilar <davvid@gmail.com>
---

Based on top of [PATCH v2] difftool.prompt
and Ping's 'git diff --interactive' patch.

This is just an example of what we'd need to change
in git-difftool if git-diff grew --interactive.

 git-difftool.perl |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/git-difftool.perl b/git-difftool.perl
index 985dfe0..0e1efe6 100755
--- a/git-difftool.perl
+++ b/git-difftool.perl
@@ -53,6 +53,11 @@ sub generate_command
 			$skip_next = 0;
 			next;
 		}
+		if ($arg eq '--interactive') {
+			$ENV{GIT_DIFFTOOL_NO_PROMPT} = 'true';
+			delete $ENV{GIT_DIFFTOOL_PROMPT};
+			# pass-through
+		}
 		if ($arg eq '-t' || $arg eq '--tool') {
 			usage() if $#ARGV <= $idx;
 			$ENV{GIT_DIFF_TOOL} = $ARGV[$idx + 1];
-- 
1.6.2.1.303.g63699

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2009-03-30  8:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-30  8:48 [POC PATCH] difftool: add support for the --interactive flag 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).