We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 336bf91 commit 3bd326cCopy full SHA for 3bd326c
builtin/checkout.c
@@ -641,6 +641,10 @@ static int checkout_paths(const struct checkout_opts *opts,
641
checkout_index = opts->checkout_index;
642
643
if (checkout_index) {
644
+ /* Some scenarios may update skipworktree bits, such as
645
+ * `restore --staged` after `cherry-pick -n` or `reset --soft`
646
+ */
647
+ the_repository->index->updated_skipworktree = 1;
648
if (write_locked_index(the_repository->index, &lock_file, COMMIT_LOCK))
649
die(_("unable to write new index file"));
650
} else {
0 commit comments