Re: Be more careful about updating refs
- From
Sam Vilain <sam@vilain.net>
- Date
- Jan 23, 2008, 22:53 UTC
- Message-ID
- <4797C551.8020909@vilain.net>
- In-Reply-To
- <alpine.LFD.1.00.0801151546560.2806@woody.linux-foundation.org>
Linus Torvalds wrote:
Show 5 quoted lines
> Perhaps more importantly, it also refuses to update a branch head with a > non-commit object. I don't quite know *how* the stable series maintainers > were able to corrupt their repository to have a HEAD that pointed to a tag > rather than a commit object, but they did. Which results in a totally > broken repository that cannot be cloned or committed on.
I actually used this for a prototype system to allow push over git:// with secure authentication via PGP; basically it used an update hook that disallowed any ref change that wasn't a signed tag, and then in the post-update hook, moved the tag to an audit log refspace and put the referant commit in the refs/heads/* location.
The hooks (probably racy etc) can be seen under http://git.utsl.gen.nz/Tangram/hooks
Sam.