commit: correctly respect skip-worktree bit
[gitweb.git] / git.c
diff --git a/git.c b/git.c
index 03726eee5e186552b3eb11d3c8b357c006caa9f1..4588a8bac21a12240c84eac4b24d68cb72920d80 100644 (file)
--- 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;
 
@@ -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;
 }
 
@@ -416,7 +416,7 @@ static void execv_dashed_external(const char **argv)
         * if we fail because the command is not found, it is
         * OK to return. Otherwise, we just pass along the status code.
         */
-       status = run_command_v_opt(argv, 0);
+       status = run_command_v_opt(argv, RUN_SILENT_EXEC_FAILURE);
        if (status >= 0 || errno != ENOENT)
                exit(status);