Re: disallowing push to currently checked-out branch
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Feb 16, 2009, 17:43 UTC
- Message-ID
- <alpine.DEB.1.00.0902161839120.6289@intel-tinevez-2-302>
- In-Reply-To
- <49999ED6.7010608@gmail.com>
Hi,
On Mon, 16 Feb 2009, Sergio Callegari wrote:
Show 8 quoted lines
> Jeff King wrote: > > > If you set 'detach' option, this clueless user is not helped; he will > > happily keep working and would make tons of commits on detached HEAD, > > and next time he switches to another branch, will lose all of them. > > I guess that git does not let you commit on a detached head without > crying out loud.
Wrong. It cries out loud when you detach, not when you commit to a detached HEAD. For good reason: Already at the second commit it would stop being funny.
Show 5 quoted lines
> Furthermore, one could do just a bit more than detaching, namely store > the fact that head got detached and the name of the branch where the > head was. With this, when the unconscious user types git status or git > commit the system could alert him that head got detached because someone > updated the branch behind his shoulders from remote...
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.
Ciao, Dscho