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

Re: [PATCH 8/9 v11] difftool: teach difftool to handle directory diffs

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 9, 2012, 18:02 UTC
Message-ID
<7v1unwyea7.fsf@alter.siamese.dyndns.org>
In-Reply-To
<CAJDDKr76eMiA4rOHQhar3aToVThDfbc8Ki5tr2PGU_UpDMAVeA@mail.gmail.com>
David Aguilar <davvid@gmail.com> writes:
Show 9 quoted lines
> On Wed, Apr 4, 2012 at 12:21 PM, Tim Henigan <tim.henigan@gmail.com> wrote:
>> diff --git a/git-difftool.perl b/git-difftool.perl
>> index d4fe998..5bb01e1 100755
>> --- a/git-difftool.perl
>> +++ b/git-difftool.perl
>> @@ -1,21 +1,29 @@
>>  #!/usr/bin/env perl
> ...
> I also think we should change the shebang line to #!/usr/bin/perl.

Good point; it would not make a difference in the end result, but consistency is good.

Show 19 quoted lines
>> -# ActiveState Perl for Win32 does not implement POSIX semantics of
>> -# exec* system call. It just spawns the given executable and finishes
>> -# the starting program, exiting with code 0.
>> -# system will at least catch the errors returned by git diff,
>> -# allowing the caller of git difftool better handling of failures.
>> -my $rc = system(@command);
>> -exit($rc | ($rc >> 8));
>> +       $ENV{GIT_PAGER} = '';
>> +       $ENV{GIT_EXTERNAL_DIFF} = 'git-difftool--helper';
>> +       my $rc = system(('git', 'diff', @ARGV));
>> +       exit($rc | ($rc >> 8));
>> +}
>
> 
> We went back and forth a few times on this section,
> eventually landing back on using system().
>
> Should we retain this comment to help future readers from
> having to re-learn it the hard way again?

Well, I kept typing "good point" but ended up agreeing with everything you said in your message, and removed all "Me too"s ;-).

Thanks for a thorough review.
Previous: David AguilarNext: Tim Henigan
Message 4 of 9 in “difftool: teach difftool to handle directory diffs”
  1. 8/9 difftool: teach difftool to handle directory diffsTim Henigan, Apr 4, 2012
  2. Tim HeniganApr 4, 2012
  3. David AguilarApr 9, 2012
  4. Junio C HamanoApr 9, 2012
  5. Tim HeniganApr 10, 2012
  6. Tim HeniganApr 10, 2012
  7. David AguilarApr 11, 2012
  8. Tim HeniganApr 11, 2012
  9. David AguilarApr 12, 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.