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

git full diff output issues..

From
Linus Torvalds <torvalds@osdl.org>
Date
May 26, 2005, 19:19 UTC
Message-ID
<Pine.LNX.4.58.0505261214140.2307@ppc970.osdl.org>

While testing my "git-apply" thing (coming along quite nicely, thanks for asking), I've hit a case that is nasty to parse.

This is from the 2.6.12-rc4 -> 2.6.12-rc5 patch:
	diff --git a/arch/um/kernel/checksum.c b/arch/um/kernel/checksum.c
	deleted file mode 100644
	diff --git a/arch/um/kernel/initrd.c b/arch/um/kernel/initrd.c
	new file mode 100644
	--- /dev/null
	+++ b/arch/um/kernel/initrd.c
	@@ -0,0 +1,78 @@

and the magic here is that deleted file that was empty to begin with, so it didn't have a patch, just a note on deletion.

Why is that nasty? Because we don't have the file _name_ in any good format. The filename only exists int he "diff --git" header, and that one has the space-parsing issue, which makes it less than optimal.

I'd suggest we enhance the "full diff" output for new and deleted files to match the rename output, ie we'd give the actual filename on that line too, to avoid any ambiguities.

So we'd change it from
	deleted file mode 100644
to
	deleted file mode 100644 arch/um/kernel/checksum.c
in this case..
Comments?
		Linus
Next: Linus Torvalds
Message 1 of 13 in “git full diff output issues..”
  1. Linus TorvaldsMay 26, 2005
  2. Linus TorvaldsMay 26, 2005
  3. Junio C HamanoMay 26, 2005
  4. Junio C HamanoMay 26, 2005
  5. Anton AltaparmakovMay 26, 2005
  6. Linus TorvaldsMay 26, 2005
  7. Junio C HamanoMay 26, 2005
  8. Linus TorvaldsMay 26, 2005
  9. Junio C HamanoMay 26, 2005
  10. Junio C HamanoJun 5, 2005
  11. Linus TorvaldsJun 5, 2005
  12. Chris WedgwoodMay 26, 2005
  13. Linus TorvaldsMay 26, 2005

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.