Skip to content
Snippets Groups Projects
Commit bb5d8af77546 authored by Dan Villiom Podlaski Christiansen's avatar Dan Villiom Podlaski Christiansen
Browse files

subrepo: use Dulwich parser for .gitmodules, introduced in 0.14

parent c8569f027361
No related branches found
No related tags found
1 merge request!148subrepos: don't barf on [subpaths] section
...@@ -310,15 +310,9 @@ ...@@ -310,15 +310,9 @@
except KeyError: except KeyError:
return rv return rv
gitmodules_content = git[gitmodules_sha].data gitmodules_content = git[gitmodules_sha].data
fo = io.BytesIO(gitmodules_content) with io.BytesIO(gitmodules_content) as fp:
tt = config.ConfigFile.from_file(fo) cfg = config.ConfigFile.from_file(fp)
for section in tt.keys(): return config.parse_submodules(cfg)
section_kind, section_name = section
if section_kind == b'submodule':
sm_path = tt.get(section, b'path')
sm_url = tt.get(section, b'url')
rv.append((sm_path, sm_url, section_name))
return rv
def git_file_readlines(git, tree_obj, fname): def git_file_readlines(git, tree_obj, fname):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment