{"thread":{"id":"10428","subject":"git filter-branch --subdirectory-filter error","startedAt":"2007-10-22T10:27:13Z","lastAt":"2007-10-22T13:44:25Z","messageCount":4,"participants":["Jan Wielemaker","Johannes Schindelin"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"56850","messageId":"200710221227.13279.wielemak@science.uva.nl","threadId":"10428","inReplyTo":null,"subject":"git filter-branch --subdirectory-filter error","fromName":"Jan Wielemaker","fromEmail":"wielemak@science.uva.nl","sentAt":"2007-10-22T10:27:13Z","receivedAt":"2007-10-22T10:27:13Z","isPatch":false,"sender":{"key":"wielemak@science.uva.nl","avatar":null},"body":"Hi,\n\nFinished a big re-shuffle of a big project, while other developers\ncontinued. Worked really well. Thanks guys! But now I have two top\ndirectories and I want to create two new repositories, each containing\none of these directories (because the one holds copyrighted data and we\nwant the other to become public software). So, I happily run\n\n\t$ git filter-branch --subdirectory-filter RDF HEAD\n\nWhere RDF is an existing directory.  I get:\n\nRewrite 95807fe01c39d3092e3ac3a98061711323154d77 (1/12)fatal: Not a valid \nobject name 95807fe01c39d3092e3ac3a98061711323154d77:RDF\nCould not initialize the index\n\nI tried the procedure on some smaller test projects and it all worked\njust fine. Running git version 1.5.3.4 on SuSE Linux. Also ran \"git fsck\n--full\", which completed without any message.\n\nGit show says:\n\ngollem (eculture) 121_> git show 95807fe01c39d3092e3ac3a98061711323154d77 | \ncat\ncommit 95807fe01c39d3092e3ac3a98061711323154d77\nMerge: 76d2935... 58afb98...\nAuthor: Jan Wielemaker <wielemak@science.uva.nl>\nDate:   Thu Oct 18 17:32:22 2007 +0200\n\n    Merge branch 'master' of /home/eculture/eculture\n\nAny clue?  \n\n\tThanks --- Jan\n"},{"id":"56858","messageId":"Pine.LNX.4.64.0710221218150.25221@racer.site","threadId":"10428","inReplyTo":"200710221227.13279.wielemak@science.uva.nl","subject":"Re: git filter-branch --subdirectory-filter error","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2007-10-22T11:20:05Z","receivedAt":"2007-10-22T11:20:05Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Mon, 22 Oct 2007, Jan Wielemaker wrote:\n\n> Finished a big re-shuffle of a big project, while other developers \n> continued. Worked really well. Thanks guys! But now I have two top \n> directories and I want to create two new repositories, each containing \n> one of these directories (because the one holds copyrighted data and we \n> want the other to become public software). So, I happily run\n> \n> \t$ git filter-branch --subdirectory-filter RDF HEAD\n> \n> Where RDF is an existing directory.  I get:\n> \n> Rewrite 95807fe01c39d3092e3ac3a98061711323154d77 (1/12)fatal: Not a valid \n> object name 95807fe01c39d3092e3ac3a98061711323154d77:RDF\n> Could not initialize the index\n\nI guess that 95807fe01 is the parent of a commit adding the RDF/ \ndirectory.\n\nThe subdirectory filter does not look kindly upon a history where some \ncommits lack the subdirectory in question.  However, this should work:\n\n\tgit filter-branch --subdirectory--filter RDF 95807fe01..HEAD\n\nHth,\nDscho\n"},{"id":"56862","messageId":"200710221337.50730.wielemak@science.uva.nl","threadId":"10428","inReplyTo":"Pine.LNX.4.64.0710221218150.25221@racer.site","subject":"Re: git filter-branch --subdirectory-filter error","fromName":"Jan Wielemaker","fromEmail":"wielemak@science.uva.nl","sentAt":"2007-10-22T11:37:50Z","receivedAt":"2007-10-22T11:37:50Z","isPatch":false,"sender":{"key":"wielemak@science.uva.nl","avatar":null},"body":"Dscho,\n\nOn Monday 22 October 2007 13:20, Johannes Schindelin wrote:\n> Hi,\n>\n> On Mon, 22 Oct 2007, Jan Wielemaker wrote:\n> > Finished a big re-shuffle of a big project, while other developers\n> > continued. Worked really well. Thanks guys! But now I have two top\n> > directories and I want to create two new repositories, each containing\n> > one of these directories (because the one holds copyrighted data and we\n> > want the other to become public software). So, I happily run\n> >\n> > \t$ git filter-branch --subdirectory-filter RDF HEAD\n> >\n> > Where RDF is an existing directory.  I get:\n> >\n> > Rewrite 95807fe01c39d3092e3ac3a98061711323154d77 (1/12)fatal: Not a valid\n> > object name 95807fe01c39d3092e3ac3a98061711323154d77:RDF\n> > Could not initialize the index\n>\n> I guess that 95807fe01 is the parent of a commit adding the RDF/\n> directory.\n>\n> The subdirectory filter does not look kindly upon a history where some\n> commits lack the subdirectory in question.  However, this should work:\n>\n> \tgit filter-branch --subdirectory--filter RDF 95807fe01..HEAD\n\nThanks, but ... hmmm.\n\n$ git filter-branch --subdirectory-filter RDF \n95807fe01c39d3092e3ac3a98061711323154d77..HEAD\nRewrite 0a43c802dd60f53d48136a32526a4b2a5f0d43e5 (1/11)fatal: Not a valid \nobject name 0a43c802dd60f53d48136a32526a4b2a5f0d43e5:RDF\nCould not initialize the index\n\n$ git show 0a43c802dd60f53d48136a32526a4b2a5f0d43e5\ncommit 0a43c802dd60f53d48136a32526a4b2a5f0d43e5\nMerge: 49fa961... 95807fe...\nAuthor: XXX\nDate:   Thu Oct 18 17:45:26 2007 +0200\n\n    Merge branch 'master' of \nhildebra@gollem.science.uva.nl:/home/eculture/eculture\n\nTried 0a43c802dd60f53d48136a32526a4b2a5f0d43e5..HEAD, just to get\nanother one :-( I guess this will go on a little while :-( Before I\nstart writing a script that performs this procedure findind a place\nwhere it does work I'd like to share some history with you.\n\nThis started as a big project with a lot of history in CVS, including\nmoved (read deleted and re-created) files. This was moved to SVN and\nfrom there immediately to GIT. In GIT lots of things have been renamed.\nThe RDF directory was created quite recent in the project and things\nfrom various subdirectories were moved there.\n\nIs there something that might be worth a try or should we go the simple\nway: keeping the old combined repo for later reference and create two\nnew ones from fresh files?\n\n\tCheers --- Jan\n"},{"id":"56873","messageId":"Pine.LNX.4.64.0710221440540.25221@racer.site","threadId":"10428","inReplyTo":"200710221337.50730.wielemak@science.uva.nl","subject":"Re: git filter-branch --subdirectory-filter error","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2007-10-22T13:44:25Z","receivedAt":"2007-10-22T13:44:25Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Mon, 22 Oct 2007, Jan Wielemaker wrote:\n\n> On Monday 22 October 2007 13:20, Johannes Schindelin wrote:\n>\n> > The subdirectory filter does not look kindly upon a history where some \n> > commits lack the subdirectory in question.  However, this should work:\n> >\n> > \tgit filter-branch --subdirectory--filter RDF 95807fe01..HEAD\n> \n> Thanks, but ... hmmm.\n> \n> $ git filter-branch --subdirectory-filter RDF \n> 95807fe01c39d3092e3ac3a98061711323154d77..HEAD\n> Rewrite 0a43c802dd60f53d48136a32526a4b2a5f0d43e5 (1/11)fatal: Not a valid \n> object name 0a43c802dd60f53d48136a32526a4b2a5f0d43e5:RDF\n> Could not initialize the index\n\nI suspect again that this commit does not contain the RDF/ subdirectory.\n\n> This started as a big project with a lot of history in CVS, including \n> moved (read deleted and re-created) files. This was moved to SVN and \n> from there immediately to GIT. In GIT lots of things have been renamed. \n> The RDF directory was created quite recent in the project and things \n> from various subdirectories were moved there.\n> \n> Is there something that might be worth a try or should we go the simple\n> way: keeping the old combined repo for later reference and create two\n> new ones from fresh files?\n\nIt sure sounds pretty tricky.  (IOW I'm probably unable to help more...)\n\nCiao,\nDscho\n"}]}