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

Re: Git hook commit similar to subversion start-commit hook

From
John Keeping <john@keeping.me.uk>
Date
Mar 5, 2013, 21:31 UTC
Message-ID
<20130305213102.GW7738@serenity.lan>
In-Reply-To
<20130305211440.GA9929@banach>
On Tue, Mar 05, 2013 at 10:14:42PM +0100, Jose Garcia Juanino wrote:
Show 9 quoted lines
> 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
Previous: Jose Garcia Juanino
Message 2 of 2 in “Git hook commit similar to subversion start-commit hook”
  1. Jose Garcia JuaninoMar 5, 2013
  2. John KeepingMar 5, 2013

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.