From 677fbff88f368ed6ac52438ddbb530166ec1d5d1 Mon Sep 17 00:00:00 2001 From: Alex Riesen Date: Thu, 23 Apr 2009 21:18:09 +0200 Subject: Explain seemingly pointless use of system in difftool Portability reasons. Signed-off-by: Alex Riesen Signed-off-by: Junio C Hamano --- git-difftool.perl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/git-difftool.perl b/git-difftool.perl index bd828c2a6f..ba5e60a45e 100755 --- a/git-difftool.perl +++ b/git-difftool.perl @@ -82,5 +82,11 @@ sub generate_command } setup_environment(); + +# 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(generate_command()); exit($rc | ($rc >> 8)); -- cgit v1.2.3