summaryrefslogtreecommitdiff
path: root/git.c
diff options
context:
space:
mode:
authorLibravatar Johannes Sixt <j6t@kdbg.org>2009-07-05 20:57:46 +0200
committerLibravatar Junio C Hamano <gitster@pobox.com>2009-07-05 12:16:26 -0700
commit47e3de0e7968a4176e2c54a36b214d3e7b24ad15 (patch)
tree0d24466e12853253e4f6dea495272a9e6817a14c /git.c
parentRemove filename from conflict markers (diff)
downloadtgif-47e3de0e7968a4176e2c54a36b214d3e7b24ad15.tar.xz
MinGW: truncate exit()'s argument to lowest 8 bits
For some reason, MinGW's bash cannot reliably detect failure of the child process if a negative value is passed to exit(). This fixes it by truncating the exit code in all calls of exit(). This issue was worked around in run_builtin() of git.c (2488df84 builtin run_command: do not exit with -1, 2007-11-15). This workaround is no longer necessary and is reverted. Suggested-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Johannes Sixt <j6t@kdbg.org> 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 f4d53f40de..65ed733fda 100644
--- a/git.c
+++ b/git.c
@@ -245,7 +245,7 @@ static int run_builtin(struct cmd_struct *p, int argc, const char **argv)
status = p->fn(argc, argv, prefix);
if (status)
- return status & 0xff;
+ return status;
/* Somebody closed stdout? */
if (fstat(fileno(stdout), &st))