Merge branch 'nd/switch-and-restore'
"git restore --staged" did not correctly update the cache-tree structure, resulting in bogus trees to be written afterwards, which has been corrected. * nd/switch-and-restore: restore: invalidate cache-tree when removing entries with --staged
This commit is contained in:
@ -524,6 +524,8 @@ static int checkout_paths(const struct checkout_opts *opts,
|
||||
/* Now we are committed to check them out */
|
||||
if (opts->checkout_worktree)
|
||||
errs |= checkout_worktree(opts);
|
||||
else
|
||||
remove_marked_cache_entries(&the_index, 1);
|
||||
|
||||
/*
|
||||
* Allow updating the index when checking out from the index.
|
||||
|
Reference in New Issue
Block a user