(repo: Repository)
| 226 | |
| 227 | @utils.requires_network |
| 228 | def test_head_id_null(repo: Repository) -> None: |
| 229 | gitmodules_newlines = ( |
| 230 | '\n' |
| 231 | '[submodule "uncommitted_submodule"]\n' |
| 232 | ' path = pygit2\n' |
| 233 | ' url = https://github.com/libgit2/pygit2\n' |
| 234 | '\n' |
| 235 | ) |
| 236 | with open(Path(repo.workdir, '.gitmodules'), 'a') as f: |
| 237 | f.write(gitmodules_newlines) |
| 238 | |
| 239 | subm = repo.submodules['uncommitted_submodule'] |
| 240 | |
| 241 | # The submodule isn't in the HEAD yet, so head_id should be None |
| 242 | assert subm.head_id is None |
| 243 | |
| 244 | |
| 245 | @utils.requires_network |
nothing calls this directly
no test coverage detected
searching dependent graphs…