Re: disallowing push to currently checked-out branch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Mon, 16 Feb 2009, Sergio Callegari wrote:

> 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.

> 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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux