Skip to content

Commit 677fbff

Browse files
raalkmlgitster
authored andcommitted
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>
1 parent 5be3b17 commit 677fbff

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

git-difftool.perl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,5 +82,11 @@ sub generate_command
8282
}
8383

8484
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.
8591
my $rc = system(generate_command());
8692
exit($rc | ($rc >> 8));

0 commit comments

Comments
 (0)