{"thread":{"id":"50046","subject":"[PATCH] worktree: allow to (re)move worktrees with uninitialized submodules","startedAt":"2018-12-16T12:12:46Z","lastAt":"2019-01-06T07:05:27Z","messageCount":6,"participants":["Nguyễn Thái Ngọc Duy","Eric Sunshine","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"365451","messageId":"20181216121239.10017-1-pclouds@gmail.com","threadId":"50046","inReplyTo":null,"subject":"[PATCH] worktree: allow to (re)move worktrees with uninitialized submodules","fromName":"Nguyễn Thái Ngọc Duy","fromEmail":"pclouds@gmail.com","sentAt":"2018-12-16T12:12:39Z","receivedAt":"2018-12-16T12:12:46Z","isPatch":true,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"Uninitialized submodules have nothing valueable for us to be worried\nabout. They are just SHA-1. Let \"worktree remove\" and \"worktree move\"\ncontinue in this case so that people can still use multiple worktrees\non repos with optional submodules that are never populated, like\nsha1collisiondetection in git.git when checked out by doc-diff script.\n\nNote that for \"worktree remove\", it is possible that a user\ninitializes a submodule (*), makes some commits (but not push), then\ndeinitializes it. At that point, the submodule is unpopulated, but the\nprecious new commits are still in\n\n    $GIT_COMMON_DIR/worktrees/<worktree>/modules/<submodule>\n\ndirectory and we should not allow removing the worktree or we lose\nthose commits forever. The new directory check is added to prevent\nthis.\n\n(*) yes they are screwed anyway by doing this since \"git submodule\"\n    would add submodule.* in $GIT_COMMON_DIR/config, which is shared\n    across multiple worktrees. But it does not mean we let them be\n    screwed even more.\n\nSigned-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>\n---\n builtin/worktree.c | 21 +++++++++++++++++----\n 1 file changed, 17 insertions(+), 4 deletions(-)\n\ndiff --git a/builtin/worktree.c b/builtin/worktree.c\nindex 5e84026177..af03b83a26 100644\n--- a/builtin/worktree.c\n+++ b/builtin/worktree.c\n@@ -9,6 +9,7 @@\n #include \"refs.h\"\n #include \"run-command.h\"\n #include \"sigchain.h\"\n+#include \"submodule.h\"\n #include \"refs.h\"\n #include \"utf8.h\"\n #include \"worktree.h\"\n@@ -724,20 +725,32 @@ static int unlock_worktree(int ac, const char **av, const char *prefix)\n static void validate_no_submodules(const struct worktree *wt)\n {\n \tstruct index_state istate = { NULL };\n+\tstruct strbuf path = STRBUF_INIT;\n \tint i, found_submodules = 0;\n \n+\tif (is_directory(worktree_git_path(wt, \"modules\")))\n+\t\tdie(_(\"working trees containing submodules cannot be moved or removed\"));\n+\n \tif (read_index_from(&istate, worktree_git_path(wt, \"index\"),\n \t\t\t    get_worktree_git_dir(wt)) > 0) {\n \t\tfor (i = 0; i < istate.cache_nr; i++) {\n \t\t\tstruct cache_entry *ce = istate.cache[i];\n+\t\t\tint err;\n \n-\t\t\tif (S_ISGITLINK(ce->ce_mode)) {\n-\t\t\t\tfound_submodules = 1;\n-\t\t\t\tbreak;\n-\t\t\t}\n+\t\t\tif (!S_ISGITLINK(ce->ce_mode))\n+\t\t\t\tcontinue;\n+\n+\t\t\tstrbuf_reset(&path);\n+\t\t\tstrbuf_addf(&path, \"%s/%s\", wt->path, ce->name);\n+\t\t\tif (!is_submodule_populated_gently(path.buf, &err))\n+\t\t\t\tcontinue;\n+\n+\t\t\tfound_submodules = 1;\n+\t\t\tbreak;\n \t\t}\n \t}\n \tdiscard_index(&istate);\n+\tstrbuf_release(&path);\n \n \tif (found_submodules)\n \t\tdie(_(\"working trees containing submodules cannot be moved or removed\"));\n-- \n2.20.0.482.g66447595a7\n\n"},{"id":"365452","messageId":"CAPig+cQLz+mx8pXMCsYW_0=1C8GzFvzBb=uatfwLK0Dpj944Jg@mail.gmail.com","threadId":"50046","inReplyTo":"20181216121239.10017-1-pclouds@gmail.com","subject":"Re: [PATCH] worktree: allow to (re)move worktrees with uninitialized submodules","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2018-12-16T13:18:55Z","receivedAt":"2018-12-16T13:19:08Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Sun, Dec 16, 2018 at 7:12 AM Nguyễn Thái Ngọc Duy <pclouds@gmail.com> wrote:\n> Uninitialized submodules have nothing valueable for us to be worried\n> about. They are just SHA-1. Let \"worktree remove\" and \"worktree move\"\n> continue in this case so that people can still use multiple worktrees\n> on repos with optional submodules that are never populated, like\n> sha1collisiondetection in git.git when checked out by doc-diff script.\n> [...]\n> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>\n> ---\n> diff --git a/builtin/worktree.c b/builtin/worktree.c\n> @@ -724,20 +725,32 @@ static int unlock_worktree(int ac, const char **av, const char *prefix)\n>  static void validate_no_submodules(const struct worktree *wt)\n>  {\n> +       if (is_directory(worktree_git_path(wt, \"modules\")))\n> +               die(_(\"working trees containing submodules cannot be moved or removed\"));\n> +\n>         if (read_index_from(&istate, worktree_git_path(wt, \"index\"),\n>                             get_worktree_git_dir(wt)) > 0) {\n>                 [...]\n> +                       found_submodules = 1;\n> +                       break;\n>         }\n>         if (found_submodules)\n>                 die(_(\"working trees containing submodules cannot be moved or removed\"));\n\nNot worth a re-roll, but an alternate way to structure this to avoid\nduplicating the die() message would be:\n\n    if (is_directory(...))\n        found_submodules = 1;\n    else if (read_index_from(...)) {\n        ...\n        found_submodules = 1;\n        break;\n    }\n    if (found_submodules)\n        die(...);\n"},{"id":"365459","messageId":"20181216144657.31181-1-pclouds@gmail.com","threadId":"50046","inReplyTo":"20181216121239.10017-1-pclouds@gmail.com","subject":"[PATCH v2] worktree: allow to (re)move worktrees with uninitialized submodules","fromName":"Nguyễn Thái Ngọc Duy","fromEmail":"pclouds@gmail.com","sentAt":"2018-12-16T14:46:57Z","receivedAt":"2018-12-16T14:47:05Z","isPatch":true,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"Uninitialized submodules have nothing valueable for us to be worried\nabout. They are just SHA-1. Let \"worktree remove\" and \"worktree move\"\ncontinue in this case so that people can still use multiple worktrees\non repos with optional submodules that are never populated, like\nsha1collisiondetection in git.git when checked out by doc-diff script.\n\nNote that for \"worktree remove\", it is possible that a user\ninitializes a submodule (*), makes some commits (but not push), then\ndeinitializes it. At that point, the submodule is unpopulated, but the\nprecious new commits are still in\n\n    $GIT_COMMON_DIR/worktrees/<worktree>/modules/<submodule>\n\ndirectory and we should not allow removing the worktree or we lose\nthose commits forever. The new directory check is added to prevent\nthis.\n\n(*) yes they are screwed anyway by doing this since \"git submodule\"\n    would add submodule.* in $GIT_COMMON_DIR/config, which is shared\n    across multiple worktrees. But it does not mean we let them be\n    screwed even more.\n\nSigned-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>\n---\n Fixed Eric's comment. I was a bit annoyed by the duplicate die() too\n but didn't think of adding \"else\" in front of \"if (read_index\"\n\n builtin/worktree.c | 29 +++++++++++++++++++++++------\n 1 file changed, 23 insertions(+), 6 deletions(-)\n\ndiff --git a/builtin/worktree.c b/builtin/worktree.c\nindex 5e84026177..3f9907fcc9 100644\n--- a/builtin/worktree.c\n+++ b/builtin/worktree.c\n@@ -9,6 +9,7 @@\n #include \"refs.h\"\n #include \"run-command.h\"\n #include \"sigchain.h\"\n+#include \"submodule.h\"\n #include \"refs.h\"\n #include \"utf8.h\"\n #include \"worktree.h\"\n@@ -724,20 +725,36 @@ static int unlock_worktree(int ac, const char **av, const char *prefix)\n static void validate_no_submodules(const struct worktree *wt)\n {\n \tstruct index_state istate = { NULL };\n+\tstruct strbuf path = STRBUF_INIT;\n \tint i, found_submodules = 0;\n \n-\tif (read_index_from(&istate, worktree_git_path(wt, \"index\"),\n-\t\t\t    get_worktree_git_dir(wt)) > 0) {\n+\tif (is_directory(worktree_git_path(wt, \"modules\"))) {\n+\t\t/*\n+\t\t * There could be false positives, e.g. the \"modules\"\n+\t\t * directory exists but is empty. But it's a rare case and\n+\t\t * this simpler check is probably good enough for now.\n+\t\t */\n+\t\tfound_submodules = 1;\n+\t} else if (read_index_from(&istate, worktree_git_path(wt, \"index\"),\n+\t\t\t\t   get_worktree_git_dir(wt)) > 0) {\n \t\tfor (i = 0; i < istate.cache_nr; i++) {\n \t\t\tstruct cache_entry *ce = istate.cache[i];\n+\t\t\tint err;\n \n-\t\t\tif (S_ISGITLINK(ce->ce_mode)) {\n-\t\t\t\tfound_submodules = 1;\n-\t\t\t\tbreak;\n-\t\t\t}\n+\t\t\tif (!S_ISGITLINK(ce->ce_mode))\n+\t\t\t\tcontinue;\n+\n+\t\t\tstrbuf_reset(&path);\n+\t\t\tstrbuf_addf(&path, \"%s/%s\", wt->path, ce->name);\n+\t\t\tif (!is_submodule_populated_gently(path.buf, &err))\n+\t\t\t\tcontinue;\n+\n+\t\t\tfound_submodules = 1;\n+\t\t\tbreak;\n \t\t}\n \t}\n \tdiscard_index(&istate);\n+\tstrbuf_release(&path);\n \n \tif (found_submodules)\n \t\tdie(_(\"working trees containing submodules cannot be moved or removed\"));\n-- \n2.20.0.482.g66447595a7\n\n"},{"id":"366160","messageId":"xmqqftu8avfu.fsf@gitster-ct.c.googlers.com","threadId":"50046","inReplyTo":"20181216144657.31181-1-pclouds@gmail.com","subject":"Re: [PATCH v2] worktree: allow to (re)move worktrees with uninitialized submodules","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2019-01-04T22:51:01Z","receivedAt":"2019-01-04T22:51:07Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Nguyễn Thái Ngọc Duy  <pclouds@gmail.com> writes:\n\n> Uninitialized submodules have nothing valueable for us to be worried\n> about. They are just SHA-1. Let \"worktree remove\" and \"worktree move\"\n> continue in this case so that people can still use multiple worktrees\n> on repos with optional submodules that are never populated, like\n> sha1collisiondetection in git.git when checked out by doc-diff script.\n>\n> Note that for \"worktree remove\", it is possible that a user\n> initializes a submodule (*), makes some commits (but not push), then\n> deinitializes it. At that point, the submodule is unpopulated, but the\n> precious new commits are still in\n>\n>     $GIT_COMMON_DIR/worktrees/<worktree>/modules/<submodule>\n>\n> directory and we should not allow removing the worktree or we lose\n> those commits forever. The new directory check is added to prevent\n> this.\n>\n> (*) yes they are screwed anyway by doing this since \"git submodule\"\n>     would add submodule.* in $GIT_COMMON_DIR/config, which is shared\n>     across multiple worktrees. But it does not mean we let them be\n>     screwed even more.\n>\n> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>\n> ---\n>  Fixed Eric's comment. I was a bit annoyed by the duplicate die() too\n>  but didn't think of adding \"else\" in front of \"if (read_index\"\n>\n>  builtin/worktree.c | 29 +++++++++++++++++++++++------\n>  1 file changed, 23 insertions(+), 6 deletions(-)\n\nIs this a fair description for this 1-patch topic?\n\n\t\"git worktree remove\" and \"git worktree move\" failed to work\n\twhen there is an uninitialized submodule, which has been fixed.\n\nIf so, can we have a test case to cover this fix?\n\nThanks.\n\n> diff --git a/builtin/worktree.c b/builtin/worktree.c\n> index 5e84026177..3f9907fcc9 100644\n> --- a/builtin/worktree.c\n> +++ b/builtin/worktree.c\n> @@ -9,6 +9,7 @@\n>  #include \"refs.h\"\n>  #include \"run-command.h\"\n>  #include \"sigchain.h\"\n> +#include \"submodule.h\"\n>  #include \"refs.h\"\n>  #include \"utf8.h\"\n>  #include \"worktree.h\"\n> @@ -724,20 +725,36 @@ static int unlock_worktree(int ac, const char **av, const char *prefix)\n>  static void validate_no_submodules(const struct worktree *wt)\n>  {\n>  \tstruct index_state istate = { NULL };\n> +\tstruct strbuf path = STRBUF_INIT;\n>  \tint i, found_submodules = 0;\n>  \n> -\tif (read_index_from(&istate, worktree_git_path(wt, \"index\"),\n> -\t\t\t    get_worktree_git_dir(wt)) > 0) {\n> +\tif (is_directory(worktree_git_path(wt, \"modules\"))) {\n> +\t\t/*\n> +\t\t * There could be false positives, e.g. the \"modules\"\n> +\t\t * directory exists but is empty. But it's a rare case and\n> +\t\t * this simpler check is probably good enough for now.\n> +\t\t */\n> +\t\tfound_submodules = 1;\n> +\t} else if (read_index_from(&istate, worktree_git_path(wt, \"index\"),\n> +\t\t\t\t   get_worktree_git_dir(wt)) > 0) {\n>  \t\tfor (i = 0; i < istate.cache_nr; i++) {\n>  \t\t\tstruct cache_entry *ce = istate.cache[i];\n> +\t\t\tint err;\n>  \n> -\t\t\tif (S_ISGITLINK(ce->ce_mode)) {\n> -\t\t\t\tfound_submodules = 1;\n> -\t\t\t\tbreak;\n> -\t\t\t}\n> +\t\t\tif (!S_ISGITLINK(ce->ce_mode))\n> +\t\t\t\tcontinue;\n> +\n> +\t\t\tstrbuf_reset(&path);\n> +\t\t\tstrbuf_addf(&path, \"%s/%s\", wt->path, ce->name);\n> +\t\t\tif (!is_submodule_populated_gently(path.buf, &err))\n> +\t\t\t\tcontinue;\n> +\n> +\t\t\tfound_submodules = 1;\n> +\t\t\tbreak;\n>  \t\t}\n>  \t}\n>  \tdiscard_index(&istate);\n> +\tstrbuf_release(&path);\n>  \n>  \tif (found_submodules)\n>  \t\tdie(_(\"working trees containing submodules cannot be moved or removed\"));\n"},{"id":"366172","messageId":"20190105050840.18409-1-pclouds@gmail.com","threadId":"50046","inReplyTo":"20181216144657.31181-1-pclouds@gmail.com","subject":"[PATCH v3] worktree: allow to (re)move worktrees with uninitialized submodules","fromName":"Nguyễn Thái Ngọc Duy","fromEmail":"pclouds@gmail.com","sentAt":"2019-01-05T05:08:40Z","receivedAt":"2019-01-05T05:08:48Z","isPatch":true,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"Uninitialized submodules have nothing valueable for us to be worried\nabout. They are just SHA-1. Let \"worktree remove\" and \"worktree move\"\ncontinue in this case so that people can still use multiple worktrees\non repos with optional submodules that are never populated, like\nsha1collisiondetection in git.git when checked out by doc-diff script.\n\nNote that for \"worktree remove\", it is possible that a user\ninitializes a submodule (*), makes some commits (but not push), then\ndeinitializes it. At that point, the submodule is unpopulated, but the\nprecious new commits are still in\n\n    $GIT_COMMON_DIR/worktrees/<worktree>/modules/<submodule>\n\ndirectory and we should not allow removing the worktree or we lose\nthose commits forever. The new directory check is added to prevent\nthis.\n\n(*) yes they are screwed anyway by doing this since \"git submodule\"\n    would add submodule.* in $GIT_COMMON_DIR/config, which is shared\n    across multiple worktrees. But it does not mean we let them be\n    screwed even more.\n\nSigned-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>\n---\n v3 adds tests. This test file is being renamed by\n tg/checkout-no-overlay but it seems rename is handled correctly, no\n merge conflicts on 'pu'.\n\n builtin/worktree.c       | 29 +++++++++++++++++++++++------\n t/t2028-worktree-move.sh | 37 +++++++++++++++++++++++++++++++++++++\n 2 files changed, 60 insertions(+), 6 deletions(-)\n\ndiff --git a/builtin/worktree.c b/builtin/worktree.c\nindex 5e84026177..3f9907fcc9 100644\n--- a/builtin/worktree.c\n+++ b/builtin/worktree.c\n@@ -9,6 +9,7 @@\n #include \"refs.h\"\n #include \"run-command.h\"\n #include \"sigchain.h\"\n+#include \"submodule.h\"\n #include \"refs.h\"\n #include \"utf8.h\"\n #include \"worktree.h\"\n@@ -724,20 +725,36 @@ static int unlock_worktree(int ac, const char **av, const char *prefix)\n static void validate_no_submodules(const struct worktree *wt)\n {\n \tstruct index_state istate = { NULL };\n+\tstruct strbuf path = STRBUF_INIT;\n \tint i, found_submodules = 0;\n \n-\tif (read_index_from(&istate, worktree_git_path(wt, \"index\"),\n-\t\t\t    get_worktree_git_dir(wt)) > 0) {\n+\tif (is_directory(worktree_git_path(wt, \"modules\"))) {\n+\t\t/*\n+\t\t * There could be false positives, e.g. the \"modules\"\n+\t\t * directory exists but is empty. But it's a rare case and\n+\t\t * this simpler check is probably good enough for now.\n+\t\t */\n+\t\tfound_submodules = 1;\n+\t} else if (read_index_from(&istate, worktree_git_path(wt, \"index\"),\n+\t\t\t\t   get_worktree_git_dir(wt)) > 0) {\n \t\tfor (i = 0; i < istate.cache_nr; i++) {\n \t\t\tstruct cache_entry *ce = istate.cache[i];\n+\t\t\tint err;\n \n-\t\t\tif (S_ISGITLINK(ce->ce_mode)) {\n-\t\t\t\tfound_submodules = 1;\n-\t\t\t\tbreak;\n-\t\t\t}\n+\t\t\tif (!S_ISGITLINK(ce->ce_mode))\n+\t\t\t\tcontinue;\n+\n+\t\t\tstrbuf_reset(&path);\n+\t\t\tstrbuf_addf(&path, \"%s/%s\", wt->path, ce->name);\n+\t\t\tif (!is_submodule_populated_gently(path.buf, &err))\n+\t\t\t\tcontinue;\n+\n+\t\t\tfound_submodules = 1;\n+\t\t\tbreak;\n \t\t}\n \t}\n \tdiscard_index(&istate);\n+\tstrbuf_release(&path);\n \n \tif (found_submodules)\n \t\tdie(_(\"working trees containing submodules cannot be moved or removed\"));\ndiff --git a/t/t2028-worktree-move.sh b/t/t2028-worktree-move.sh\nindex 33c0337733..939d18d728 100755\n--- a/t/t2028-worktree-move.sh\n+++ b/t/t2028-worktree-move.sh\n@@ -112,6 +112,26 @@ test_expect_success 'move locked worktree (force)' '\n \tgit worktree move --force --force flump ploof\n '\n \n+test_expect_success 'move a repo with uninitialized submodule' '\n+\tgit init withsub &&\n+\t(\n+\t\tcd withsub &&\n+\t\ttest_commit initial &&\n+\t\tgit submodule add \"$PWD\"/.git sub &&\n+\t\tgit commit -m withsub &&\n+\t\tgit worktree add second HEAD &&\n+\t\tgit worktree move second third\n+\t)\n+'\n+\n+test_expect_success 'not move a repo with initialized submodule' '\n+\t(\n+\t\tcd withsub &&\n+\t\tgit -C third submodule update &&\n+\t\ttest_must_fail git worktree move third forth\n+\t)\n+'\n+\n test_expect_success 'remove main worktree' '\n \ttest_must_fail git worktree remove .\n '\n@@ -185,4 +205,21 @@ test_expect_success 'remove cleans up .git/worktrees when empty' '\n \t)\n '\n \n+test_expect_success 'remove a repo with uninitialized submodule' '\n+\t(\n+\t\tcd withsub &&\n+\t\tgit worktree add to-remove HEAD &&\n+\t\tgit worktree remove to-remove\n+\t)\n+'\n+\n+test_expect_success 'not remove a repo with initialized submodule' '\n+\t(\n+\t\tcd withsub &&\n+\t\tgit worktree add to-remove HEAD &&\n+\t\tgit -C to-remove submodule update &&\n+\t\ttest_must_fail git worktree remove to-remove\n+\t)\n+'\n+\n test_done\n-- \n2.20.0.482.g66447595a7\n\n"},{"id":"366205","messageId":"CAPig+cTt3JZKjE0Kq+ZaHfYvqvXOvtADGfb6kbRKiUTX2NDdQQ@mail.gmail.com","threadId":"50046","inReplyTo":"xmqqftu8avfu.fsf@gitster-ct.c.googlers.com","subject":"Re: [PATCH v2] worktree: allow to (re)move worktrees with uninitialized submodules","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2019-01-06T07:01:51Z","receivedAt":"2019-01-06T07:05:27Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Fri, Jan 4, 2019 at 5:51 PM Junio C Hamano <gitster@pobox.com> wrote:\n> Nguyễn Thái Ngọc Duy  <pclouds@gmail.com> writes:\n> > Uninitialized submodules have nothing valueable for us to be worried\n> > about. They are just SHA-1. Let \"worktree remove\" and \"worktree move\"\n> > continue in this case so that people can still use multiple worktrees\n> > on repos with optional submodules that are never populated, like\n> > sha1collisiondetection in git.git when checked out by doc-diff script.\n>\n> Is this a fair description for this 1-patch topic?\n>\n>         \"git worktree remove\" and \"git worktree move\" failed to work\n>         when there is an uninitialized submodule, which has been fixed.\n\nSaying \"failed to work\" makes it sound as if those two subcommands are\nbroken or buggy, which is not the case. Instead, they are overly\ncautious and refuse to allow the operation if _any_ submodule\n(initialized or not) is detected. This patch just loosens that check\nto allow the operations to succeed for uninitialized submodules, thus\navoiding this (existing) annoying behavior, using git.git as an\nexample:\n\n    % cd git\n    % git worktree add --detach ../foo\n    % git worktree remove ../foo\n    fatal: working trees containing submodules cannot be moved or removed\n\nPerhaps the change could instead be summarized as:\n\n    \"git worktree remove\" and \"git worktree move\" were overly\n    cautious, refusing to operate if any submodule was detected, even\n    an uninitialized one. This safeguard has been refined to take only\n    initialized submodules into account since worktrees with\n    uninitialized ones can be safely removed and moved.\n"}]}