{"thread":{"id":"18237","subject":"filter-branch --subdirectory-filter prematurely truncating history?","startedAt":"2009-03-09T23:08:12Z","lastAt":"2009-03-11T00:37:16Z","messageCount":3,"participants":["Cap Petschulat","Johannes Sixt"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"107513","messageId":"loom.20090309T230424-857@post.gmane.org","threadId":"18237","inReplyTo":null,"subject":"filter-branch --subdirectory-filter prematurely truncating history?","fromName":"Cap Petschulat","fromEmail":"cap@naviasystems.com","sentAt":"2009-03-09T23:08:12Z","receivedAt":"2009-03-09T23:08:12Z","isPatch":false,"sender":{"key":"cap@naviasystems.com","avatar":null},"body":"I'd like to spin a subdirectory of an existing git repo off in to its\nown repo while preserving history. From what I've read, I should be\nable to do this with a fresh clone followed by git filter-branch\n--subdirectory-filter MYSUBDIR, assuming I don't care about other\nbranches or tags. This runs, and when it's done, I have a repo that\ncontains the subdir's contents as its root. So far so good.\n\nI would expect to see the subdir's full history when I run git log,\nbut instead it cuts off prematurely, showing the first commit to be\nsome relatively recent minor change I'll call FOO. In gitk, I can see\nthat history prior to FOO is still around, but FOO has no parents, and\nthe commit before FOO has no children. In the original repo, FOO's\nparent was the merge of a branch which no longer exists, if this\nmatters.\n\nAm I expecting filter-branch to do something unreasonable? Is there an\neasy way to reconnect the orphaned history? Am I using the wrong tool\nfor the job?\n"},{"id":"107544","messageId":"49B60FF9.9020805@viscovery.net","threadId":"18237","inReplyTo":"loom.20090309T230424-857@post.gmane.org","subject":"Re: filter-branch --subdirectory-filter prematurely truncating history?","fromName":"Johannes Sixt","fromEmail":"j.sixt@viscovery.net","sentAt":"2009-03-10T07:00:09Z","receivedAt":"2009-03-10T07:00:09Z","isPatch":false,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Cap Petschulat schrieb:\n> I'd like to spin a subdirectory of an existing git repo off in to its\n> own repo while preserving history. From what I've read, I should be\n> able to do this with a fresh clone followed by git filter-branch\n> --subdirectory-filter MYSUBDIR, assuming I don't care about other\n> branches or tags. This runs, and when it's done, I have a repo that\n> contains the subdir's contents as its root. So far so good.\n> \n> I would expect to see the subdir's full history when I run git log,\n> but instead it cuts off prematurely, showing the first commit to be\n> some relatively recent minor change I'll call FOO. In gitk, I can see\n> that history prior to FOO is still around, but FOO has no parents, and\n> the commit before FOO has no children. In the original repo, FOO's\n> parent was the merge of a branch which no longer exists, if this\n> matters.\n\nA bug in this area was fixed in git v1.6.0-rc3. Which version are you using?\n\n-- Hannes\n"},{"id":"107623","messageId":"loom.20090311T003412-973@post.gmane.org","threadId":"18237","inReplyTo":"49B60FF9.9020805@viscovery.net","subject":"Re: filter-branch --subdirectory-filter prematurely truncating history?","fromName":"Cap Petschulat","fromEmail":"cap@naviasystems.com","sentAt":"2009-03-11T00:37:16Z","receivedAt":"2009-03-11T00:37:16Z","isPatch":false,"sender":{"key":"cap@naviasystems.com","avatar":null},"body":"Johannes Sixt <j.sixt <at> viscovery.net> writes:\n> A bug in this area was fixed in git v1.6.0-rc3. Which version are you using?\n\nI was using 1.5.4.3 from Ubuntu Hardy, but I just rebuilt git from the most\nrecent sources and now filter-branch does what I want. Thanks for the suggestion!\n"}]}