| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent a41a8b9 commit 27c31e2
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -159,7 +159,7 @@ def _config_parser(cls, repo, parent_commit, read_only): | |||
| 159 | 159 | if not repo.bare and parent_matches_head: | |
| 160 | 160 | fp_module = cls.k_modules_file | |
| 161 | 161 | fp_module_path = os.path.join(repo.working_tree_dir, fp_module) | |
| 162 | - if not os.path.isfile(fp_module_path): | ||
| 162 | + if read_only and not os.path.isfile(fp_module_path): | ||
| 163 | 163 | raise IOError("%s file was not accessible" % fp_module_path) | |
| 164 | 164 | # END handle existance | |
| 165 | 165 | fp_module = fp_module_path | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -582,3 +582,10 @@ def test_root_module(self, rwrepo): | |||
| 582 | 582 | ||
| 583 | 583 | # gitdb: has either 1 or 2 submodules depending on the version | |
| 584 | 584 | assert len(nsm.children()) >= 1 and nsmc.module_exists() | |
| 585 | + | ||
| 586 | + @with_rw_repo(k_no_subm_tag, bare=False) | ||
| 587 | + def test_first_submodule(self, rwrepo): | ||
| 588 | + assert len(list(rwrepo.iter_submodules())) == 0 | ||
| 589 | + sm = rwrepo.create_submodule('first', 'submodules/first', rwrepo.git_dir, no_checkout=True) | ||
| 590 | + assert sm.exists() and sm.module_exists() | ||
| 591 | + rwrepo.index.commit("Added submodule") | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments