{"thread":{"id":"18635","subject":"[POC PATCH] difftool: add support for the --interactive flag","startedAt":"2009-03-30T08:48:31Z","lastAt":"2009-03-30T08:48:31Z","messageCount":1,"participants":["David Aguilar"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"109858","messageId":"1238402911-19064-1-git-send-email-davvid@gmail.com","threadId":"18635","inReplyTo":null,"subject":"[POC PATCH] difftool: add support for the --interactive flag","fromName":"David Aguilar","fromEmail":"davvid@gmail.com","sentAt":"2009-03-30T08:48:31Z","receivedAt":"2009-03-30T08:48:31Z","isPatch":true,"sender":{"key":"davvid@gmail.com","avatar":"https://avatars.githubusercontent.com/u/13196?v=4"},"body":"'git diff --interactive' already provides a prompt so\nwe should inhibit the difftool-helper prompt by default.\n\nSigned-off-by: David Aguilar <davvid@gmail.com>\n---\n\nBased on top of [PATCH v2] difftool.prompt\nand Ping's 'git diff --interactive' patch.\n\nThis is just an example of what we'd need to change\nin git-difftool if git-diff grew --interactive.\n\n git-difftool.perl |    5 +++++\n 1 files changed, 5 insertions(+), 0 deletions(-)\n\ndiff --git a/git-difftool.perl b/git-difftool.perl\nindex 985dfe0..0e1efe6 100755\n--- a/git-difftool.perl\n+++ b/git-difftool.perl\n@@ -53,6 +53,11 @@ sub generate_command\n \t\t\t$skip_next = 0;\n \t\t\tnext;\n \t\t}\n+\t\tif ($arg eq '--interactive') {\n+\t\t\t$ENV{GIT_DIFFTOOL_NO_PROMPT} = 'true';\n+\t\t\tdelete $ENV{GIT_DIFFTOOL_PROMPT};\n+\t\t\t# pass-through\n+\t\t}\n \t\tif ($arg eq '-t' || $arg eq '--tool') {\n \t\t\tusage() if $#ARGV <= $idx;\n \t\t\t$ENV{GIT_DIFF_TOOL} = $ARGV[$idx + 1];\n-- \n1.6.2.1.303.g63699\n"}]}