From: Junio C Hamano Date: Thu, 9 Jul 2009 07:59:32 +0000 (-0700) Subject: Merge branch 'js/run-command-updates' (early part) X-Git-Tag: v1.6.4-rc0~5 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/ce4f404c6f059abb4988f4549c6e46a3ba0d56ec?ds=inline;hp=-c Merge branch 'js/run-command-updates' (early part) * 'js/run-command-updates' (early part): MinGW: truncate exit()'s argument to lowest 8 bits --- ce4f404c6f059abb4988f4549c6e46a3ba0d56ec diff --combined git.c index 9acce91850,65ed733fda..807d875ae0 --- a/git.c +++ b/git.c @@@ -199,7 -199,7 +199,7 @@@ static int handle_alias(int *argcp, con } if (subdir && chdir(subdir)) - die("Cannot change to %s: %s", subdir, strerror(errno)); + die_errno("Cannot change to '%s'", subdir); errno = saved_errno; @@@ -245,7 -245,7 +245,7 @@@ static int run_builtin(struct cmd_struc status = p->fn(argc, argv, prefix); if (status) - return status & 0xff; + return status; /* Somebody closed stdout? */ if (fstat(fileno(stdout), &st)) @@@ -256,11 -256,11 +256,11 @@@ /* Check for ENOSPC and EIO errors.. */ if (fflush(stdout)) - die("write failure on standard output: %s", strerror(errno)); + die_errno("write failure on standard output"); if (ferror(stdout)) die("unknown write failure on standard output"); if (fclose(stdout)) - die("close failed on standard output: %s", strerror(errno)); + die_errno("close failed on standard output"); return 0; }