Skip to content

improving "git stash list -p"

Jeff King git 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v2 Latest6 patches 5 repliesIn review

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6revision: drop useless string offset when parsing "--pretty"revision.c+1 -10 replies
2/6pretty: treat "--format=" as an empty userformatpretty.c+2 -20 replies
3/6pretty: make empty userformats truly emptycombine-diff.c commit.h log-tree.c +1 more+11 -30 replies
4/6add --simplify-combined-diff optionDocumentation/rev-list-options.txt combine-diff.c diff.c +4 more+201 -51 reply
5/6stash: default listing to "--cc --simplify-combined-diff"git-stash.sh t/t3903-stash.sh+65 -14 replies
6/6stash: show combined diff with "stash show"git-stash.sh t/t3903-stash.sh+24 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

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

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