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

Re: [bug] [UX] `stash save --untracked` produces a stash that *looks* empty

From
Jeff King <peff@peff.net>
Date
Oct 9, 2014, 02:51 UTC
Message-ID
<20141009025112.GA19897@peff.net>
In-Reply-To
<543501CE.5040705@gmail.com>
On Wed, Oct 08, 2014 at 02:50:14PM +0530, Tanay Abhra wrote:
Show 6 quoted lines
> I think problem lies with  show_stash() which just shows the
> diff between working tree and the base tree, it ignores the
> untracked files. A quick and dirty fix can be to just show
> the diff between the untracked files and a NULL commit.
> Here's the patch, it works all right but can be implemented
> much better. I will try to find a better approach tomorrow.

You may want to read through another recent attempt at the same thing here:

  http://thread.gmane.org/gmane.comp.version-control.git/254420

It ended with us just making "git stash list" behave like "git stash show" (and show only the working tree); that ended up as 288c67c (stash: default listing to working-tree diff, 2014-08-06).

Which isn't to say there isn't room for more improvement. But you may find the backstory and pitfalls helpful (and I think Junio explicitly said he prefers the current behavior in that thread).

-Peff
Previous: Tanay Abhra
Message 3 of 3 in “[bug] [UX] `stash save --untracked` produces a stash that *looks* empty”
  1. Alberto ScottoOct 5, 2014
  2. Tanay AbhraOct 8, 2014
  3. Jeff KingOct 9, 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.