X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=git.c;h=807d875ae06ce7bbf61bb846c5b4cb5a51855eba;hb=cfe370c6476392095bc3f18013d195b1cccd6184;hp=f4d53f40deb152db15f05460860af74b00ad9619;hpb=702beb3af0531bae95ab559fff043785614d53f2;p=git.git diff --git a/git.c b/git.c index f4d53f40d..807d875ae 100644 --- a/git.c +++ b/git.c @@ -199,7 +199,7 @@ static int handle_alias(int *argcp, const char ***argv) } 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 @@ 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)) @@ -256,11 +256,11 @@ static int run_builtin(struct cmd_struct *p, int argc, const char **argv) /* 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; }