# git-am -p fails with new file

1 messages from 2009-07-24 to 2009-07-24. Participants: Pierre-Marc Fournier.
Thread: https://gitlist.dev/t/20219

## Pierre-Marc Fournier, 2009-07-24 18:09

Subject: git-am -p fails with new file
Message-ID: <4A69F8DA.9060406@polymtl.ca>
URL: https://gitlist.dev/e/4A69F8DA.9060406%40polymtl.ca

```
I have a patch generated with git format-patch. I am trying to apply it
in a repository that contains only a subdirectory of the original
repository.

Therefore, I need to use git-am -p, which fails with the following message.

fatal: git apply: bad git-diff - inconsistent new filename on line 33

Is there a code path missing in parse_git_header() to strip the
directories as requested by -p?

Please CC me. Thanks.

pmf

```
