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

[PATCH] git-cvsserver runs hooks/post-update

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 5, 2007, 10:59 UTC
Message-ID
<7v63zdtnjz.fsf@gitster.siamese.dyndns.org>

Although we have introduced post-receive, we have not deprecated post-update hook. This adds support for it to emulate receive-pack better.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
 * I'd like to have the updated cvsserver by 1.5.4-rc0 so I updated the
   series myself.  Ack, improvements, fixes?
 git-cvsserver.perl |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/git-cvsserver.perl b/git-cvsserver.perl
index 11f5127..ecded3b 100755
--- a/git-cvsserver.perl
+++ b/git-cvsserver.perl
@@ -1357,6 +1357,12 @@ sub req_ci
 		close $pipe || die "bad pipe: $! $?";
 	}
 
+	### Then hooks/post-update
+	$hook = $ENV{GIT_DIR}.'hooks/post-update';
+	if (-x $hook) {
+		system($hook, "refs/heads/$state->{module}");
+	}
+
     $updater->update();
 
     # foreach file specified on the command line ...
-- 
1.5.3.7-2134-g53f9
Next: Michael Witten
Message 1 of 3 in “git-cvsserver runs hooks/post-update”
  1. git-cvsserver runs hooks/post-updateJunio C Hamano, Dec 5, 2007
  2. Michael WittenDec 5, 2007
  3. Junio C HamanoDec 5, 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.