Re: [PATCH v3 0/2] stash: fix and improve "git stash -p <pathspec>"
- From
- Martin Ågren <martin.agren@gmail.com>
- Date
- Jun 10, 2025, 09:56 UTC
- Message-ID
- <CAN0heSrk4osiXTfxSZB9EN3o4NF+zLCBJscrSTa1Rsz+VjzjVg@mail.gmail.com>
- In-Reply-To
- <a66483fb-5bc4-42b5-b361-c900a69015ed@gmail.com>
Hi Phillip,
On Mon, 9 Jun 2025 at 11:42, Phillip Wood <phillip.wood123@gmail.com> wrote:
Show 17 quoted lines
> > On 07/06/2025 13:56, Martin Ågren wrote: > > > > On Sat, 7 Jun 2025 at 11:45, Phillip Wood <phillip.wood123@gmail.com> wrote: > > [...] > > So the implementation under test could bungle the pathspec, query the > > user for both `file` and `otherfile` (in that order!), get EOF from > > stdin while handling `otherfile`, leave it out of the stash, and end up > > passing the test. We could try to protect against this by providing > > another "y": if git wants to read something after our "s y n" sequence, > > we'll give it a "y" in the hopes that it will trip things up. We do want > > to test the handling of pathspecs here, so maybe tighten this? > > Junio has merged this to next now. I was hoping that we would already > have coverage for this with other tests but I couldn't see anything so > I'll look at improving the coverage for "git stash push -p <pathspec>" > in the next release cycle.
Ok, makes sense. Those would certainly be good regression tests to have. I did some manual testing when I wrote the above and feel confident, FWIW, that it works correctly as of now.
Thanks for these git-stash improvements.
Martin