Dulwich.io dulwich / f72dcc1
feat: lookup remote url during pull Sijis Aviles 23 days ago
1 changed file(s) with 6 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
939939 # Open the repo
940940 with open_repo_closing(repo) as r:
941941 if remote_location is None:
942 # TODO(jelmer): Lookup 'remote' for current branch in config
943 raise NotImplementedError(
944 "looking up remote from branch config not supported yet")
942 section = (b'remote', b'origin')
943 config = r.get_config()
944 if config.has_section(section):
945 url = config.get(section, 'url')
946 remote_location = url.decode()
947
945948 if refspecs is None:
946949 refspecs = [b"HEAD"]
947950 selected_refs = []