From: David Aguilar <davvid@gmail.com>
To: gitster@pobox.com
Cc: git@vger.kernel.org, Ping Yin <pkufranky@gmail.com>,
David Aguilar <davvid@gmail.com>
Subject: [POC PATCH] difftool: add support for the --interactive flag
Date: Mon, 30 Mar 2009 01:48:31 -0700 [thread overview]
Message-ID: <1238402911-19064-1-git-send-email-davvid@gmail.com> (raw)
'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
reply other threads:[~2009-03-30 8:49 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1238402911-19064-1-git-send-email-davvid@gmail.com \
--to=davvid@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=pkufranky@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).