Re: disallowing push to currently checked-out branch
From: Jay Soffian <hidden>
Date: 2016-06-15 22:46:13
On Mon, Feb 16, 2009 at 3:09 PM, Johannes Schindelin [off-list ref] 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.