{"thread":{"id":"23629","subject":"git-apply fails on creating a new file, with both -p and --directory specified","startedAt":"2010-04-28T12:29:26Z","lastAt":"2010-04-29T08:20:17Z","messageCount":2,"participants":["Matthias Lehmann"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"140588","messageId":"201004281429.26579.mat@matlehmann.de","threadId":"23629","inReplyTo":null,"subject":"git-apply fails on creating a new file, with both -p and --directory specified","fromName":"Matthias Lehmann","fromEmail":"mat@matlehmann.de","sentAt":"2010-04-28T12:29:26Z","receivedAt":"2010-04-28T12:29:26Z","isPatch":false,"sender":{"key":"mat@matlehmann.de","avatar":"https://gravatar.com/avatar/f7ed5f27a8e564c7f5fbadbdbc60b88e8a61697b978fabeca5006664285fe3f9?d=mp&s=160"},"body":"Hi all,\n\nthe subject of this mail may read familiar to some - there was a discussion in \nNovember last year (see \nhttp://kerneltrap.org/mailarchive/git/2009/11/23/16899/) concerning this \nproblem.\n\nToday I had this same issue with git 1.7.0.4. Reading the above mentioned \ndiscussion and seaching the net did not help me in finding a solution to the \nproblem. \n\nI have to apply patches from one repository to another repository, which have \na different layout (I am working on splitting one big repository into several \nsmaller ones, while development still continues on the big repository).\n\nSo I did\n\nbig-repo$ git format-patche -o /tmp/foo \nsmall-repo$ git apply -p2 --directory=some/path --check /tmp/foo/*\n\nand get\n\nfatal: git diff header lacks filename information when removing 2 leading \npathname components (line 37)\n\nthe patch looks like this:\n\n35| diff --git a/xyz/bar.jpg b/xyz/bar.jpg\n36| new file mode 100644\n37| index \n0000000000000000000000000000000000000000..3dcce2e1f68586ed2089d86b1bf4e7e41c818d97\n38| GIT binary patch\n39| literal 8791\n\n\n\nSince this problem was discussed before - is there a solution?\nThis is something like a showstopper for me right now, so I am very thankful \nfor any hints.\n\nBest regards,\n\nMat\n"},{"id":"140637","messageId":"hrbfg2$t5m$1@dough.gmane.org","threadId":"23629","inReplyTo":"201004281429.26579.mat@matlehmann.de","subject":"Re: git-apply fails on creating a new file, with both -p and --directory specified","fromName":"Matthias Lehmann","fromEmail":"mat@matlehmann.de","sentAt":"2010-04-29T08:20:17Z","receivedAt":"2010-04-29T08:20:17Z","isPatch":false,"sender":{"key":"mat@matlehmann.de","avatar":"https://gravatar.com/avatar/f7ed5f27a8e564c7f5fbadbdbc60b88e8a61697b978fabeca5006664285fe3f9?d=mp&s=160"},"body":"Matthias Lehmann wrote:\n\n> Hi all,\n> \n> the subject of this mail may read familiar to some - there was a\n> discussion in November last year (see\n> http://kerneltrap.org/mailarchive/git/2009/11/23/16899/) concerning this\n> problem.\n> \n> Today I had this same issue with git 1.7.0.4. Reading the above mentioned\n> discussion and seaching the net did not help me in finding a solution to\n> the problem.\n> \n> I have to apply patches from one repository to another repository, which\n> have a different layout (I am working on splitting one big repository into\n> several smaller ones, while development still continues on the big\n> repository).\n> \n> So I did\n> \n> big-repo$ git format-patche -o /tmp/foo\n> small-repo$ git apply -p2 --directory=some/path --check /tmp/foo/*\n> \n> and get\n> \n> fatal: git diff header lacks filename information when removing 2 leading\n> pathname components (line 37)\n> \n> the patch looks like this:\n> \n> 35| diff --git a/xyz/bar.jpg b/xyz/bar.jpg\n> 36| new file mode 100644\n> 37| index\n> \n0000000000000000000000000000000000000000..3dcce2e1f68586ed2089d86b1bf4e7e41c818d97\n> 38| GIT binary patch\n> 39| literal 8791\n> \n> \n> \n> Since this problem was discussed before - is there a solution?\n> This is something like a showstopper for me right now, so I am very\n> thankful for any hints.\n> \n> Best regards,\n> \n> Mat\n\nIs there anything I can do to get some feedback to this issue? I don't want \nto be impatient, it's just quite important to me. \n\nSince I have not much experience in reporting issues to a mailing list, it \nmight well be, that I did something wrong - so please correct me and direct \nme to how I can be of better help.\n\nBest regards,\n\nMat\n"}]}