Re: disallowing push to currently checked-out branch
- From
Jay Soffian <jaysoffian@gmail.com>
- Date
- Feb 16, 2009, 21:42 UTC
- Message-ID
- <76718490902161342w176c2dfawb35e97fcaf934b05@mail.gmail.com>
- In-Reply-To
- <alpine.DEB.1.00.0902162103580.6289@intel-tinevez-2-302>
On Mon, Feb 16, 2009 at 3:09 PM, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
> What you are suggesting, though, is that the _pusher_ detaches the HEAD. > So the _local_ user will never know.
I'm going to be presumptuous here and say that I think that you're thinking about this the wrong way.
I would wager that when someone is pushing into a non-bare repo, it is very likely that the pusher and the local user are the same person. i.e., there are two common combinations: 1) a shared bare repo; 2) an individual (non-shared) non-bare repo.
I think it is the shared non-bare repo which is rather uncommon, and used mostly by advanced users or for specialized situations like publishing web-roots.
If I'm right, then I still think that what might better sense is:
non-bare repo non-bare repo ------------------- --------------------- refs/heads ---push--> refs/remotes/incoming ^ | | merge merge | | v refs/remotes/origin <--fetch-- refs/heads
Yes, you can set this up, but it is quite a few extra steps to do so. The defaults assume there is a bare repo that you're pulling/pushing from/to, hence the confusion for new users when that's not the scenario they are in.
But instead of all this talk, maybe I should pony up some RFC patches. :-)
j.