Re: [PATCH v10 0/4] checkout: 'autostash' for branch switching
- From
Jeff King <peff@peff.net>
- Date
- Apr 12, 2026, 20:01 UTC
- Message-ID
- <20260412200107.GB1691477@coredump.intra.peff.net>
- In-Reply-To
- <pull.2234.v10.git.git.1775994705.gitgitgadget@gmail.com>
On Sun, Apr 12, 2026 at 11:51:41AM +0000, Harald Nordgren via GitGitGadget wrote:
Show 8 quoted lines
> 4: 00e0b3196c ! 4: b6e5546d74 checkout: -m (--merge) uses autostash when switching branches
> @@ builtin/checkout.c: static int switch_branches(const struct checkout_opts *opts,
> ret = merge_working_tree(opts, &old_branch_info, new_branch_info, &writeout_error);
> + if (ret && opts->merge) {
> + create_autostash_ref_silent(the_repository,
> -+ "CHECKOUT_AUTOSTASH");
> ++ "CHECKOUT_AUTOSTASH_HEAD");
> [...]Thanks, I can confirm that this version is fine with the stricter ref-syntax checks.
-Peff