Re: [PATCH] checkout: add --autostash option for branch switching
- From
Harald Nordgren <haraldnordgren@gmail.com>
- Date
- Apr 15, 2026, 15:34 UTC
- Message-ID
- <20260415153413.1176-1-haraldnordgren@gmail.com>
- In-Reply-To
- <538fc297-d09c-43c1-8240-d1680fbec4cb@gmail.com>
Show 6 quoted lines
> Normally the first test would setup some commits with test_commit() that > creates a tag so you can just use "git reset --hard <tag>" to start your > test from a known state. Unfortunately setup_stash() does not use > test_commit() so there are no tags. It would be useful to fix that by > adding a line that creates a tag so that future test authors do not face > the same problem.
Sounds reasonable, but it's surprisingly easy to break the subsequent tests.
My solution now will be to move these tests to last in the test file.
Harald