{"thread":{"id":"28062","subject":"git apply-diff / am cannot deal with patches generated with git diff/format-patch --noprefix?","startedAt":"2011-08-10T22:25:00Z","lastAt":"2011-08-10T22:32:32Z","messageCount":2,"participants":["marcel partap","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"173251","messageId":"4E43053C.5080407@gmx.net","threadId":"28062","inReplyTo":null,"subject":"git apply-diff / am cannot deal with patches generated with git diff/format-patch --noprefix?","fromName":"marcel partap","fromEmail":"mpartap@gmx.net","sentAt":"2011-08-10T22:25:00Z","receivedAt":"2011-08-10T22:25:00Z","isPatch":false,"sender":{"key":"mpartap@gmx.net","avatar":"https://gravatar.com/avatar/48334bf11d5314a55b0d9bb4e0eeb8f9ccd836ed2f978181850423d8ddf284ee?d=mp&s=160"},"body":"...at least it seems so. -p0 does not help:\n> fatal: git apply: bad git-diff - inconsistent old filename on line xx\nSo it is not possible to have diff.noprefix set as default and generate \npatches that can be circulated? Or am i missing something there?\n#regards/marcel\n"},{"id":"173252","messageId":"7vfwl8sxrz.fsf@alter.siamese.dyndns.org","threadId":"28062","inReplyTo":"4E43053C.5080407@gmx.net","subject":"Re: git apply-diff / am cannot deal with patches generated with git diff/format-patch --noprefix?","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-08-10T22:32:32Z","receivedAt":"2011-08-10T22:32:32Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"marcel partap <mpartap@gmx.net> writes:\n\n> ...at least it seems so. -p0 does not help:\n>> fatal: git apply: bad git-diff - inconsistent old filename on line xx\n\nHmm, does not reproduce for me.\n\n$ git checkout v1.7.6 ;# or whatever random commit I had at hand\n$ git show --no-prefix >P.diff\n$ grep \"^diff --git\" P.diff\ndiff --git Documentation/RelNotes/1.7.6.txt Documentation/RelNotes/1.7.6.txt\ndiff --git Documentation/git.txt Documentation/git.txt\ndiff --git GIT-VERSION-GEN GIT-VERSION-GEN\n$ git checkout HEAD^\n$ git apply -p0 <P.diff\n$ git diff v1.7.6 ; echo nothing\nnothing\n$ git diff --stat\n Documentation/RelNotes/1.7.6.txt |    8 +-------\n Documentation/git.txt            |    5 +++++\n GIT-VERSION-GEN                  |    2 +-\n 3 files changed, 7 insertions(+), 8 deletions(-)\n"}]}