threads / discuss / 20219

git-am -p fails with new file

Subject: git-am -p fails with new file

## tl;dr

One message between Jul 24, 2009 and Jul 24, 2009.

replies: 0people: 1as markdown or json

Pierre-Marc Fournier· Jul 24, 2009, 18:09 UTC · lore

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

← back to recent threads