Re: [PATCH 3/3] prevent HEAD reflog to be interpreted as current branch reflog
- From
- Lars Hjemli <hjemli@gmail.com>
- Date
- Feb 2, 2007, 15:39 UTC
- Message-ID
- <8c5c35580702020739v383c1efeu7851f5eb2a2ea5f@mail.gmail.com>
- In-Reply-To
- <Pine.LNX.4.64.0702020945090.3021@xanadu.home>
On 2/2/07, Nicolas Pitre <nico@cam.org> wrote:
Show 28 quoted lines
> On Fri, 2 Feb 2007, Lars Hjemli wrote:
>
> > On 2/2/07, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
> > > Hi,
> > >
> > > On Fri, 2 Feb 2007, Jakub Narebski wrote:
> > >
> > > > Perhaps we should use @{...} to refer to reflog for HEAD, or use yet
> > > > another special notation?
> > >
> > > No.
> > >
> > > IMHO "bla@{yesterday}" should give you what "bla" pointed to, yesterday.
> > > In that sense, the proposed reflog on "HEAD" makes perfect sense.
> >
> > Since HEAD is a synonym for "current branch" everywhere else in git,
> > while .git/logs/HEAD will be a log of detached HEAD (plus branch
> > switches, I guess), I think the following makes perfect sense:
> >
> > "HEAD@{yesterday}" = current branch, yesterday
> > "@{yesterday}" = detached head (no branch), yesterday
>
> No it doesn't.
>
> HEAD is a moving pointer. Sometimes it means the current branch,
> sometimes it doesn't.
>
> So HEAD is _NOT_ a synonym for "current branch" everywhere already.All true. I guess I'm just used to thinking about HEAD as a pointer to the current branch, and that was the reasoning behind my proposal.
But with a detached HEAD this is no longer true, and you end up being right :)
Sorry for the noise
-- larsh