Re: disallowing push to currently checked-out branch
- From
Jay Soffian <jaysoffian@gmail.com>
- Date
- Feb 16, 2009, 18:48 UTC
- Message-ID
- <76718490902161048i3c19bb43h30b1cfc62dd9a61e@mail.gmail.com>
- In-Reply-To
- <alpine.DEB.1.00.0902161839120.6289@intel-tinevez-2-302>
On Mon, Feb 16, 2009 at 12:43 PM, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
Show 6 quoted lines
> And of course, you need a way to show the user all the updates the branch > went through while the HEAD was detached, so that the user has a chance of > understanding what happened in the meantime. > > So much additional work, just to fix up the shortcomings of the 'detach' > paradigm? I take it as a clear mark of a not-so-elegant design.
You did plant a seed in my head with PUSH_HEAD though, and I'm still thinking about it. :-)
I think the right thing is *not to detach*, but rather when pushing into a non-bare repo for it to go into refs/remotes. Too bad clone doesn't set it up this way by default when cloning from a non-bare repo[*]. That would probably make more sense for new users.
[*] Clone can't currently know it's cloning from a non-bare repo, at least via git://, as I recall...
j.