@matheusbsbs / matheus-bagliano / commits / 8e663d9e90
Fork 0

Move post-update hook to after all other activity

As the post-update hook is meant to run after we have completed the receipt of the pushed changes, and it might actually try to kick off a `repack -a -d`, we should delay on invoking it until after we have removed the *.keep file on the uploaded pack (if we kept the pack). Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>

Shawn O. Pearce committed Mar 7, 2007 at 16:50 UTC 8e663d9e90d3d9efc9bb99ad597a6819efe625ce
1 file changed +1 -2
receive-pack.c
+1 -2
@@ -206,12 +206,10 @@ static void run_update_post_hook(struct command *cmd)
206 static void execute_commands(void)
207 {
208 struct command *cmd = commands;
209 -
209 while (cmd) {
210 update(cmd);
211 cmd = cmd->next;
212 }
214 - run_update_post_hook(commands);
213 }
214
215 static void read_head_info(void)
@@ -456,6 +454,7 @@ int main(int argc, char **argv)
454 unlink(pack_lockfile);
455 if (report_status)
456 report(unpack_status);
457 + run_update_post_hook(commands);
458 }
459 return 0;
460 }