git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Steven Grimm <koreth@midwinter.com>
Cc: Jan Hudec <bulb@ucw.cz>, Robert Boone <robert@rlb3.com>,
	git@vger.kernel.org
Subject: Re: Centralized processes in git
Date: Tue, 21 Aug 2007 02:13:36 -0400	[thread overview]
Message-ID: <20070821061336.GC7323@coredump.intra.peff.net> (raw)
In-Reply-To: <46CA3398.9060803@midwinter.com>

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

      parent reply	other threads:[~2007-08-21  6:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-20 18:30 Centralized processes in git Robert Boone
2007-08-20 19:29 ` Jan Hudec
2007-08-21  0:36   ` Steven Grimm
2007-08-21  0:40     ` Steven Grimm
2007-08-21  6:13     ` Jeff King [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070821061336.GC7323@coredump.intra.peff.net \
    --to=peff@peff.net \
    --cc=bulb@ucw.cz \
    --cc=git@vger.kernel.org \
    --cc=koreth@midwinter.com \
    --cc=robert@rlb3.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).