Thread (5 messages) flat view 5 messages, 4 authors, 2016-06-15

Re: Centralized processes in git

From: Jeff King <hidden>
Date: 2016-06-15 22:43:30

On Tue, Aug 21, 2007 at 08:36:40AM +0800, Steven Grimm wrote:
I wonder if it makes sense to expose a repository locking mechanism for this 
kind of application. The builtin git commands would test for the lock and 
block (waiting up to some configurable timeout) until it went away, but 
wouldn't necessarily ever actually lock things themselves. Or maybe a 
shared/exclusive lock (aka an rwlock) would be appropriate here; the 
repository-altering commands would grab a shared lock.
For this use case, I don't think you need to touch the core git commands
at all. Since we're just talking about a repo that people are pushing
into, why not just grab the lock in a hook before accepting the push?

That serializes the push, but each push can do arbitrary work while
holding the lock.

-Peff
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help