Subject: Re: Working copy revision and push pain

From: Jonathan Watt <[email-masked]>
Date: Sun, 23 Mar 2008 15:48:10 +0100

Johannes Schindelin wrote:
>> The end result is that HEAD is always the most recent commit to which 
>> your working copy is relative to.  See also 
>> http://www.kernel.org/pub/software/scm/git/docs/glossary.html
>>
>> So, it sounds like we're both saying that in your case, you'd like the
>> HEAD become detached and track the sha1 that it previously pointed to
>> before your push rather than continuing to track the updated branch.
> 
> If you ever propose to detach the HEAD in a remote repository when 
> somebody pushed into the referenced branch, I am totally opposed to that.

The alternative is to leave the working copy in a totally broken state. I'm not
sure why that would be preferable.

> You can play your own games with the update and post-update hooks as much 
> as you want, but please leave official Git alone.  Thankyouverymuch.

My hope here is for a reduction in the pain/time taken out from real work in the
OSS developer world while people are moving to DSCMs - particularly for those
that have to learn/move between both Mercurial and git. Requiring people to be
aware of this gotcha and to use solutions like hooks seems to raise barriers
rather than eliminate them.

Cloning and working with multiple repositories locally is a particularly
Mercurial workflow. I see this issue as a barrier to those who've cut their DSCM
teeth on Mercurial and are trying to use git. Would detaching HEAD really be a
problem in git workflows?

Jonathan