git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: John Keeping <john@keeping.me.uk>
To: Jose Garcia Juanino <jjuanino@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: Git hook commit similar to subversion start-commit hook
Date: Tue, 5 Mar 2013 21:31:02 +0000	[thread overview]
Message-ID: <20130305213102.GW7738@serenity.lan> (raw)
In-Reply-To: <20130305211440.GA9929@banach>

On Tue, Mar 05, 2013 at 10:14:42PM +0100, Jose Garcia Juanino wrote:
> Is there any hook in Git similar to start-commit subversion hook? The
> requirements would be:
> 
> 1- A hook on the server side (as pre-receive)
> 2- It will execute the actions *before* the begin of transaction
> (pre-receive hook needs the references already pushed before).
> 
> For example, it would be useful to refuse a push if the server has a
> high load.

If you are using Gitolite[1] then a PRE_GIT trigger could do this.

With plain Git you can achieve the same by specifying a custom shell for
the users logging in and performing the custom check when
git-receive-pack is being executed.


[1] http://gitolite.com/gitolite

John

      reply	other threads:[~2013-03-05 21:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-05 21:14 Git hook commit similar to subversion start-commit hook Jose Garcia Juanino
2013-03-05 21:31 ` John Keeping [this message]

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=20130305213102.GW7738@serenity.lan \
    --to=john@keeping.me.uk \
    --cc=git@vger.kernel.org \
    --cc=jjuanino@gmail.com \
    /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).