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

[PATCH v2 0/6] improving "git stash list -p"

From
Jeff King <peff@peff.net>
Date
Jul 29, 2014, 17:53 UTC
Message-ID
<20140729175300.GA21536@peff.net>
In-Reply-To
<20140729115334.GA8976@peff.net>

I spent a few more minutes cleaning up the rough edges here, and this is what I ended up with. This version uses run_diff to implement the actual single-parent diff, so that it matches a "real" diff exactly. It also introduces a few new patches to let you really specify an empty --pretty user-format.

I do think this is an improvement over the current state. I'd also be OK with just specifying "--first-parent" to "git stash list" by default, so that "git stash list -p" does something sensible. I don't like that it doesn't let you peek at the index, but nobody has complained about that in "git stash show", so perhaps nobody cares. All things being equal, I prefer this solution, though.

  [1/6]: revision: drop useless string offset when parsing "--pretty"
  [2/6]: pretty: treat "--format=" as an empty userformat
  [3/6]: pretty: make empty userformats truly empty
  [4/6]: add --simplify-combined-diff option
  [5/6]: stash: default listing to "--cc --simplify-combined-diff"
  [6/6]: stash: show combined diff with "stash show"
-Peff
Previous: Junio C HamanoNext: Jeff King
Message 9 of 20 in “improving "git stash list -p"”
  1. 0/2 improving "git stash list -p"Jeff King, Jul 29, 2014
  2. 1/2 add --simplify-combined-diff optionJeff King, Jul 29, 2014
  3. Jeff KingJul 29, 2014
  4. 2/2 stash: default listing to "--cc --simplify-combined-diff"Jeff King, Jul 29, 2014
  5. 3/2 stash: show combined diff with "stash show"Jeff King, Jul 29, 2014
  6. Junio C HamanoJul 29, 2014
  7. Jeff KingJul 31, 2014
  8. Junio C HamanoJul 31, 2014
  9. 0/6 improving "git stash list -p"Jeff King, Jul 29, 2014
  10. 1/6 revision: drop useless string offset when parsing "--pretty"Jeff King, Jul 29, 2014
  11. 2/6 pretty: treat "--format=" as an empty userformatJeff King, Jul 29, 2014
  12. 3/6 pretty: make empty userformats truly emptyJeff King, Jul 29, 2014
  13. 4/6 add --simplify-combined-diff optionJeff King, Jul 29, 2014
  14. Junio C HamanoJul 29, 2014
  15. 5/6 stash: default listing to "--cc --simplify-combined-diff"Jeff King, Jul 29, 2014
  16. Junio C HamanoJul 29, 2014
  17. Junio C HamanoJul 30, 2014
  18. Jeff KingJul 31, 2014
  19. Keller, Jacob EAug 12, 2014
  20. 6/6 stash: show combined diff with "stash show"Jeff King, Jul 29, 2014

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.