git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] git-cvsserver runs hooks/post-update
@ 2007-12-05 10:59 Junio C Hamano
  2007-12-05 11:07 ` Michael Witten
  0 siblings, 1 reply; 3+ messages in thread
From: Junio C Hamano @ 2007-12-05 10:59 UTC (permalink / raw)
  To: Michael Witten; +Cc: git

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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-12-05 11:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-05 10:59 [PATCH] git-cvsserver runs hooks/post-update Junio C Hamano
2007-12-05 11:07 ` Michael Witten
2007-12-05 11:18   ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).