Re: hmm, can't we give the "root" a parent?
- From
- Kay Sievers <kay.sievers@vrfy.org>
- Date
- Sep 12, 2005, 19:59 UTC
- Message-ID
- <20050912195947.GA28502@vrfy.org>
- In-Reply-To
- <Pine.LNX.4.58.0509121123280.3242@g5.osdl.org>
On Mon, Sep 12, 2005 at 11:26:24AM -0700, Linus Torvalds wrote:
Show 20 quoted lines
> On Mon, 12 Sep 2005, Kay Sievers wrote: > > > > Can't we teach the git tools that a "root commit" (one without a any > > parent) is not visible as a "root", if let's say: > > .git/parents/<root-commit-id> -> <fake-parent-id> > > > > does connect a "fake" parent to the "root"? This way we could add any > > older Linux history to the current tree. Combined with "alternates" it > > could live in a complete different repository too. > > Ehh.. That's exactly what "grafting" is about. > > So just do > > echo "<root-id> <grafted-parent-id>" >> .git/info/grafts > > and it should all work. > > Of course, anything that parses the commits by hand won't see it, but all > the regular tools hopefully do.
Yup, tried it and works nicely with the history.git tree on kernel.org connected to your tree, replacing the initial commit.
And good to know about that, need to fix the "parent" link in gitweb to respect grafts.
Thanks, Kay