[POC PATCH] difftool: add support for the --interactive flag

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Signed-off-by: David Aguilar <davvid@xxxxxxxxx>
---

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

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux