Re: [PATCH] Detached HEAD (experimental)
- From
Shawn O. Pearce <spearce@spearce.org>
- Date
- Jan 10, 2007, 01:40 UTC
- Message-ID
- <20070110014000.GA30765@spearce.org>
- In-Reply-To
- <7vwt3vfzd1.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano <junkio@cox.net> wrote:
Show 13 quoted lines
> Nicolas Pitre <nico@cam.org> writes: > > >> 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. > > > > Is this worth the trouble and complexity? After all detached heads are > > not meant to be used for serious development. > > I agree.
git checkout v1.4.0 # dang, need some local fix git commit -m tmpfix -a git reset --hard v1.2.0 git reset --hard v1.3.0 # dang, need that local again fix - where is it?
It ain't in ORIG_HEAD. Its now only findable by fsck-objects/lost-found. But if you reflog a detached HEAD its there as HEAD@{2}.
Maybe its not really worth it. But it almost seems like it would come free if we always use update-ref like we're supposed to...
-- Shawn.