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

Re: [PATCH] diff: Make numstat machine friendly also for renames (and copies)

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 10, 2007, 23:00 UTC
Message-ID
<7vir36jgty.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<200712102332.53114.jnareb@gmail.com>
Jakub Narebski <jnareb@gmail.com> writes:
> "git diff --numstat" used the same format as "git diff --stat" for
> renamed (and copied) files, except that filenames were not shortened
> when they didn't fit in the column width.  This format is suitable for
> human consumption, but it cannot be unambiguously parsed.

Agreed about the (un)parsability, and --numstat is all about parsability so I would not object. A fix is really needed there.

I do not have time to look at the patch right now, but if the changed output is in line with what --name-status would show, that would be great. I'd call that "the format that should have been from day one".

I.e. no '=>' rename marker, but show two names c-quoted (unless -z is used) and separated with inter_name_termination). IIRC, that is how rename/copy is shown with --name-status.

Previous: Junio C HamanoNext: Jakub Narebski
Message 11 of 12 in “diff: Make numstat machine friendly also for renames (and copies)”
  1. diff: Make numstat machine friendly also for renames (and copies)Jakub Narebski, Dec 10, 2007
  2. diff: Make numstat machine friendly also for renames (and copies)Jakub Narebski, Dec 10, 2007
  3. Junio C HamanoDec 11, 2007
  4. Jakub NarebskiDec 11, 2007
  5. Junio C HamanoDec 11, 2007
  6. Jakub NarebskiDec 11, 2007
  7. Junio C HamanoDec 12, 2007
  8. Jakub NarebskiDec 12, 2007
  9. Jakub NarebskiDec 12, 2007
  10. Junio C HamanoDec 12, 2007
  11. Junio C HamanoDec 10, 2007
  12. Jakub NarebskiDec 10, 2007

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.