We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f51fe3e commit 5ac93b1Copy full SHA for 5ac93b1
git/objects/submodule/base.py
@@ -37,7 +37,7 @@
37
38
import os
39
import logging
40
-import tempfile
+import uuid
41
42
__all__ = ["Submodule", "UpdateProgress"]
43
@@ -992,7 +992,7 @@ def rename(self, new_name):
992
source_dir = mod.git_dir
993
# Let's be sure the submodule name is not so obviously tied to a directory
994
if destination_module_abspath.startswith(mod.git_dir):
995
- tmp_dir = self._module_abspath(self.repo, self.path, os.path.basename(tempfile.mkdtemp()))
+ tmp_dir = self._module_abspath(self.repo, self.path, str(uuid.uuid4()))
996
os.renames(source_dir, tmp_dir)
997
source_dir = tmp_dir
998
# end handle self-containment
0 commit comments