]> git.ipfire.org Git - thirdparty/git.git/blobdiff - git.c
Convert existing die(..., strerror(errno)) to die_errno()
[thirdparty/git.git] / git.c
diff --git a/git.c b/git.c
index 7d7f949f0da85ea124f67ead6f68fdd0ddc75d20..b035676e9392931655a97900d1aa2aef53facaf4 100644 (file)
--- a/git.c
+++ b/git.c
@@ -200,7 +200,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;
 
@@ -257,11 +257,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;
 }