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

Re: Can not list stash (git version 2.30.0)

From
Jeff King <peff@peff.net>
Date
Apr 7, 2021, 19:48 UTC
Message-ID
<YG4MgBMJGBbIyGDJ@coredump.intra.peff.net>
In-Reply-To
<1851413381.20210407204938@yandex.ru>
On Wed, Apr 07, 2021 at 08:49:38PM +0300, Eugen Konkov wrote:
Show 18 quoted lines
> I am in progress of rebasing
> 
> ~/e/Auth/Mojolicious/Plugin $ git rebase aa3376
> Created autostash: 4018bc7
> hint: Waiting for your editor to close the file...
> 
> 
> while I am in editor I switched to different console to view created autostash:
> 
> ~/e/Auth $ git stash list
> 
> and see nothing
> 
> but can view stash by its id:
> ~/e/Auth $ git show 4018bc7
> commit 4018bc7bc870eb37aa35f40a0f612ca55a586045
> Merge: a790392 674e39f
> .....

If you run with GIT_TRACE=1, you can see that the autostash feature uses "git stash create" and not "git stash push". That creates the stash commit but _doesn't_ push it onto the stash list.

So it's working as intended. The rationale comes from the very first commit adding autostash, 587947750b (rebase: implement --[no-]autostash and rebase.autostash, 2013-05-12), which says:

    The advantage of this approach is that we do not affect the normal
    stash's reflogs, making the autostash invisible to the end-user.  This
    means that you can use 'git stash' during a rebase as usual.
-Peff
Previous: Eugen Konkov
Message 2 of 2 in “Can not list stash (git version 2.30.0)”
  1. Eugen KonkovApr 7, 2021
  2. Jeff KingApr 7, 2021

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.