| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 855befa commit af0cd93
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -35,12 +35,13 @@ def TestOneInput(data): | |||
| 35 | 35 | sub_repo = Repo.init(submodule_temp_dir, bare=fdp.ConsumeBool()) | |
| 36 | 36 | sub_repo.index.commit(fdp.ConsumeUnicodeNoSurrogates(fdp.ConsumeIntInRange(1, 512))) | |
| 37 | 37 | ||
| 38 | - submodule_name = f"submodule_{fdp.ConsumeUnicodeNoSurrogates(fdp.ConsumeIntInRange(1, 512))}" | ||
| 38 | + submodule_name = fdp.ConsumeUnicodeNoSurrogates( | ||
| 39 | + fdp.ConsumeIntInRange(1, max(1, get_max_filename_length(repo.working_tree_dir))) | ||
| 40 | + ) | ||
| 39 | 41 | submodule_path = os.path.join(repo.working_tree_dir, submodule_name) | |
| 40 | - submodule_url = sub_repo.git_dir | ||
| 41 | 42 | ||
| 42 | - submodule = repo.create_submodule(submodule_name, submodule_path, url=submodule_url) | ||
| 43 | - repo.index.commit(f"Added submodule {submodule_name}") | ||
| 43 | + submodule = repo.create_submodule(submodule_name, submodule_path, url=sub_repo.git_dir) | ||
| 44 | + repo.index.commit("Added submodule") | ||
| 44 | 45 | ||
| 45 | 46 | with submodule.config_writer() as writer: | |
| 46 | 47 | key_length = fdp.ConsumeIntInRange(1, max(1, fdp.remaining_bytes())) | |
| Back | FazBrowse Home | New Git URL |
0 commit comments