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

git apply --directory broken for new files

From
HAH. Peter Anvin <hpa@zytor.com>
Date
Sep 25, 2008, 20:41 UTC
Message-ID
<48DBF794.9030809@zytor.com>
Trying with git 1.6.0.1:

: tazenda 124 ; git apply --directory=gpxe/ < /tmp/diff fatal: git-apply: bad git-diff - inconsistent new filename on line 105

Line 105 in the diff is:
    101  diff --git a/src/arch/i386/firmware/pcbios/fakee820.c 
b/src/arch/i386/firmware/pcbios/fakee820.c
    102  new file mode 100644
    103  index 0000000..e171edf
    104  --- /dev/null
    105  +++ b/src/arch/i386/firmware/pcbios/fakee820.c

What I'm trying to do here is to apply a diff created via "git diff" to a subdirectory of another git repository.

	-hpa
Next: Jeff King
Message 1 of 5 in “git apply --directory broken for new files”
  1. H. Peter AnvinSep 25, 2008
  2. Jeff KingSep 27, 2008
  3. Junio C HamanoOct 12, 2008
  4. Jeff KingOct 12, 2008
  5. Junio C HamanoOct 12, 2008

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.