git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 1/5] Move post-update hook to after all other activity

From
Shawn O. Pearce <spearce@spearce.org>
Date
Mar 7, 2007, 21:50 UTC
Message-ID
<20070307215024.GA28649@spearce.org>

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>
---
 receive-pack.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/receive-pack.c b/receive-pack.c
index dda9854..d39aeba 100644
--- a/receive-pack.c
+++ b/receive-pack.c
@@ -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;
 }
-- 
1.5.0.3.895.g09890
Message 1 of 1 in “Move post-update hook to after all other activity”
  1. 1/5 Move post-update hook to after all other activityShawn O. Pearce, Mar 7, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.