git/list[1] front-page[2] threads[3] people[4] search[5] about
 

git-am -p fails with new file

From
PFPierre-Marc Fournier <pierre-marc.fournier@polymtl.ca>
Date
Jul 24, 2009, 18:09 UTC
Message-ID
<4A69F8DA.9060406@polymtl.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
Message 1 of 1 in “git-am -p fails with new file”
  1. Pierre-Marc FournierJul 24, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.