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

Re: [RFC/PATCH 3/2] stash: show combined diff with "stash show"

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 31, 2014, 00:28 UTC
Message-ID
<CAPc5daWuyELptgGgBUxD_etTM3H40tneKXTrtFM3NLaneiibBA@mail.gmail.com>
In-Reply-To
<20140731001746.GC22297@peff.net>
On Wed, Jul 30, 2014 at 5:17 PM, Jeff King <peff@peff.net> wrote:
Show 5 quoted lines
>
> Like I said, I'm iffy on this part of the series for that reason. But
> I'm curious: what do you think should happen in such a use case when
> there are staged contents in the index? Right now we completely ignore
> them.
I think ignoring is absolutely the right thing ;-)

Unlike "stash pop", which is "try to bring me back to exactly the same state", it is a strong indication that the user wants to further tweak the previous work to grab a patch and apply to the working tree---and while you are working inside the working tree, you haven't started adding the index contents, so "git diff" after such an operation should show what you grabbed out of the stash, applied to the working tree, relative to what you had in the index.

Previous: Jeff KingNext: Jeff King
Message 8 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.