From: Andy Parkins <andyparkins@gmail.com>
To: git@vger.kernel.org
Cc: "Lars Hjemli" <hjemli@gmail.com>,
"Johannes Schindelin" <Johannes.Schindelin@gmx.de>,
"Jakub Narebski" <jnareb@gmail.com>
Subject: Re: [PATCH 3/3] prevent HEAD reflog to be interpreted as current branch reflog
Date: Fri, 2 Feb 2007 13:02:07 +0000 [thread overview]
Message-ID: <200702021302.10567.andyparkins@gmail.com> (raw)
In-Reply-To: <8c5c35580702020302g46f71fe3o24d7dc9490192cab@mail.gmail.com>
On Friday 2007 February 02 11:02, Lars Hjemli wrote:
> "HEAD@{yesterday}" = current branch, yesterday
> "@{yesterday}" = detached head (no branch), yesterday
I'd vote for this too. It's the only logically consistent view.
HEAD is a symbolic reference, it's a way of referring to a real branch by
another name. HEAD@{} should be the same as branch@{} to be consistent.
Forgetting about detached heads for the moment, imagine that yesterday I did
lots of bouncing around on branches, around 1300 (although I wouldn't
remember the exact time). Oh look, it's about 1300 now. What then is
HEAD@{yesterday} going to tell me? What will it tell me one minute from now?
It would be the most confusing operation in the world; I'd have to remember
which branch I had checked out and what time I checked it out.
I really don't want to be able to answer the question what branch did I have
checked out 15 minutes ago. I do want to ask where was my current branch 15
minutes ago.
Then of course, it's perfectly reasonable to treat the detached HEAD as
meaning that the symref HEAD was pointing at a kind of virtual branch - this
is a branch that isn't in the refs directory but is reflogged. Other than
that it's no different from any other branch.
Any notation would do I think, @{} is as good as any other. In fact, if we
used the name "unnamed branch" instead of "detached head", the notation @{}
is perfect. (Actually I think unnamed branch is a much better term than
detached HEAD, because HEAD is never detached - it must point at something)
Andy
--
Dr Andy Parkins, M Eng (hons), MIEE
andyparkins@gmail.com
next prev parent reply other threads:[~2007-02-02 13:02 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-01 17:33 [PATCH 3/3] prevent HEAD reflog to be interpreted as current branch reflog Nicolas Pitre
2007-02-01 19:13 ` Shawn O. Pearce
2007-02-01 20:58 ` Junio C Hamano
2007-02-01 21:29 ` Simon 'corecode' Schubert
2007-02-01 22:12 ` Nicolas Pitre
2007-02-01 22:17 ` Matthias Lederhofer
2007-02-01 22:29 ` [PATCH 4/3] provide a nice @{...} syntax to always mean the " Nicolas Pitre
2007-02-01 23:07 ` [PATCH 5/3], was " Johannes Schindelin
2007-02-01 23:21 ` [PATCH 6/3], was " Johannes Schindelin
2007-02-02 1:15 ` Junio C Hamano
2007-02-01 21:46 ` [PATCH 3/3] prevent HEAD reflog to be interpreted as " Nicolas Pitre
2007-02-02 10:31 ` Jakub Narebski
2007-02-02 10:42 ` Johannes Schindelin
2007-02-02 11:02 ` Lars Hjemli
2007-02-02 13:02 ` Andy Parkins [this message]
2007-02-02 14:55 ` Nicolas Pitre
2007-02-02 15:13 ` Nicolas Pitre
2007-02-02 16:11 ` Andy Parkins
2007-02-02 16:35 ` Simon 'corecode' Schubert
2007-02-02 17:19 ` Nicolas Pitre
2007-02-03 17:07 ` Mark Wooding
2007-02-03 17:54 ` Andy Parkins
2007-02-02 13:21 ` Jakub Narebski
2007-02-02 13:47 ` Simon 'corecode' Schubert
2007-02-02 19:40 ` Simon 'corecode' Schubert
2007-02-02 14:52 ` Nicolas Pitre
2007-02-02 15:39 ` Lars Hjemli
2007-02-05 11:11 ` Johannes Schindelin
2007-02-05 11:21 ` Shawn O. Pearce
2007-02-05 12:43 ` Johannes Schindelin
2007-02-05 23:11 ` Lars Hjemli
2007-02-02 13:08 ` Andy Parkins
2007-02-02 15:15 ` Rogan Dawes
2007-02-02 16:13 ` Andy Parkins
2007-02-03 3:04 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200702021302.10567.andyparkins@gmail.com \
--to=andyparkins@gmail.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=hjemli@gmail.com \
--cc=jnareb@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).