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

Re: [Question] info/grafts file.

From
Linus Torvalds <torvalds@osdl.org>
Date
Nov 15, 2005, 17:16 UTC
Message-ID
<Pine.LNX.4.64.0511150910230.3945@g5.osdl.org>
In-Reply-To
<200511150831.40463.alan@chandlerfamily.org.uk>
On Tue, 15 Nov 2005, Alan Chandler wrote:
Show 13 quoted lines
> On Tuesday 15 Nov 2005 00:03, Carl Baldwin wrote:
> > This is fine, I just needed to know.
> >
> > How hard is it to, in a generic way, take a grafts file and reconstruct
> > commits to include the parents in the graft file in the actual tree?  I
> > am wondering because I couldn't, after much work, get git-svnimport to
> > find my merges correctly.  So, I am needing to hand-graft some merges in
> > to make things right.  Any suggestions?  I could try to figure something
> > out if I can find some time.  I'm good with graph traversals and such.
> >
> 
> I am interested in that question as well.  If you recall I was asking on this 
> list about a week ago how to lose history (because it was irrelevent).

I think you should be able to use "git-convert-objects" to do both history pruning and history adding.

It would need a bit of work: right now "convert_commit()" parses the commit 100% by hand, and doesn't care about the grafts file. But that is where such a conversion would be done.

Right now "convert_commit()" actually does the first conversion in-place (because the size of the head of the commit never changes), and then calls "convert_date()" which will allocate a new buffer and do the conversion there - that's for totally stupid hysterical raisins, and it should really have allocated the new buffer in convert_commit() - something you'd need to do if you end up editing the "parent" information at that point.

So it would take some work, but the infrastructure for doing these kinds of conversions is all there.

		Linus
Previous: Alan ChandlerNext: Ryan Anderson
Message 6 of 8 in “[Question] info/grafts file.”
  1. Carl BaldwinNov 14, 2005
  2. Petr BaudisNov 14, 2005
  3. Junio C HamanoNov 14, 2005
  4. Carl BaldwinNov 15, 2005
  5. Alan ChandlerNov 15, 2005
  6. Linus TorvaldsNov 15, 2005
  7. Ryan AndersonNov 17, 2005
  8. Yann DirsonNov 17, 2005

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.