{"thread":{"id":"2506","subject":"[Question] info/grafts file.","startedAt":"2005-11-14T18:20:19Z","lastAt":"2005-11-17T21:45:57Z","messageCount":8,"participants":["Carl Baldwin","Petr Baudis","Junio C Hamano","Alan Chandler","Linus Torvalds","Ryan Anderson","Yann Dirson"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"11821","messageId":"20051114182019.GA19105@hpsvcnb.fc.hp.com","threadId":"2506","inReplyTo":null,"subject":"[Question] info/grafts file.","fromName":"Carl Baldwin","fromEmail":"cnb@fc.hp.com","sentAt":"2005-11-14T18:20:19Z","receivedAt":"2005-11-14T18:20:19Z","isPatch":false,"sender":{"key":"cnb@fc.hp.com","avatar":null},"body":"Greetings,\n\nA simple question to clarify something in the repository.\n\nWhat level of support is to be expected for the .git/info/grafts file?\nI added a grafts file to a repository imported from SVN.  However, when\nI cloned the repository using git clone -l -s I did not end up with a\ngrafts file in the cloned repository.\n\nCheers,\nCarl\n\n-- \n- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n Carl Baldwin                        Systems VLSI Laboratory\n Hewlett Packard Company\n MS 88                               work: 970 898-1523\n 3404 E. Harmony Rd.                 work: Carl.N.Baldwin@hp.com\n Fort Collins, CO 80525              home: Carl@ecBaldwin.net\n- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n"},{"id":"11832","messageId":"20051114195911.GU30496@pasky.or.cz","threadId":"2506","inReplyTo":"20051114182019.GA19105@hpsvcnb.fc.hp.com","subject":"Re: [Question] info/grafts file.","fromName":"Petr Baudis","fromEmail":"pasky@suse.cz","sentAt":"2005-11-14T19:59:11Z","receivedAt":"2005-11-14T19:59:11Z","isPatch":false,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"  Hello,\n\nDear diary, on Mon, Nov 14, 2005 at 07:20:19PM CET, I got a letter\nwhere Carl Baldwin <cnb@fc.hp.com> said that...\n> A simple question to clarify something in the repository.\n> \n> What level of support is to be expected for the .git/info/grafts file?\n> I added a grafts file to a repository imported from SVN.  However, when\n> I cloned the repository using git clone -l -s I did not end up with a\n> grafts file in the cloned repository.\n\n  grafts are meant to be a purely local thing, private to your current\nrepository so that you can extend it in certain way. If you want\nsomething public and official, that's what the \"parent\" lines in the\ncommit objects are - so you are really better off just rewriting the\nhistory.\n\n-- \n\t\t\t\tPetr \"Pasky\" Baudis\nStuff: http://pasky.or.cz/\nVI has two modes: the one in which it beeps and the one in which\nit doesn't.\n"},{"id":"11838","messageId":"7vhdafx81m.fsf@assigned-by-dhcp.cox.net","threadId":"2506","inReplyTo":"20051114182019.GA19105@hpsvcnb.fc.hp.com","subject":"Re: [Question] info/grafts file.","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2005-11-14T20:56:37Z","receivedAt":"2005-11-14T20:56:37Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Grafts are considered local preference, and not copied when\ncloned.  I am unsure this was a right decision, but that is how\nthings are right now.\n"},{"id":"11861","messageId":"20051115000349.GA32136@hpsvcnb.fc.hp.com","threadId":"2506","inReplyTo":"7vhdafx81m.fsf@assigned-by-dhcp.cox.net","subject":"Re: [Question] info/grafts file.","fromName":"Carl Baldwin","fromEmail":"cnb@fc.hp.com","sentAt":"2005-11-15T00:03:49Z","receivedAt":"2005-11-15T00:03:49Z","isPatch":false,"sender":{"key":"cnb@fc.hp.com","avatar":null},"body":"This is fine, I just needed to know.\n\nHow hard is it to, in a generic way, take a grafts file and reconstruct\ncommits to include the parents in the graft file in the actual tree?  I\nam wondering because I couldn't, after much work, get git-svnimport to\nfind my merges correctly.  So, I am needing to hand-graft some merges in\nto make things right.  Any suggestions?  I could try to figure something\nout if I can find some time.  I'm good with graph traversals and such.\n\nCarl\n\nOn Mon, Nov 14, 2005 at 12:56:37PM -0800, Junio C Hamano wrote:\n> Grafts are considered local preference, and not copied when\n> cloned.  I am unsure this was a right decision, but that is how\n> things are right now.\n> \n\n-- \n- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n Carl Baldwin                        Systems VLSI Laboratory\n Hewlett Packard Company\n MS 88                               work: 970 898-1523\n 3404 E. Harmony Rd.                 work: Carl.N.Baldwin@hp.com\n Fort Collins, CO 80525              home: Carl@ecBaldwin.net\n- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n"},{"id":"11880","messageId":"200511150831.40463.alan@chandlerfamily.org.uk","threadId":"2506","inReplyTo":"20051115000349.GA32136@hpsvcnb.fc.hp.com","subject":"Re: [Question] info/grafts file.","fromName":"Alan Chandler","fromEmail":"alan@chandlerfamily.org.uk","sentAt":"2005-11-15T08:31:40Z","receivedAt":"2005-11-15T08:31:40Z","isPatch":false,"sender":{"key":"alan@chandlerfamily.org.uk","avatar":"https://gravatar.com/avatar/1862247e5ea8eac114c842f9dc3a5db6253754e24ef7171757cf97eedce48b8c?d=mp&s=160"},"body":"On Tuesday 15 Nov 2005 00:03, Carl Baldwin wrote:\n> This is fine, I just needed to know.\n>\n> How hard is it to, in a generic way, take a grafts file and reconstruct\n> commits to include the parents in the graft file in the actual tree?  I\n> am wondering because I couldn't, after much work, get git-svnimport to\n> find my merges correctly.  So, I am needing to hand-graft some merges in\n> to make things right.  Any suggestions?  I could try to figure something\n> out if I can find some time.  I'm good with graph traversals and such.\n>\n\nI am interested in that question as well.  If you recall I was asking on this \nlist about a week ago how to lose history (because it was irrelevent).\n\nI at first attemtped to use a graft to bypass all the changes I wanted to \nloose, but as many of the tools ignored it I gave up.  When I looked at \nwhether I could change the history by making a commit that looked like the \ngraft, I came to the conclusion that I would have to do a number of things\n\na) Recreate the commits all the way to the head - because the commits where \nall stored in a content addressable file store, as soon as the parent link \nchanges it becomes a new commit with a new sha1, so changing a commit in the \nmiddle of a stream of branches effectively required you to walk up to the \nhead (difficult because the linkages are the other way) re-creating new \ncommits.\n\nb) Understand the topology of all the interlinking commits, and make sure that \nthe two commits I were trying to squash together didn't have any intermediate \ncommits that effectively pointed outside of this space (and when I say \n\"pointed\" I mean either via a parent link, OR via a reverse virtual link when \nsome other commits parent link pointed at the commit in question).\n\nBecause of all of this complexity I gave up and used cg-merge -squash to \ncreate the first stage squashed branch and then manually used git-cherry-pick \nto pick one by one the commits from on top of the old branch and move it to \nthe new one (not so hard there were only about 20 commits in all to move that \nway).\n\nSo I am interested to see if my logic for why the complexity was high was \ncorrect. \n\n\n-- \nAlan Chandler\nhttp://www.chandlerfamily.org.uk\nOpen Source. It's the difference between trust and antitrust.\n"},{"id":"11911","messageId":"Pine.LNX.4.64.0511150910230.3945@g5.osdl.org","threadId":"2506","inReplyTo":"200511150831.40463.alan@chandlerfamily.org.uk","subject":"Re: [Question] info/grafts file.","fromName":"Linus Torvalds","fromEmail":"torvalds@osdl.org","sentAt":"2005-11-15T17:16:00Z","receivedAt":"2005-11-15T17:16:00Z","isPatch":false,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Tue, 15 Nov 2005, Alan Chandler wrote:\n\n> On Tuesday 15 Nov 2005 00:03, Carl Baldwin wrote:\n> > This is fine, I just needed to know.\n> >\n> > How hard is it to, in a generic way, take a grafts file and reconstruct\n> > commits to include the parents in the graft file in the actual tree?  I\n> > am wondering because I couldn't, after much work, get git-svnimport to\n> > find my merges correctly.  So, I am needing to hand-graft some merges in\n> > to make things right.  Any suggestions?  I could try to figure something\n> > out if I can find some time.  I'm good with graph traversals and such.\n> >\n> \n> I am interested in that question as well.  If you recall I was asking on this \n> list about a week ago how to lose history (because it was irrelevent).\n\nI think you should be able to use \"git-convert-objects\" to do both history \npruning and history adding.\n\nIt would need a bit of work: right now \"convert_commit()\" parses the \ncommit 100% by hand, and doesn't care about the grafts file. But that is \nwhere such a conversion would be done.\n\nRight now \"convert_commit()\" actually does the first conversion in-place \n(because the size of the head of the commit never changes), and then calls \n\"convert_date()\" which will allocate a new buffer and do the conversion \nthere - that's for totally stupid hysterical raisins, and it should really \nhave allocated the new buffer in convert_commit() - something you'd need \nto do if you end up editing the \"parent\" information at that point.\n\nSo it would take some work, but the infrastructure for doing these kinds \nof conversions is all there.\n\n\t\tLinus\n"},{"id":"12069","messageId":"437BD56A.7030402@michonline.com","threadId":"2506","inReplyTo":"20051115000349.GA32136@hpsvcnb.fc.hp.com","subject":"Re: [Question] info/grafts file.","fromName":"Ryan Anderson","fromEmail":"ryan@michonline.com","sentAt":"2005-11-17T00:57:14Z","receivedAt":"2005-11-17T00:57:14Z","isPatch":false,"sender":{"key":"ryan@michonline.com","avatar":null},"body":"Carl Baldwin wrote:\n> This is fine, I just needed to know.\n> \n> How hard is it to, in a generic way, take a grafts file and reconstruct\n> commits to include the parents in the graft file in the actual tree?  I\n> am wondering because I couldn't, after much work, get git-svnimport to\n> find my merges correctly.  So, I am needing to hand-graft some merges in\n> to make things right.  Any suggestions?  I could try to figure something\n> out if I can find some time.  I'm good with graph traversals and such.\n\nIt's actually pretty easy.  I wrote a rough (and not quite safe) tool to\ndo this a week or so ago.\n\nhttp://marc.theaimsgroup.com/?l=git&m=113131673606637&w=2\n\nI will try and clean it up a bit and submit it for inclusion in contrib/\nsometime this coming weekend, but you should be able to use it to solve\nthis problem.\n\nIt's pretty straightforward, honestly.  (And I'm pretty sure it could be\nfaster if I did things slightly differently.)\n\n"},{"id":"12145","messageId":"20051117214557.GA26122@nowhere.earth","threadId":"2506","inReplyTo":"437BD56A.7030402@michonline.com","subject":"Re: [Question] info/grafts file.","fromName":"Yann Dirson","fromEmail":"ydirson@altern.org","sentAt":"2005-11-17T21:45:57Z","receivedAt":"2005-11-17T21:45:57Z","isPatch":false,"sender":{"key":"ydirson@altern.org","avatar":"https://avatars.githubusercontent.com/u/1190950?v=4"},"body":"On Wed, Nov 16, 2005 at 07:57:14PM -0500, Ryan Anderson wrote:\n> Carl Baldwin wrote:\n> > This is fine, I just needed to know.\n> > \n> > How hard is it to, in a generic way, take a grafts file and reconstruct\n> > commits to include the parents in the graft file in the actual tree?  I\n> > am wondering because I couldn't, after much work, get git-svnimport to\n> > find my merges correctly.  So, I am needing to hand-graft some merges in\n> > to make things right.  Any suggestions?  I could try to figure something\n> > out if I can find some time.  I'm good with graph traversals and such.\n> \n> It's actually pretty easy.  I wrote a rough (and not quite safe) tool to\n> do this a week or so ago.\n> \n> http://marc.theaimsgroup.com/?l=git&m=113131673606637&w=2\n> \n> I will try and clean it up a bit and submit it for inclusion in contrib/\n> sometime this coming weekend, but you should be able to use it to solve\n> this problem.\n> \n> It's pretty straightforward, honestly.  (And I'm pretty sure it could be\n> faster if I did things slightly differently.)\n\nHey, this exactly looks like the kind of script I intended to write in\nthe following days !  I'll have a close look at it.  Do you have a git\nrepo from where I could pull the latest version ?\n\nMy goal is to write an \"AcheoloGIT\" toolkit, to be able to reconstruct\nan history incrementally, from patches, identifying in the way patches\nwhich build upon other patches.  To make it more clear, there are in\nthe embedded world a number of vendor shipping \"jumbo patches\", which\ninclude parts or all of official arch-specific trees, with more stuff\nadded.\n\nAnd well, since it is not an easy task, the process has to be\nincremental, grafting here and there between various parts of the tree\nto gradually refine my view of its history.\n\nThere is some preliminary work, but for now only focussed on making\nthe import of series of patches more comforable.  Grafting was\nsupposed to be the next step :)\n\nhttp://ydirson.free.fr/soft/git/argit.git/\n\nBest regards,\n-- \nYann Dirson    <ydirson@altern.org> |\nDebian-related: <dirson@debian.org> |   Support Debian GNU/Linux:\n                                    |  Freedom, Power, Stability, Gratis\n     http://ydirson.free.fr/        | Check <http://www.debian.org/>\n"}]}