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

Re: t7800-difftool.sh failure on pu

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 29, 2012, 21:26 UTC
Message-ID
<7v7gy3qesv.fsf@alter.siamese.dyndns.org>
In-Reply-To
<4F74A604.3040402@ramsay1.demon.co.uk>
Ramsay Jones <ramsay@ramsay1.demon.co.uk> writes:
Show 26 quoted lines
> Hi Tim,
>
> With the current pu branch, I have t7800.3 (difftool ignores bad --tool values)
> failing on Linux (I haven't tried cygwin or mingw yet). The failure is caused
> by the test for the value of the exit code; for me the exit code is 9 not 1.
>
> I have investigated, briefly, and found *two* alternatives for a fix. ;-)
>
> The first option is to (effectively) revert commit 0440ed72 ("difftool: replace
> system call with Git::command_noisy", 22-03-2012), like so:
>
> -- >8 --
> diff --git a/git-difftool.perl b/git-difftool.perl
> index e1754ff..49613b1 100755
> --- a/git-difftool.perl
> +++ b/git-difftool.perl
> @@ -237,5 +237,7 @@ if (defined($dirdiff)) {
>  
>  	$ENV{GIT_PAGER} = '';
>  	$ENV{GIT_EXTERNAL_DIFF} = 'git-difftool--helper';
> -	git_cmd_try { Git::command_noisy(('diff', @ARGV)) } 'exit code %d';
> +	my @command = ('git', 'diff', @ARGV);
> +	my $rc = system(@command);
> +	exit($rc | ($rc >> 8));
>  }
> -- 8< --
I would prefer this, regardless of the issue.

I actually recall asking Tim about the exit status when I reviewed this change.

Previous: Ramsay JonesNext: David Aguilar
Message 2 of 7 in “t7800-difftool.sh failure on pu”
  1. Ramsay JonesMar 29, 2012
  2. Junio C HamanoMar 29, 2012
  3. David AguilarMar 31, 2012
  4. Tim HeniganApr 2, 2012
  5. Junio C HamanoApr 2, 2012
  6. Ramsay JonesApr 3, 2012
  7. Tim HeniganApr 2, 2012

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.