Re: [PATCH] Detached HEAD (experimental)
- From
Shawn O. Pearce <spearce@spearce.org>
- Date
- Jan 10, 2007, 01:07 UTC
- Message-ID
- <20070110010725.GI30023@spearce.org>
- In-Reply-To
- <20070110010312.GA25265@fieldses.org>
"J. Bruce Fields" <bfields@fieldses.org> wrote:
Show 16 quoted lines
> On Tue, Jan 09, 2007 at 07:34:33PM -0500, Shawn O. Pearce wrote: > > Unfortunately .git/logs/HEAD wouldn't be created by default as its > > not under refs/heads or refs/remotes. Though it could be made to be > > on by default, in which case it would only log changes while HEAD > > is detached. If HEAD is attached to a branch then .git/logs/HEAD > > wouldn't be appended to (or even created), while the branch's own > > log is still appended to. > > That would also provide all the needed "safety valve" on git checkout, > wouldn't it? Since you could always recover from > > git checkout v1.4.0 > git commit -m -a 'some changes' > git checkout 41.2.0 > > by looking back through the reflog for HEAD.
Yes. Then that removes my desire for a safety check in reset, (which Linus doesn't want) thereby making both of us happy.
-- Shawn.