summaryrefslogtreecommitdiff
path: root/submodule.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2021-10-13 22:15:57 (GMT)
committerJunio C Hamano <gitster@pobox.com>2021-10-13 22:15:57 (GMT)
commita7c2daa06d6f7d8fd13a1d72f23741acbaeba522 (patch)
treeb1b0095d267b98188a7ae24ac77934298b665649 /submodule.c
parent1fdfb774aaaa0ee8acb0a1ec9b601e5a2d2999f1 (diff)
parent0e29222e0c2f68118cdd3412515539b74433b732 (diff)
downloadgit-a7c2daa06d6f7d8fd13a1d72f23741acbaeba522.zip
git-a7c2daa06d6f7d8fd13a1d72f23741acbaeba522.tar.gz
git-a7c2daa06d6f7d8fd13a1d72f23741acbaeba522.tar.bz2
Merge branch 'en/removing-untracked-fixes'
Various fixes in code paths that move untracked files away to make room. * en/removing-untracked-fixes: Documentation: call out commands that nuke untracked files/directories Comment important codepaths regarding nuking untracked files/dirs unpack-trees: avoid nuking untracked dir in way of locally deleted file unpack-trees: avoid nuking untracked dir in way of unmerged file Change unpack_trees' 'reset' flag into an enum Remove ignored files by default when they are in the way unpack-trees: make dir an internal-only struct unpack-trees: introduce preserve_ignored to unpack_trees_options read-tree, merge-recursive: overwrite ignored files by default checkout, read-tree: fix leak of unpack_trees_options.dir t2500: add various tests for nuking untracked files
Diffstat (limited to 'submodule.c')
-rw-r--r--submodule.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/submodule.c b/submodule.c
index 9648751..f3c9963 100644
--- a/submodule.c
+++ b/submodule.c
@@ -1896,6 +1896,7 @@ static void submodule_reset_index(const char *path)
strvec_pushf(&cp.args, "--super-prefix=%s%s/",
get_super_prefix_or_empty(), path);
+ /* TODO: determine if this might overwright untracked files */
strvec_pushl(&cp.args, "read-tree", "-u", "--reset", NULL);
strvec_push(&cp.args, empty_tree_oid_hex());