Dear diary, on Tue, Jul 12, 2005 at 06:34:33AM CEST, I got a letter
where Linus Torvalds <[EMAIL PROTECTED]> told me that...
> On Mon, 11 Jul 2005, Linus Torvalds wrote:
> > 
> >     Of course, if you want to create a new branch "my-branch" and _not_
> >     check it out, you could have done so with just
> > 
> >         git-rev-parse v2.6.12^0 > .git/refs/heads/my-branch
> > 
> >     which I think I will codify as "git branch".
> And now we have that "git branch". It's a trivial one-liner, except with
> the setup and error checking it's actually more like six lines.

Could we please have the branch name written to .git/head-name in case
we switch the branch? The reason is that .git/HEAD may not be always a
symlink. Specifically, I do this - there's a command cg-seek, which will
seek your working tree to a given commit, while staying on the branch
(committing and some other operations are blocked). In that case, I
remove .git/HEAD and replace it with ID of the commit I'm seeked at, and
when I'm "unseeking" back to the top, I replace it with the symlink
again. With some heuristics, I could create .git/head-name at the time
of seek and hope, but I think it'd be cleaner to just always set it
(except when we are on the master branch), if you agree.

Note that even though Cogito won't let you create/change a local branch
yet, it will understand .git/head-name and hopefully behave properly
(although it's totally untested, of course).

                                Petr "Pasky" Baudis
<Espy> be careful, some twit might quote you out of context..
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to