Re: [PATCH 3/3] prevent HEAD reflog to be interpreted as current branch reflog

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Nicolas Pitre
Date: Friday, February 2, 2007 - 8:13 am

On Fri, 2 Feb 2007, Andy Parkins wrote:


That is not the way to go about it.  You cannot start forgetting about 
detached heads and come back to it afterwards like an afterthought.


The exact same argument could be said if you did 1300 operations on a 
single branch, say master.  What would master@{yesterday} tell you?  
What will it tell you one minute from now?  Now suppose that you have 
only one branch and therefore HEAD reflog would be a duplicate of master 
reflog.

Answer: it would carry the same kind of confusion as your example above.


Then simply use @{15 minutes ago}.  You'll even save yourself some 
typing!  It is not like if you have to type HEAD for most operations 
anyway since HEAD is the likely default in most cases.  So you may even 
forget that the HEAD entity exists and be just fine.

But HEAD is still a moving pointer and we might want to know that it 
switched from one branch to another at some point.  And the only way for 
that to be sensible is by having a separate reflog for HEAD that is the 
exact log of every operations you perform regardless of the actual 
branch you might be on.


HEAD _does_ get detached.  It becomes loose in the air.  It doesn't drag 
any 
branch 
pointer with it.  And everything you do on top of a detached HEAD will 
be forgotten as soon as you leave it (and the eventual reflog for HEAD 
expires) if you don't attach it somehow with a tag or a new branch.  
There is no notion of a virtual branch at all, not technically, not 
conceptually either.


Nicolas
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH 3/3] prevent HEAD reflog to be interpreted as c ..., Johannes Schindelin, (Fri Feb 2, 3:42 am)
Re: [PATCH 3/3] prevent HEAD reflog to be interpreted as c ..., Simon 'corecode' Sch ..., (Fri Feb 2, 6:47 am)
Re: [PATCH 3/3] prevent HEAD reflog to be interpreted as c ..., Nicolas Pitre, (Fri Feb 2, 8:13 am)
Re: [PATCH 3/3] prevent HEAD reflog to be interpreted as c ..., Simon 'corecode' Sch ..., (Fri Feb 2, 9:35 am)
Re: [PATCH 3/3] prevent HEAD reflog to be interpreted as c ..., Simon 'corecode' Sch ..., (Fri Feb 2, 12:40 pm)
Re: [PATCH 3/3] prevent HEAD reflog to be interpreted as c ..., Johannes Schindelin, (Mon Feb 5, 4:11 am)
Re: [PATCH 3/3] prevent HEAD reflog to be interpreted as c ..., Johannes Schindelin, (Mon Feb 5, 5:43 am)