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

git apply does not honor diff.noprefix config setting

From
hIpPy <hippy2981@gmail.com>
Date
May 19, 2018, 23:18 UTC
Message-ID
<CAM_JFCza0Az32RC-ytu_6PxG9JnteySPEDyKEeDzZAv9MdadAQ@mail.gmail.com>
If I disable mnemonic prefix,
$ git config --global diff.noprefix true
and do a round-trip of format-patch and apply,

$ git format-patch -1 @ $ git apply <some-file.patch>

git apply fails with,

error: git diff header lacks filename information when removing 1 leading pathname component (line 16)

Without 'diff.noprefix' config setting, git apply works. It seems git apply does not honor the diff.noprefix config setting.

Thanks, Rish

Next: Junio C Hamano
Message 1 of 2 in “git apply does not honor diff.noprefix config setting”
  1. hIpPyMay 19, 2018
  2. Junio C HamanoMay 21, 2018

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.