| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent cc9a4e0 commit 79db2ac
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -9,6 +9,7 @@ | |||
| 9 | 9 | import ntpath | |
| 10 | 10 | import os | |
| 11 | 11 | import os.path as osp | |
| 12 | + import shlex | ||
| 12 | 13 | import stat | |
| 13 | 14 | import sys | |
| 14 | 15 | import uuid | |
@@ -363,6 +364,17 @@ def _clone_repo( | |||
| 363 | 364 | module_abspath = cls._module_abspath(repo, path, name) | |
| 364 | 365 | module_checkout_path = module_abspath | |
| 365 | 366 | if cls._need_gitfile_submodules(repo.git): | |
| 367 | + if not allow_unsafe_options: | ||
| 368 | + Git.check_unsafe_options( | ||
| 369 | + Git._option_candidates([], kwargs), repo.unsafe_git_clone_options | ||
| 370 | + ) | ||
| 371 | + multi_options = kwargs.get("multi_options") | ||
| 372 | + if multi_options: | ||
| 373 | + Git.check_unsafe_options( | ||
| 374 | + shlex.split(" ".join(cast("Sequence[str]", multi_options))), | ||
| 375 | + repo.unsafe_git_clone_options, | ||
| 376 | + ) | ||
| 377 | + allow_unsafe_options = True | ||
| 366 | 378 | kwargs["separate_git_dir"] = module_abspath | |
| 367 | 379 | module_abspath_dir = osp.dirname(module_abspath) | |
| 368 | 380 | if not osp.isdir(module_abspath_dir): | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -954,6 +954,7 @@ def test_update_rejects_parent_component_in_name(self, rwdir): | |||
| 954 | 954 | source.working_tree_dir, | |
| 955 | 955 | osp.join(clone.working_tree_dir, "module"), | |
| 956 | 956 | separate_git_dir=osp.join(rwdir, "escaped", "module"), | |
| 957 | + allow_unsafe_options=True, | ||
| 957 | 958 | ) | |
| 958 | 959 | with pytest.raises(ValueError, match="submodule name"): | |
| 959 | 960 | clone.submodules[0].update(init=True) | |
| Back | FazBrowse Home | New Git URL |
0 commit comments