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

Re: [BUG?] Confusion with git stash list

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 21, 2023, 16:33 UTC
Message-ID
<xmqqedl1w7ft.fsf@gitster.g>
In-Reply-To
<CAPx1GvcxdJhAQA=sDJ7reu+shaeuzz+-xZKOoD0ZNo89hOgmbw@mail.gmail.com>
Chris Torek <chris.torek@gmail.com> writes:
Show 14 quoted lines
> On Fri, Jul 21, 2023 at 9:05 AM <rsbecker@nexbridge.com> wrote:
>> It is simple to set up. You do need at least one stash, but the contents are
>> irrelevant. So given any repository, use git stash push. Then use git stash
>> list --all.
>
> The `git stash list` command is secretly just a front end to `git log`
> that inserts particular options, so `--all` is passed to `git log` and
> does what it does. That's why you see what you see (remember
> that `git stash list` includes `-g` / `--walk-reflogs` so `--all` here
> means "all reflogs").
>
> Whether this is *intended* is another question, but to stop it,
> `git stash` would have to notice and alter / remove `--all` before
> passing the rest of the command on to `git log`.

I do not think it was intended, but falls within the realm of "do not do it, if it hurts" ;-)

Previous: Chris Torek
Message 3 of 3 in “[BUG?] Confusion with git stash list”
  1. rsbecker@nexbridge.comJul 21, 2023
  2. Chris TorekJul 21, 2023
  3. Junio C HamanoJul 21, 2023

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.