diff options
author | Johannes Sixt <johannes.sixt@telecom.at> | 2007-11-13 21:05:02 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2007-11-14 15:18:39 -0800 |
commit | 2488df84a28b5eaae5495a59e390b51874d60a03 (patch) | |
tree | 26d139eb8da8bd8fe01b52d8077959a859b621f9 | |
parent | 80bbe72b76ab91628b493b55ed74f6eec8432fed (diff) | |
download | git-2488df84a28b5eaae5495a59e390b51874d60a03.tar.gz git-2488df84a28b5eaae5495a59e390b51874d60a03.tar.xz |
builtin run_command: do not exit with -1.
There are shells that do not correctly detect an exit code of -1 as a
failure. We simply truncate the status code to the lower 8 bits.
Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r-- | git.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -256,7 +256,7 @@ static int run_command(struct cmd_struct *p, int argc, const char **argv) status = p->fn(argc, argv, prefix); if (status) - return status; + return status & 0xff; /* Somebody closed stdout? */ if (fstat(fileno(stdout), &st)) |