Re: [PATCH v4] Allow update hooks to update refs on their own.
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Dec 3, 2007, 11:47 UTC
- Message-ID
- <Pine.LNX.4.64.0712031146520.27959@racer.site>
- In-Reply-To
- <20071203040108.GS14735@spearce.org>
Hi,
On Sun, 2 Dec 2007, Shawn O. Pearce wrote:
Show 11 quoted lines
> Steven Grimm <koreth@midwinter.com> wrote: > > This is useful in cases where a hook needs to modify an incoming commit > > in some way, e.g., fixing whitespace errors, adding an annotation to > > the commit message, noting the location of output from a profiling tool, > > or committing to an svn repository using git-svn. > ... > > +/* Update hook exit code: hook has updated ref on its own */ > > +#define EXIT_CODE_REF_UPDATED 100 > > Hmm. I would actually rather move the ref locking to before we run > the update hook, so the ref is locked *while* the hook executes.
Would that not mean that you cannot use update-ref to update the ref, since that wants to use the same lock?
Ciao, Dscho