Move post-update hook to after all other activity
[gitweb.git] / receive-pack.c
index dda98549ca47bd1a253a22ca389eced5d95f11ef..d39aebac1e33be7b15b5662e464d93f00243cdc0 100644 (file)
@@ -206,12 +206,10 @@ static void run_update_post_hook(struct command *cmd)
 static void execute_commands(void)
 {
        struct command *cmd = commands;
-
        while (cmd) {
                update(cmd);
                cmd = cmd->next;
        }
-       run_update_post_hook(commands);
 }
 
 static void read_head_info(void)
@@ -456,6 +454,7 @@ int main(int argc, char **argv)
                        unlink(pack_lockfile);
                if (report_status)
                        report(unpack_status);
+               run_update_post_hook(commands);
        }
        return 0;
 }