aboutsummaryrefslogtreecommitdiff
path: root/git-difftool.perl
diff options
context:
space:
mode:
authorAlex Riesen <raa.lkml@gmail.com>2009-04-23 21:18:09 +0200
committerJunio C Hamano <gitster@pobox.com>2009-04-24 01:20:35 -0700
commit677fbff88f368ed6ac52438ddbb530166ec1d5d1 (patch)
tree341bc43e7c8414a7a6501524cf0f8e9b14ab432f /git-difftool.perl
parent5be3b17f094d832458238e4d2979cf9ab7118b6f (diff)
downloadgit-677fbff88f368ed6ac52438ddbb530166ec1d5d1.tar.gz
git-677fbff88f368ed6ac52438ddbb530166ec1d5d1.tar.xz
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>
Diffstat (limited to 'git-difftool.perl')
-rwxr-xr-xgit-difftool.perl6
1 files changed, 6 insertions, 0 deletions
diff --git a/git-difftool.perl b/git-difftool.perl
index bd828c2a6..ba5e60a45 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));