user manual: answer some comments from Junio
[gitweb.git] / receive-pack.c
index 59b682c03af53fbfe600d063fa832f874440493c..c176d8fd008ad858a1e60e19e7bf3ea14d735eb5 100644 (file)
@@ -73,7 +73,9 @@ static int run_update_hook(const char *refname,
 
        if (access(update_hook, X_OK) < 0)
                return 0;
-       code = run_command(update_hook, refname, old_hex, new_hex, NULL);
+       code = run_command_opt(RUN_COMMAND_NO_STDIN
+               | RUN_COMMAND_STDOUT_TO_STDERR,
+               update_hook, refname, old_hex, new_hex, NULL);
        switch (code) {
        case 0:
                return 0;
@@ -187,7 +189,8 @@ static void run_update_post_hook(struct command *cmd)
                argc++;
        }
        argv[argc] = NULL;
-       run_command_v_opt(argc, argv, RUN_COMMAND_NO_STDIO);
+       run_command_v_opt(argv, RUN_COMMAND_NO_STDIN
+               | RUN_COMMAND_STDOUT_TO_STDERR);
 }
 
 /*
@@ -283,7 +286,7 @@ static const char *unpack(void)
                unpacker[0] = "unpack-objects";
                unpacker[1] = hdr_arg;
                unpacker[2] = NULL;
-               code = run_command_v_opt(1, unpacker, RUN_GIT_CMD);
+               code = run_command_v_opt(unpacker, RUN_GIT_CMD);
                switch (code) {
                case 0:
                        return NULL;