Skip to content

Commit 8e663d9

Browse files
spearceJunio C Hamano
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 84da035 commit 8e663d9

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

receive-pack.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,12 +206,10 @@ static void run_update_post_hook(struct command *cmd)
206206
static void execute_commands(void)
207207
{
208208
struct command *cmd = commands;
209-
210209
while (cmd) {
211210
update(cmd);
212211
cmd = cmd->next;
213212
}
214-
run_update_post_hook(commands);
215213
}
216214

217215
static void read_head_info(void)
@@ -456,6 +454,7 @@ int main(int argc, char **argv)
456454
unlink(pack_lockfile);
457455
if (report_status)
458456
report(unpack_status);
457+
run_update_post_hook(commands);
459458
}
460459
return 0;
461460
}

0 commit comments

Comments
 (0)