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

Re: git apply: git diff header lacks filename information for git diff --no-index patch

From
Linus Torvalds <torvalds@linux-foundation.org>
Date
Oct 4, 2008, 17:08 UTC
Message-ID
<alpine.LFD.2.00.0810041004290.3208@nehalem.linux-foundation.org>
In-Reply-To
<alpine.LFD.2.00.0810040918290.3208@nehalem.linux-foundation.org>
On Sat, 4 Oct 2008, Linus Torvalds wrote:
> 
> Anyway, for now I'd suggest a patch like this. Hmm? The "diff --git" 
> format assumes that the names are the same, so make it so.

Ahh, never mind, this one is broken. It's not _horribly_ so, but I shouldhave checked the test breakage. It changes non-broken cases from

	diff --git a/file b/file
into
	diff --git a/file a/file

so the header thing would need to be done differently. Don't even bother with that broken patch. I'll think about doing it better.

		Linus
Previous: Linus TorvaldsNext: Linus Torvalds
Message 6 of 10 in “git apply: git diff header lacks filename information for git diff --no-index patch”
  1. Imre DeakOct 2, 2008
  2. Jeff KingOct 4, 2008
  3. Jakub NarebskiOct 4, 2008
  4. Jeff KingOct 5, 2008
  5. Linus TorvaldsOct 4, 2008
  6. Linus TorvaldsOct 4, 2008
  7. Linus TorvaldsOct 4, 2008
  8. Jeff KingOct 5, 2008
  9. Jeff KingOct 5, 2008
  10. Jeff KingOct 5, 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.