Re: [PATCH] update-hook: Major overhaul (handling tags, mainly).
- From
Junio C Hamano <junkio@cox.net>
- Date
- Jan 6, 2006, 22:37 UTC
- Message-ID
- <7vd5j5rnib.fsf@assigned-by-dhcp.cox.net>
- In-Reply-To
- <20060104161729.7FD9C5BE85@nox.op5.se>
Andreas Ericsson <ae@op5.se> writes:
Show 15 quoted lines
> This is the update hook we use in all our git-repos. > > It has some improvements over the original version, namely: > * Don't send every commit since dawn of time when adding a new tag. > * When updating an annotated tag, just send the diffs since the last tag. > * Add diffstat output for 'normal' commits (top) and annotated tags (bottom). > * Block un-annotated tags in shared repos. > > I'm a bit uncertain about that last one, but it demonstrates how to > disallow updates of a ref which we use, so I kept it. > > Note that git-describe is needed for the "changes since last annotated tag" > thing to work. > > Signed-off-by: Andreas Ericsson <ae@op5.se>
templates/hooks--* is a good place to showcase these "best current practices", but unfortunately we can have only one BCP per script there. If nobody objects I'd take this patch.
I have been wondering if we would want to have an "examples/" directory in the source tree.