From: Harald Nordgren via GitGitGadget Date: Fri, 10 Apr 2026 21:01:09 GMT Subject: [PATCH v9 0/4] checkout: 'autostash' for branch switching Message-ID: In-Reply-To: Harald Nordgren (4): stash: add --label-ours, --label-theirs, --label-base for apply sequencer: allow create_autostash to run silently sequencer: teach autostash apply to take optional conflict marker labels checkout: -m (--merge) uses autostash when switching branches Documentation/git-checkout.adoc | 58 +++++----- Documentation/git-stash.adoc | 11 +- Documentation/git-switch.adoc | 33 +++--- builtin/checkout.c | 138 ++++++++++------------ builtin/stash.c | 32 ++++-- sequencer.c | 67 ++++++++--- sequencer.h | 4 + t/t3420-rebase-autostash.sh | 24 +++- t/t3903-stash.sh | 29 +++++ t/t7201-co.sh | 195 ++++++++++++++++++++++++++++++++ t/t7600-merge.sh | 2 +- xdiff-interface.c | 12 ++ xdiff-interface.h | 1 + xdiff/xmerge.c | 6 +- 14 files changed, 455 insertions(+), 157 deletions(-) base-commit: cd412a49627774a14b3e49237109a77bd3ea70c0 Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-2234%2FHaraldNordgren%2Fcheckout_autostash-v9 Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-2234/HaraldNordgren/checkout_autostash-v9 Pull-Request: https://github.com/git/git/pull/2234 Range-diff vs v8: 1: 8fcf377820 ! 1: 5d5dc1f60e stash: add --ours-label, --theirs-label, --base-label for apply @@ Metadata Author: Harald Nordgren ## Commit message ## - stash: add --ours-label, --theirs-label, --base-label for apply + stash: add --label-ours, --label-theirs, --label-base for apply Allow callers of "git stash apply" to pass custom labels for conflict markers instead of the default "Updated upstream" and "Stashed changes". @@ Documentation/git-stash.adoc: git stash list [] git stash drop [-q | --quiet] [] git stash pop [--index] [-q | --quiet] [] -git stash apply [--index] [-q | --quiet] [] -+git stash apply [--index] [-q | --quiet] [--ours-label=