Thread (1 message) 1 message, 1 author, 2016-06-15

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

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:53:32

David Aguilar [off-list ref] writes:
On Wed, Apr 4, 2012 at 12:21 PM, Tim Henigan [off-list ref] wrote:
quoted
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.
quoted
-# 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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help