git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 07/14] t7800-difftool.sh: Fix a test failure on Cygwin

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 17, 2010, 19:59 UTC
Message-ID
<7vwrn8i31n.fsf@alter.siamese.dyndns.org>
In-Reply-To
<20101217023357.GA30083@gmail.com>
David Aguilar <davvid@gmail.com> writes:
Show 22 quoted lines
>> 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?
Previous: David AguilarNext: Ramsay Jones
Message 5 of 6 in “t7800-difftool.sh: Fix a test failure on Cygwin”
  1. 07/14 t7800-difftool.sh: Fix a test failure on CygwinRamsay Jones, Dec 14, 2010
  2. Junio C HamanoDec 14, 2010
  3. Ramsay JonesDec 16, 2010
  4. David AguilarDec 17, 2010
  5. Junio C HamanoDec 17, 2010
  6. Ramsay JonesDec 18, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.