]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'hn/git-checkout-m-with-stash' into jch
authorJunio C Hamano <gitster@pobox.com>
Tue, 28 Apr 2026 01:13:28 +0000 (10:13 +0900)
committerJunio C Hamano <gitster@pobox.com>
Tue, 28 Apr 2026 01:13:28 +0000 (10:13 +0900)
"git checkout -m another-branch" was invented to deal with local
changes to paths that are different between the current and the new
branch, but it gave only one chance to resolve conflicts.  The command
was taught to create a stash to save the local changes.

* hn/git-checkout-m-with-stash:
  checkout -m: autostash when switching branches
  checkout: rollback lock on early returns in merge_working_tree
  sequencer: teach autostash apply to take optional conflict marker labels
  sequencer: allow create_autostash to run silently
  stash: add --label-ours, --label-theirs, --label-base for apply

1  2 
builtin/checkout.c

index ac0186a33e559a0ae2e6a9e63ae53373c58d3c1a,d02183b245d4b80e7d28ec52c02b665a70cdf593..188b3af921f3117830586ee778018f4bac2f7f70
@@@ -30,8 -29,8 +29,9 @@@
  #include "repo-settings.h"
  #include "resolve-undo.h"
  #include "revision.h"
+ #include "sequencer.h"
  #include "setup.h"
 +#include "strvec.h"
  #include "submodule.h"
  #include "symlinks.h"
  #include "trace2.h"