Merge branch 'nd/switch-and-restore'
[gitweb.git] / builtin / reset.c
index 6d9397c84434c4ba09874a1146095d3d396e045c..c2bb35a4b7048c94f79057ed3db4cbdd30a28504 100644 (file)
@@ -386,6 +386,7 @@ int cmd_reset(int argc, const char **argv, const char *prefix)
                        int flags = quiet ? REFRESH_QUIET : REFRESH_IN_PORCELAIN;
                        if (read_from_tree(&pathspec, &oid, intent_to_add))
                                return 1;
+                       the_index.updated_skipworktree = 1;
                        if (!quiet && get_git_work_tree()) {
                                uint64_t t_begin, t_delta_in_ms;