git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: David Aguilar <davvid@gmail.com>
Cc: Ramsay Jones <ramsay@ramsay1.demon.co.uk>,
	Junio C Hamano <gitster@pobox.com>,
	GIT Mailing-list <git@vger.kernel.org>
Subject: Re: [PATCH 07/14] t7800-difftool.sh: Fix a test failure on Cygwin
Date: Fri, 17 Dec 2010 11:59:16 -0800	[thread overview]
Message-ID: <7vwrn8i31n.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <20101217023357.GA30083@gmail.com> (David Aguilar's message of "Thu\, 16 Dec 2010 18\:33\:59 -0800")

David Aguilar <davvid@gmail.com> writes:

>> diff --git a/git-difftool.perl b/git-difftool.perl
>> index e95e4ad..ced1615 100755
>> --- a/git-difftool.perl
>> +++ b/git-difftool.perl
>> @@ -52,6 +52,7 @@ sub generate_command
>>  	my @command = (exe('git'), 'diff');
>>  	my $skip_next = 0;
>>  	my $idx = -1;
>> +	my $prompt = '';
>
> Would it be simpler to set $prompt = 1 and then
> flip it to 0 when -y | or --no-prompt is supplied?
> ...
>
> This would become:
>
> 	if ($prompt) {
> 		...
> 	}
> 	else {
> 		...
> 	}

But that is not what the patch does, is it?

Isn't it more like initializing $prompt to undef and then the above
condition becomes:

	if (!defined $prompt) {
        	; # nothing
        elsif ($prompt) {
		setenv PROMPT true
	} else {
		setenv NO_PROMPT true
	}

no?

  reply	other threads:[~2010-12-17 19:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-14 18:27 [PATCH 07/14] t7800-difftool.sh: Fix a test failure on Cygwin Ramsay Jones
2010-12-14 19:15 ` Junio C Hamano
2010-12-16 20:04   ` Ramsay Jones
2010-12-17  2:33 ` David Aguilar
2010-12-17 19:59   ` Junio C Hamano [this message]
2010-12-18 20:32     ` Ramsay Jones

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=7vwrn8i31n.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=davvid@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=ramsay@ramsay1.demon.co.uk \
    /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).