Re: Auto detaching head options (update) (Re: Working copy revision and push pain)
- From
Jeff King <peff@peff.net>
- Date
- Mar 31, 2008, 01:59 UTC
- Message-ID
- <20080331015937.GA32645@coredump.intra.peff.net>
- In-Reply-To
- <7vy77zslor.fsf@gitster.siamese.dyndns.org>
On Sun, Mar 30, 2008 at 06:53:56PM -0700, Junio C Hamano wrote:
Show 8 quoted lines
> While I too find the proposal attractive as a concept, I am sorry to say > that it would not work even with the current set of Porcelain (fwiw, when > the index-base extension was done, the approach based on HEAD reflog would > not have worked either). This is because 605fac8 (update HEAD reflog when > branch pointed to by HEAD is directly modified, 2007-03-21) made gremlin > updates to the current branch tip to also update the reflog of HEAD. > > If we revert that commit, we may be able to.
Eww. I didn't know we were doing that. In fact, that was one of the cases I mentioned as "this would cause the reflog to get out of sync, but that is a good thing because it would trigger your safety valve." But obviously I was wrong about how we behave now.
Why is 605fac8 beneficial? What common workflow is updating the HEAD branch through its actual name? If it is manipulating the index and worktree at the same time, then it should be using the name HEAD. If it isn't, then shouldn't the HEAD and index get out of sync (exactly the thing Jan's proposal is meant to protect against)?
-Peff