X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=git-difftool.perl;h=ba5e60a45e2c4a8b54e6a58e656b3978dcb45633;hb=18432dfd889061cae4cbfe9b2407ba5851eea60e;hp=948ff7f6fd2dacc41f10b2b92f6ad752001ea3be;hpb=cef5775b9f640beb51b07f8a296cfcc9b11b9744;p=git.git diff --git a/git-difftool.perl b/git-difftool.perl index 948ff7f6f..ba5e60a45 100755 --- a/git-difftool.perl +++ b/git-difftool.perl @@ -82,4 +82,11 @@ sub generate_command } setup_environment(); -exec(generate_command()); + +# 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));