git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: v2.6.11 tag in kernel tree

From
Junio C Hamano <junkio@cox.net>
Date
Nov 30, 2006, 04:22 UTC
Message-ID
<7v7ixdlg1e.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<9e4733910611292002o289dc4d1u7bde2d457fa97d73@mail.gmail.com>
"Jon Smirl" <jonsmirl@gmail.com> writes:
Show 5 quoted lines
> I'm trying to check out v2.6.11 so that I can figure out the changes a
> vendor made to it.
>
> jonsmirl@jonsmirl:/extra/linux$ git checkout -b microcross v2.6.11
> Cannot switch branch to a non-commit.

Sorry, you cannot check it out directly, and there is no easy way to start a new branch from a bare tree.

I would create a temporary branch from any commit and reset the working tree with it.

	git checkout -b temp master
        git read-tree -m -u v2.6.11-tree

One BIG caveat is that this in state, only your index and the working tree can be trusted. The history of temp branch does not have anything to do with v2.6.11 -- a bare tree object does not have any history behind it (or on top of it, for that matter).

A slightly more elaborate way would be
        $ git checkout -b v2.6.11-phoney $(echo 'phoney v2.6.11' |
	        git commit-tree v2.6.11-tree^{tree})

to create a parentless commit that has v2.6.11-tree, and make that your current branch. But again this commit does not have any relationship in history with the development line that leads to v2.6.19 just released.

You could graft it as the parent of v2.6.12-rc2 (the first commit in git era) after doing the above:

	$ parent=$(git-rev-parse v2.6.11-phoney^0)
        $ commit=$(git-rev-parse v2.6.12-rc2^0)
	$ echo $commit $parent >>.git/info/grafts
and pretend as if v2.6.12-rc2 is a child of v2.6.11-phoney.
Previous: Jon SmirlNext: Linus Torvalds
Message 2 of 4 in “v2.6.11 tag in kernel tree”
  1. Jon SmirlNov 30, 2006
  2. Junio C HamanoNov 30, 2006
  3. Linus TorvaldsNov 30, 2006
  4. Jon SmirlNov 30, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.