{"thread":{"id":"57164","subject":"Q: warning: unable to rmdir 'submodule': Directory not empty","startedAt":"2021-12-29T12:24:52Z","lastAt":"2021-12-29T12:26:03Z","messageCount":2,"participants":["Ulrich Windl"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"445173","messageId":"61CC5390020000A10004692A@gwsmtp.uni-regensburg.de","threadId":"57164","inReplyTo":null,"subject":"Q: warning: unable to rmdir 'submodule': Directory not empty","fromName":"Ulrich Windl","fromEmail":"ulrich.windl@rz.uni-regensburg.de","sentAt":"2021-12-29T12:24:48Z","receivedAt":"2021-12-29T12:24:52Z","isPatch":false,"sender":{"key":"ulrich.windl@rz.uni-regensburg.de","avatar":null},"body":"Hi!\n\nI wonder whether you'd think this is a bug:\nWhen a branch uses a submodule (named \"submodule\" here), and when you checkout another branch that does not (yet) have that submodule, I get an error message saying:\nwarning: unable to rmdir 'submodule': Directory not empty\n\nWell obviously the directory is not empty. The point is: Is the user expected to remove submodule directories manually before switching branches?\n\nWhen I tried \"git checkout master --recurse-submodules\" instead, the submodule directory was \"mostly deleted\", only leaving two object files that weren't \".gitignore\"d.\n(But the error message was the same)\n\nWouldn't a message like \"... submodule directory contains untracked files; won't delete those...\" be better?\n\nRegards,\nUlrich\n\n\n"},{"id":"445174","messageId":"61CC53D5020000A10004692E@gwsmtp.uni-regensburg.de","threadId":"57164","inReplyTo":"61CC5390020000A10004692A@gwsmtp.uni-regensburg.de","subject":"Antw: Q: warning: unable to rmdir 'submodule': Directory not empty","fromName":"Ulrich Windl","fromEmail":"ulrich.windl@rz.uni-regensburg.de","sentAt":"2021-12-29T12:25:57Z","receivedAt":"2021-12-29T12:26:03Z","isPatch":false,"sender":{"key":"ulrich.windl@rz.uni-regensburg.de","avatar":null},"body":"Sorry, I should have mentioned: git 2.26.2 on SLES12 SP5\n\n>>> Ulrich Windl schrieb am 29.12.2021 um 13:24 in Nachricht <61CC5390.C34 : 161 :\n60728>:\n> Hi!\n> \n> I wonder whether you'd think this is a bug:\n> When a branch uses a submodule (named \"submodule\" here), and when you \n> checkout another branch that does not (yet) have that submodule, I get an \n> error message saying:\n> warning: unable to rmdir 'submodule': Directory not empty\n> \n> Well obviously the directory is not empty. The point is: Is the user \n> expected to remove submodule directories manually before switching branches?\n> \n> When I tried \"git checkout master --recurse-submodules\" instead, the \n> submodule directory was \"mostly deleted\", only leaving two object files that \n> weren't \".gitignore\"d.\n> (But the error message was the same)\n> \n> Wouldn't a message like \"... submodule directory contains untracked files; \n> won't delete those...\" be better?\n> \n> Regards,\n> Ulrich\n> \n> \n\n\n\n\n"}]}