mirror of
https://github.com/git/git.git
synced 2024-10-28 21:07:52 +01:00
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>
This commit is contained in:
parent
80bbe72b76
commit
2488df84a2
1 changed files with 1 additions and 1 deletions
2
git.c
2
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);
|
status = p->fn(argc, argv, prefix);
|
||||||
if (status)
|
if (status)
|
||||||
return status;
|
return status & 0xff;
|
||||||
|
|
||||||
/* Somebody closed stdout? */
|
/* Somebody closed stdout? */
|
||||||
if (fstat(fileno(stdout), &st))
|
if (fstat(fileno(stdout), &st))
|
||||||
|
|
Loading…
Reference in a new issue