aboutsummaryrefslogtreecommitdiff
path: root/git.c
diff options
context:
space:
mode:
authorJohannes Sixt <johannes.sixt@telecom.at>2007-11-13 21:05:02 +0100
committerJunio C Hamano <gitster@pobox.com>2007-11-14 15:18:39 -0800
commit2488df84a28b5eaae5495a59e390b51874d60a03 (patch)
tree26d139eb8da8bd8fe01b52d8077959a859b621f9 /git.c
parent80bbe72b76ab91628b493b55ed74f6eec8432fed (diff)
downloadgit-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>
Diffstat (limited to 'git.c')
-rw-r--r--git.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/git.c b/git.c
index 4a250f7e8..37d99d6f5 100644
--- a/git.c
+++ b/git.c
@@ -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))