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

Re: git full diff output issues..

From
AAAnton Altaparmakov <aia21@cam.ac.uk>
Date
May 26, 2005, 19:53 UTC
Message-ID
<Pine.LNX.4.60.0505262036500.16829@hermes-1.csi.cam.ac.uk>
In-Reply-To
<Pine.LNX.4.58.0505261223240.2307@ppc970.osdl.org>
On Thu, 26 May 2005, Linus Torvalds wrote:
Show 21 quoted lines
> On Thu, 26 May 2005, Linus Torvalds wrote:
> > 
> > So we'd change it from
> > 
> > 	deleted file mode 100644
> > 
> > to
> > 
> > 	deleted file mode 100644 arch/um/kernel/checksum.c
> > 
> > in this case..
> 
> I just realized that this same thing is equally true of just plain mode 
> changes, where wif we don't have any content we just get
> 
> 	diff --git a/name b/name
> 	old mode xxxx
> 	new mode yyyy
> 
> so I might as well parse the diff header here (I don't want to repeat the 
> name twice for mode changes). Oh well.

Given that git already has the metadata lines in the diff ("old mode", "deleted file mode", etc) why not simply add another metadata line "name" and what follows that is the name until an end of line character (or a NUL if you want file names with embedded new lines). You can then only emit the "name" metadata line when no actual diff is present and hence the name is uncertain.

Best regards,
	Anton
-- 
Anton Altaparmakov <aia21 at cam.ac.uk> (replace at with @)
Unix Support, Computing Service, University of Cambridge, CB2 3QH, UK
Linux NTFS maintainer / IRC: #ntfs on irc.freenode.net
WWW: http://linux-ntfs.sf.net/ & http://www-stu.christs.cam.ac.uk/~aia21/
Previous: Junio C HamanoNext: Linus Torvalds
Message 5 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.