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

Re: Behaviour of 'git stash show' when a stash has untracked files

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 21, 2017, 01:23 UTC
Message-ID
<xmqqpoakn8tj.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<20170920193630.l7ifret5dpqgxiwm@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 6 quoted lines
> I sketched out a possible solution in:
>
>   https://public-inbox.org/git/20170317141417.g2oenl67k74nlqrq@sigill.intra.peff.net/
>
> though I share your concerns over whether people would be annoyed to see
> the existing "stash show" output changed.

Forgot about that one. I sometimes do "stash show -p | apply", so changing what is included without any option would be annoying, and not having an option to restore the original behaviour would be doubly irritating.

Perhaps "stash show [--[untracked|index|worktree]]" to show only one, without the "==> I am this variant <==" label, would be workable, and with no option we would do --worktree that is the traditional output.

In addition "stash show --all" could be the output in your earlier patch. I like the way it uses the '.' pathspec to squelch the entire thing when there is no change ;-)

Thanks.
Previous: Jeff KingNext: Jeff King
Message 4 of 8 in “Behaviour of 'git stash show' when a stash has untracked files”
  1. Kaartic SivaraamSep 17, 2017
  2. Junio C HamanoSep 20, 2017
  3. Jeff KingSep 20, 2017
  4. Junio C HamanoSep 21, 2017
  5. Jeff KingSep 21, 2017
  6. Kaartic SivaraamSep 23, 2017
  7. Junio C HamanoSep 24, 2017
  8. Kaartic SivaraamSep 23, 2017

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.