index 7d7f949f0da85ea124f67ead6f68fdd0ddc75d20..03726eee5e186552b3eb11d3c8b357c006caa9f1 100644 (file)
--- a/git.c
+++ b/git.c
alias_command);
new_argv = xrealloc(new_argv, sizeof(char *) *
- (count + *argcp + 1));
+ (count + *argcp));
/* insert after command name */
memcpy(new_argv + count, *argv + 1, sizeof(char *) * *argcp);
- new_argv[count+*argcp] = NULL;
*argv = new_argv;
*argcp += count - 1;
status = p->fn(argc, argv, prefix);
if (status)
- return status & 0xff;
+ return status;
/* Somebody closed stdout? */
if (fstat(fileno(stdout), &st))
* OK to return. Otherwise, we just pass along the status code.
*/
status = run_command_v_opt(argv, 0);
- if (status != -ERR_RUN_COMMAND_EXEC) {
- if (IS_RUN_COMMAND_ERR(status))
- die("unable to run '%s'", argv[0]);
- exit(-status);
- }
- errno = ENOENT; /* as if we called execvp */
+ if (status >= 0 || errno != ENOENT)
+ exit(status);
argv[0] = tmp;