Skip to content

Commit

Permalink
Explain seemingly pointless use of system in difftool
Browse files Browse the repository at this point in the history
Portability reasons.

Signed-off-by: Alex Riesen <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>
  • Loading branch information
raalkml authored and gitster committed Apr 24, 2009
1 parent 5be3b17 commit 677fbff
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions git-difftool.perl
Original file line number Diff line number Diff line change
Expand Up @@ -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));

0 comments on commit 677fbff

Please sign in to comment.