@matheusbsbs / matheus-bagliano / commits / 677fbff88f
Fork 0

Explain seemingly pointless use of system in difftool

Portability reasons. Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Alex Riesen committed Apr 23, 2009 at 21:18 UTC 677fbff88f368ed6ac52438ddbb530166ec1d5d1
1 file changed +6
git-difftool.perl
+6
@@ -82,5 +82,11 @@ sub generate_command
82 }
83
84 setup_environment();
85 +
86 +# ActiveState Perl for Win32 does not implement POSIX semantics of
87 +# exec* system call. It just spawns the given executable and finishes
88 +# the starting program, exiting with code 0.
89 +# system will at least catch the errors returned by git diff,
90 +# allowing the caller of git difftool better handling of failures.
91 my $rc = system(generate_command());
92 exit($rc | ($rc >> 8));