{"thread":{"id":"7141","subject":"[PATCH 1/5] Move post-update hook to after all other activity","startedAt":"2007-03-07T21:50:24Z","lastAt":"2007-03-07T21:50:24Z","messageCount":1,"participants":["Shawn O. Pearce"],"isPatch":true,"patchVersion":1,"patchTotal":5},"messages":[{"id":"36570","messageId":"20070307215024.GA28649@spearce.org","threadId":"7141","inReplyTo":null,"subject":"[PATCH 1/5] Move post-update hook to after all other activity","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2007-03-07T21:50:24Z","receivedAt":"2007-03-07T21:50:24Z","isPatch":true,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"As the post-update hook is meant to run after we have completed the\nreceipt of the pushed changes, and it might actually try to kick off\na `repack -a -d`, we should delay on invoking it until after we have\nremoved the *.keep file on the uploaded pack (if we kept the pack).\n\nSigned-off-by: Shawn O. Pearce <spearce@spearce.org>\n---\n receive-pack.c |    3 +--\n 1 files changed, 1 insertions(+), 2 deletions(-)\n\ndiff --git a/receive-pack.c b/receive-pack.c\nindex dda9854..d39aeba 100644\n--- a/receive-pack.c\n+++ b/receive-pack.c\n@@ -206,12 +206,10 @@ static void run_update_post_hook(struct command *cmd)\n static void execute_commands(void)\n {\n \tstruct command *cmd = commands;\n-\n \twhile (cmd) {\n \t\tupdate(cmd);\n \t\tcmd = cmd->next;\n \t}\n-\trun_update_post_hook(commands);\n }\n \n static void read_head_info(void)\n@@ -456,6 +454,7 @@ int main(int argc, char **argv)\n \t\t\tunlink(pack_lockfile);\n \t\tif (report_status)\n \t\t\treport(unpack_status);\n+\t\trun_update_post_hook(commands);\n \t}\n \treturn 0;\n }\n-- \n1.5.0.3.895.g09890\n"}]}