Dulwich.io dulwich / f2a96cf
Skip refs for revisions that are missing. Jelmer Vernooń≥ 21 days ago
1 changed file(s) with 8 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
330330 # all relevant tags.
331331 # TODO: fix behavior when missing
332332 return {}
333 # TODO(jelmer): Integrate this with the refs logic in Repo.fetch_objects
333334 tagged = {}
334335 for name, sha in refs.items():
335336 peeled_sha = repo.get_peeled(name)
550551 values = set(heads.values())
551552 if self.advertise_refs or not self.http_req:
552553 for i, (ref, sha) in enumerate(sorted(heads.items())):
554 try:
555 peeled_sha = self.get_peeled(ref)
556 except KeyError:
557 # Skip refs that are inaccessible
558 # TODO(jelmer): Integrate with Repo.fetch_objects refs
559 # logic.
560 continue
553561 line = sha + b' ' + ref
554562 if not i:
555563 line += (b'\x00' +
557565 self.handler.capabilities() +
558566 symref_capabilities(symrefs.items())))
559567 self.proto.write_pkt_line(line + b'\n')
560 peeled_sha = self.get_peeled(ref)
561568 if peeled_sha != sha:
562569 self.proto.write_pkt_line(
563570 peeled_sha + b' ' + ref + ANNOTATED_TAG_SUFFIX + b'\n')