git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <junkio@cox.net>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: git@vger.kernel.org
Subject: Re: How to set up a shared repository
Date: Wed, 21 Dec 2005 12:56:58 -0800	[thread overview]
Message-ID: <7vy82e5ftx.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <Pine.LNX.4.63.0512211919040.16640@wbgn013.biozentrum.uni-wuerzburg.de> (Johannes Schindelin's message of "Wed, 21 Dec 2005 19:27:19 +0100 (CET)")

Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:

> A. Setting up the umask
>
> 1. Separate repository box
>
> If you are lucky enough that you can afford a separate machine for the 
> shared repository: Good. Just make sure that the umask is set group 
> friendly, either by ensuring that (assuming the login shell is bash) 
> $HOME/.bash_profile contains the line
>
> 	umask 0002

I suspect a bash started from ssh noninteractive session does
not read .bash_profile --- you may want to check.

> 2. Some server accessible by ssh
>
> 	git-repo-config core.umask 0002

Not yet ;-)

> B. Making sure the index is not corrupted by a push
>
> 1. No checkout!
>
> You can use the shared repository just like you use CVS: no working 
> directory. To disallow a checkout, just do
>
> 	touch .git/index
> 	chmod a-rwx .git/index
>
> Every attempt to modify the index (which is invalid), will now result in 
> an error.

Arrrgh....what a hack.  But it is a good hack.

> 2. Ensure index and working directory consistency (no locking)
>
> If you want to be able to work on the project in the shared repository, 

I am very tempted to end this sentence with "please don't" ;-).

> create hooks, as follows:

Your update hook looks sane if too strict.  I do not think of
any reason to push and fast forward a branch that is not pointed
at by .git/HEAD.  Not that I encourage pushing into a non-naked
repository where an uncontrolled random development happens,
though.

> Note that I did not check if a push locks another push.

Although it does protect against stomping on each other by
read/do-work/re-read-and-swap cycle, push does not lock. If you
want to run a build from the post-update hook you need to
serialize the build yourself.

  reply	other threads:[~2005-12-21 20:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-21 18:27 How to set up a shared repository Johannes Schindelin
2005-12-21 20:56 ` Junio C Hamano [this message]
2005-12-21 21:36   ` Johannes Schindelin

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=7vy82e5ftx.fsf@assigned-by-dhcp.cox.net \
    --to=junkio@cox.net \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    /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).