git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Michael Witten <mfwitten@MIT.EDU>
Cc: git@vger.kernel.org
Subject: [PATCH] git-cvsserver runs hooks/post-update
Date: Wed, 05 Dec 2007 02:59:12 -0800	[thread overview]
Message-ID: <7v63zdtnjz.fsf@gitster.siamese.dyndns.org> (raw)

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

             reply	other threads:[~2007-12-05 10:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-05 10:59 Junio C Hamano [this message]
2007-12-05 11:07 ` [PATCH] git-cvsserver runs hooks/post-update Michael Witten
2007-12-05 11:18   ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7v63zdtnjz.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=mfwitten@MIT.EDU \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).