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

Sort output of diff --stat?

From
RDRobert Dailey <rcdailey.lists@gmail.com>
Date
Oct 17, 2018, 18:15 UTC
Message-ID
<CAHd499BSVRytaFKOUhE=A4Zv+MMx=uKrWKUcT13QwzOCZWhEtg@mail.gmail.com>

I'd like to sort the output of `git diff --stat` such that files are listed in descending order based on number of lines changed. The closest solution I've found online[1] has several readability issues. I'd rather see a built-in solution in git, if one exists. Can anyone recommend a solution?

[1]: https://gist.github.com/jakub-g/7599177
Next: Jeff King
Message 1 of 4 in “Sort output of diff --stat?”
  1. Robert DaileyOct 17, 2018
  2. Jeff KingOct 17, 2018
  3. Robert DaileyOct 17, 2018
  4. Jeff KingOct 17, 2018

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.