credential-libsecret: unlock locked secrets
[gitweb.git] / git.c
diff --git a/git.c b/git.c
index d0e04d5c97bd6497cdea97110873e8c8e65bcb64..c8fe6637dfcab2a03f98157a43d1a7cee25da954 100644 (file)
--- a/git.c
+++ b/git.c
@@ -588,17 +588,22 @@ static void execv_dashed_external(const char **argv)
        argv_array_pushf(&cmd.args, "git-%s", argv[0]);
        argv_array_pushv(&cmd.args, argv + 1);
        cmd.clean_on_exit = 1;
+       cmd.wait_after_clean = 1;
        cmd.silent_exec_failure = 1;
 
        trace_argv_printf(cmd.args.argv, "trace: exec:");
 
        /*
-        * if we fail because the command is not found, it is
-        * OK to return. Otherwise, we just pass along the status code.
+        * If we fail because the command is not found, it is
+        * OK to return. Otherwise, we just pass along the status code,
+        * or our usual generic code if we were not even able to exec
+        * the program.
         */
        status = run_command(&cmd);
-       if (status >= 0 || errno != ENOENT)
+       if (status >= 0)
                exit(status);
+       else if (errno != ENOENT)
+               exit(128);
 }
 
 static int run_argv(int *argcp, const char ***argv)