{"thread":{"id":"60019","subject":"[BUG?] Confusion with git stash list","startedAt":"2023-07-21T15:55:14Z","lastAt":"2023-07-21T16:35:08Z","messageCount":3,"participants":["rsbecker@nexbridge.com","Chris Torek","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"479741","messageId":"046c01d9bbeb$a8680bc0$f9382340$@nexbridge.com","threadId":"60019","inReplyTo":null,"subject":"[BUG?] Confusion with git stash list","fromName":"","fromEmail":"rsbecker@nexbridge.com","sentAt":"2023-07-21T15:54:34Z","receivedAt":"2023-07-21T15:55:14Z","isPatch":false,"sender":{"key":"randall.becker@nexbridge.ca","avatar":"https://avatars.githubusercontent.com/u/28956764?v=4"},"body":"Hi Team,\n\nWhen using git stash list --all, I end up with every commit showing up in\nthe list of stash entries. I do not know whether this is intended.\n\nIt is simple to set up. You do need at least one stash, but the contents are\nirrelevant. So given any repository, use git stash push. Then use git stash\nlist --all.\n\nWhen no stashes exist, nothing is output:\n$ git stash list --all\n\nWhen adding a stash (the type of stash does not matter):\n$ touch test1\n$ git stash push -u\n$ git stash list --all\nstash@{0}: WIP on PROJ-710-allow-sub-volumes-to-split-arbitrary: 6909776a\nt2406: add pattern sync test\nHEAD@{0}: reset: moving to HEAD\nstash@{0}: WIP on PROJ-710-allow-sub-volumes-to-split-arbitrary: 6909776a\nt2406: add pattern sync test\norigin/ PROJ-710-allow-sub-volumes-to-split-arbitrary@{0}: push:\nforced-update\nPROJ-710-allow-sub-volumes-to-split-arbitrary@{0}: commit: t2406: add\npattern sync test\nHEAD@{1}: commit: t2406: add pattern sync test\norigin/PROJ-710-allow-sub-volumes-to-split-arbitrary@{1}: update by push\nPROJ-710-allow-sub-volumes-to-split-arbitrary@{1}: rebase (finish):\nrefs/heads/PROJ-710-allow-sub-volumes-to-split-arbitrary onto\nfea6b45d8671660014d84f5b4538d66c1b91deab\nHEAD@{2}: rebase (finish): returning to\nrefs/heads/PROJ-710-allow-sub-volumes-to-split-arbitrary\nHEAD@{3}: rebase (fixup): PROJ-710: Prototype structure for mapping multiple\ndirectories to a subvolume\nHEAD@{4}: rebase (fixup): # This is a combination of 17 commits.\nHEAD@{5}: rebase (fixup): # This is a combination of 16 commits.\nHEAD@{6}: rebase (fixup): # This is a combination of 15 commits.\nHEAD@{7}: rebase (fixup): # This is a combination of 14 commits.\nHEAD@{8}: rebase (fixup): # This is a combination of 13 commits.\nHEAD@{9}: rebase (fixup): # This is a combination of 12 commits.\netc...\n\nThis happens in 2.39.0.\n\nThanks,\nRandall\n\n--\nBrief whoami: NonStop&UNIX developer since approximately\nUNIX(421664400)\nNonStop(211288444200000000)\n-- In real life, I talk too much.\n\n\n\n"},{"id":"479743","messageId":"CAPx1GvcxdJhAQA=sDJ7reu+shaeuzz+-xZKOoD0ZNo89hOgmbw@mail.gmail.com","threadId":"60019","inReplyTo":"046c01d9bbeb$a8680bc0$f9382340$@nexbridge.com","subject":"Re: [BUG?] Confusion with git stash list","fromName":"Chris Torek","fromEmail":"chris.torek@gmail.com","sentAt":"2023-07-21T16:09:11Z","receivedAt":"2023-07-21T16:09:30Z","isPatch":false,"sender":{"key":"chris.torek@gmail.com","avatar":"https://avatars.githubusercontent.com/u/16826774?v=4"},"body":"On Fri, Jul 21, 2023 at 9:05 AM <rsbecker@nexbridge.com> wrote:\n> It is simple to set up. You do need at least one stash, but the contents are\n> irrelevant. So given any repository, use git stash push. Then use git stash\n> list --all.\n\nThe `git stash list` command is secretly just a front end to `git log`\nthat inserts particular options, so `--all` is passed to `git log` and\ndoes what it does. That's why you see what you see (remember\nthat `git stash list` includes `-g` / `--walk-reflogs` so `--all` here\nmeans \"all reflogs\").\n\nWhether this is *intended* is another question, but to stop it,\n`git stash` would have to notice and alter / remove `--all` before\npassing the rest of the command on to `git log`.\n\nChris\n"},{"id":"479745","messageId":"xmqqedl1w7ft.fsf@gitster.g","threadId":"60019","inReplyTo":"CAPx1GvcxdJhAQA=sDJ7reu+shaeuzz+-xZKOoD0ZNo89hOgmbw@mail.gmail.com","subject":"Re: [BUG?] Confusion with git stash list","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2023-07-21T16:33:26Z","receivedAt":"2023-07-21T16:35:08Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Chris Torek <chris.torek@gmail.com> writes:\n\n> On Fri, Jul 21, 2023 at 9:05 AM <rsbecker@nexbridge.com> wrote:\n>> It is simple to set up. You do need at least one stash, but the contents are\n>> irrelevant. So given any repository, use git stash push. Then use git stash\n>> list --all.\n>\n> The `git stash list` command is secretly just a front end to `git log`\n> that inserts particular options, so `--all` is passed to `git log` and\n> does what it does. That's why you see what you see (remember\n> that `git stash list` includes `-g` / `--walk-reflogs` so `--all` here\n> means \"all reflogs\").\n>\n> Whether this is *intended* is another question, but to stop it,\n> `git stash` would have to notice and alter / remove `--all` before\n> passing the rest of the command on to `git log`.\n\nI do not think it was intended, but falls within the realm of \"do\nnot do it, if it hurts\" ;-)\n"}]}