| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 9729ed3 commit cc9a4e0
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -159,6 +159,8 @@ class Repo: | |||
| 159 | 159 | "-c", | |
| 160 | 160 | # Can install hooks that execute during clone: | |
| 161 | 161 | "--template", | |
| 162 | + # Redirects the repository metadata to a caller-controlled path: | ||
| 163 | + "--separate-git-dir", | ||
| 162 | 164 | # Fetches from an additional caller-controlled URI: | |
| 163 | 165 | "--bundle-uri", | |
| 164 | 166 | ] | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -133,6 +133,7 @@ def test_clone_unsafe_options(self, rw_repo): | |||
| 133 | 133 | "-vcprotocol.ext.allow=always", | |
| 134 | 134 | f"--template={tmp_dir}", | |
| 135 | 135 | f"--bundle-uri=file://{tmp_dir}", | |
| 136 | + f"--separate-git-dir={tmp_dir / 'git-dir'}", | ||
| 136 | 137 | ] | |
| 137 | 138 | for unsafe_option in unsafe_options: | |
| 138 | 139 | with self.assertRaises(UnsafeOptionError): | |
@@ -149,6 +150,7 @@ def test_clone_unsafe_options(self, rw_repo): | |||
| 149 | 150 | {"c": "protocol.ext.allow=always"}, | |
| 150 | 151 | {"template": tmp_dir}, | |
| 151 | 152 | {"bundle_uri": f"file://{tmp_dir}"}, | |
| 153 | + {"separate_git_dir": tmp_dir / "git-dir"}, | ||
| 152 | 154 | ] | |
| 153 | 155 | for unsafe_option in unsafe_options: | |
| 154 | 156 | with self.assertRaises(UnsafeOptionError): | |
@@ -258,6 +260,7 @@ def test_clone_from_unsafe_options(self, rw_repo): | |||
| 258 | 260 | "-c protocol.ext.allow=always", | |
| 259 | 261 | "-cprotocol.ext.allow=always", | |
| 260 | 262 | "-vcprotocol.ext.allow=always", | |
| 263 | + f"--separate-git-dir={tmp_dir / 'git-dir'}", | ||
| 261 | 264 | ] | |
| 262 | 265 | for unsafe_option in unsafe_options: | |
| 263 | 266 | with self.assertRaises(UnsafeOptionError): | |
@@ -270,6 +273,7 @@ def test_clone_from_unsafe_options(self, rw_repo): | |||
| 270 | 273 | {"u": f"touch {tmp_file}"}, | |
| 271 | 274 | {"config": "protocol.ext.allow=always"}, | |
| 272 | 275 | {"c": "protocol.ext.allow=always"}, | |
| 276 | + {"separate_git_dir": tmp_dir / "git-dir"}, | ||
| 273 | 277 | ] | |
| 274 | 278 | for unsafe_option in unsafe_options: | |
| 275 | 279 | with self.assertRaises(UnsafeOptionError): | |
| Back | FazBrowse Home | New Git URL |
0 commit comments