Skip to content

Commit

Permalink
Move post-update hook to after all other activity
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Shawn O. Pearce authored and Junio C Hamano committed Mar 7, 2007
1 parent 84da035 commit 8e663d9
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions receive-pack.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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;
}

0 comments on commit 8e663d9

Please sign in to comment.