]> git.ipfire.org Git - thirdparty/git.git/blobdiff - git.c
git-stash: don't complain when listing in a repo with no stash
[thirdparty/git.git] / git.c
diff --git a/git.c b/git.c
index c65e52f3db908f30fba85b9b57e5a72aebd45c3f..cfec5d70ee42852f3819fe46e99ebc70f089ccc7 100644 (file)
--- a/git.c
+++ b/git.c
@@ -251,11 +251,12 @@ static int run_command(struct cmd_struct *p, int argc, const char **argv)
                return 0;
 
        /* Check for ENOSPC and EIO errors.. */
-       if (ferror(stdout))
-               die("write failure on standard output");
-       if (fflush(stdout) || fclose(stdout))
+       if (fflush(stdout))
                die("write failure on standard output: %s", strerror(errno));
-
+       if (ferror(stdout))
+               die("unknown write failure on standard output");
+       if (fclose(stdout))
+               die("close failed on standard output: %s", strerror(errno));
        return 0;
 }