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

diffstat wierdness with 'git format-patch' output

From
Greg KH <greg@kroah.com>
Date
Feb 14, 2006, 05:54 UTC
Message-ID
<20060214055425.GA32261@kroah.com>

I was trying to use the built-in git tools to send patches off, instead of my horribly hacked up scripts that use the git low-level stuff, when I noticed that git format-patch's output confuses diffstat a bit, and causes it to add another line to it's count.

This isn't good when I do a 'diffstat -p1 *.txt' of the output and add it to an email to send off for someone to pull from, as the result will be off from what is really there.

Here's what I get:
 $ git format-patch -n origin..HEAD
 0001-USB-fix-up-the-usb-early-handoff-logic-for-EHCI.txt
 0002-USB-add-new-device-ids-to-ldusb.txt
 0003-USB-change-ldusb-s-experimental-state.txt
 0004-USB-PL2303-Leadtek-9531-GPS-Mouse.txt
 0005-USB-sl811_cs-needs-platform_device-conversion-too.txt
 0006-usb-storage-new-unusual_devs-entry.txt
 0007-usb-storage-unusual_devs-entry.txt
 0008-USB-unusual_devs.h-entry-TrekStor-i.Beat.txt
 0009-USB-unusual_devs.h-entry-iAUDIO-M5.txt
 0010-USB-unusual-devs-bugfix.txt
 $ git log | head -n 1
 commit 16f05be7be0bf121491d83bd97337fe179b3b323
 $ git show 16f05be7be0bf121491d83bd97337fe179b3b323 | diffstat -p1
  drivers/usb/storage/unusual_devs.h |   25 ++++++++++++++++++-------
  1 file changed, 18 insertions(+), 7 deletions(-)
 $ diffstat -p1 0010-USB-unusual-devs-bugfix.txt
  drivers/usb/storage/unusual_devs.h |   26 ++++++++++++++++++--------
  1 file changed, 18 insertions(+), 8 deletions(-)
Any thoughts?
thanks,
greg k-h
Next: Greg KH
Message 1 of 11 in “diffstat wierdness with 'git format-patch' output”
  1. Greg KHFeb 14, 2006
  2. Greg KHFeb 14, 2006
  3. Junio C HamanoFeb 14, 2006
  4. Greg KHFeb 14, 2006
  5. Junio C HamanoFeb 14, 2006
  6. Greg KHFeb 14, 2006
  7. Greg KHFeb 14, 2006
  8. Greg KHFeb 14, 2006
  9. Junio C HamanoFeb 14, 2006
  10. Greg KHFeb 18, 2006
  11. Fredrik KuivinenFeb 14, 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.