{"thread":{"id":"12845","subject":"merging git repositories history for full history of linux","startedAt":"2008-03-24T18:56:24Z","lastAt":"2008-03-24T21:10:38Z","messageCount":3,"participants":["Yoann Padioleau","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"72934","messageId":"87iqzcne7b.fsf@wanadoo.fr","threadId":"12845","inReplyTo":null,"subject":"merging git repositories history for full history of linux","fromName":"Yoann Padioleau","fromEmail":"padator@wanadoo.fr","sentAt":"2008-03-24T18:56:24Z","receivedAt":"2008-03-24T18:56:24Z","isPatch":false,"sender":{"key":"padator@wanadoo.fr","avatar":null},"body":"\nHi, \n\nI would like to merge the 3 git repositories of the history\nof linux, the one by Dave Jones from linux 0.01 to linux 2.4.0, \nthe one by tglx from 2.4.0 to 2.6.12 and the one from 2.6.12\nby torvalds until the last version of Linux.\n\nRight now there are 3 repos and I would like only one. I made\nsome scripts to create a fresh repo, and incorporate each\ncommit from the 3 repositories mentionned above\n(getting the changelog, setting the date), but it takes lots of time\nbecause for instance I can not use the git log -p commitid because\nthe patch can not be applied as is. So I usually do a checkout\nfor each commitid and do a manual diff to generate a patch\nand apply it to my fresh repo.\n\nIs there a magic command that makes this possible efficiently ?\n"},{"id":"72939","messageId":"7v63vbvr2b.fsf@gitster.siamese.dyndns.org","threadId":"12845","inReplyTo":"87iqzcne7b.fsf@wanadoo.fr","subject":"Re: merging git repositories history for full history of linux","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-03-24T19:51:24Z","receivedAt":"2008-03-24T19:51:24Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Yoann Padioleau <padator@wanadoo.fr> writes:\n\n> I would like to merge the 3 git repositories of the history\n> of linux, the one by Dave Jones from linux 0.01 to linux 2.4.0, \n> the one by tglx from 2.4.0 to 2.6.12 and the one from 2.6.12\n> by torvalds until the last version of Linux.\n\nI think you can install two grafts (one that says the root in tglx history\nhas one parent that is tip of Dave Jones history, another that says that\nthe 2.6.12-rc2 commit which is the root in Linus history has one parent\nthat is near the tip of tglx history), and if you want the result to use\nlocally then you are done.  Otherwise you can run filter-branch on the\nresult, but the future commits from Linus tree will all be different.\n"},{"id":"72952","messageId":"87ej9zomk1.fsf@wanadoo.fr","threadId":"12845","inReplyTo":"7v63vbvr2b.fsf@gitster.siamese.dyndns.org","subject":"Re: merging git repositories history for full history of linux","fromName":"Yoann Padioleau","fromEmail":"padator@wanadoo.fr","sentAt":"2008-03-24T21:10:38Z","receivedAt":"2008-03-24T21:10:38Z","isPatch":false,"sender":{"key":"padator@wanadoo.fr","avatar":null},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> Yoann Padioleau <padator@wanadoo.fr> writes:\n>\n>> I would like to merge the 3 git repositories of the history\n>> of linux, the one by Dave Jones from linux 0.01 to linux 2.4.0, \n>> the one by tglx from 2.4.0 to 2.6.12 and the one from 2.6.12\n>> by torvalds until the last version of Linux.\n>\n> I think you can install two grafts (one that says the root in tglx history\n> has one parent that is tip of Dave Jones history, another that says that\n> the 2.6.12-rc2 commit which is the root in Linus history has one parent\n> that is near the tip of tglx history), and if you want the result to use\n> locally then you are done.  Otherwise you can run filter-branch on the\n> result, but the future commits from Linus tree will all be different.\n\nThanks, I'll try that. \n\nAlso the Dave jones commits have the wrong date. All the 1040 commits\nare set to December 2007. I can get all the dates for the different\nversions of Linux but is there an easy way then to change the date for\nthose 1040 commitid ? and also author ? The reasons for this is I want\nto use 'git annotate' on the full history of Linux to do some statistics\nabout the evolution of Linux so I need the good date for each commit.\n\nAlso, why the diff produce by git log -p can not be applied as \nis on another git repositories ? I tried to do a script that just\nduplicate a git repository by getting the patch for each commit\nwith 'git log -p' and applies them in turn to a fresh repo with\ngit applypatch but it fails, git returns some error such as \n\"b/Makefile already exist\".\n"}]}