execv_dashed_external: stop exiting with negative code
authorJeff King <peff@peff.net>
Sat, 7 Jan 2017 01:17:48 +0000 (20:17 -0500)
committerJunio C Hamano <gitster@pobox.com>
Mon, 9 Jan 2017 21:41:35 +0000 (13:41 -0800)
When we try to exec a git sub-command, we pass along the
status code from run_command(). But that may return -1 if we
ran into an error with pipe() or execve(). This tends to
work (and end up as 255 due to twos-complement wraparound
and truncation), but in general it's probably a good idea to
avoid negative exit codes for portability.

We can easily translate to the normal generic "128" code we
get when syscalls cause us to die.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
No differences found