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

Re: [PATCH] Add a test-case for git-apply trying to add an ending line

From
Linus Torvalds <torvalds@osdl.org>
Date
May 24, 2006, 02:17 UTC
Message-ID
<Pine.LNX.4.64.0605231916210.5623@g5.osdl.org>
In-Reply-To
<Pine.LNX.4.64.0605231905470.5623@g5.osdl.org>
On Tue, 23 May 2006, Linus Torvalds wrote:
Show 6 quoted lines
>
> +	/*
> +	 * If we don't have any trailing data in the patch,
> +	 * we want to match the final ending '\0' byte in
> +	 * the file too..
> +	 */

Btw, ignore the comment. I was thinking of doing the matching differently (just make the source buffer include a '\0' at the end, and forcing that to match), but once I actually wrote it, it ended up being much easier to just check the offset/size difference.

So that "final ending '\0' byte in the file" part of the comment is just nonsense.

		Linus
Previous: Linus TorvaldsNext: Junio C Hamano
Message 6 of 9 in “Add a test-case for git-apply trying to add an ending line”
  1. Add a test-case for git-apply trying to add an ending lineCatalin Marinas, May 23, 2006
  2. Junio C HamanoMay 24, 2006
  3. Junio C HamanoMay 24, 2006
  4. Junio C HamanoMay 24, 2006
  5. Linus TorvaldsMay 24, 2006
  6. Linus TorvaldsMay 24, 2006
  7. Junio C HamanoMay 24, 2006
  8. Catalin MarinasMay 24, 2006
  9. Linus TorvaldsMay 24, 2006

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.