We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6854f0d commit 454a522Copy full SHA for 454a522
src/scmrepo/git/backend/dulwich/__init__.py
@@ -978,3 +978,16 @@ def _parse_identity(identity: str) -> tuple[str, str]:
978
if not m:
979
raise SCMError("Could not parse tagger identity '{identity}'")
980
return m.group("name"), m.group("email")
981
+
982
983
+def ls_remote(url: str) -> dict[str, str]:
984
+ from dulwich import porcelain
985
+ from dulwich.client import HTTPUnauthorized
986
987
+ try:
988
+ refs = porcelain.ls_remote(url)
989
+ return {os.fsdecode(ref): sha.decode("ascii") for ref, sha in refs.items()}
990
+ except HTTPUnauthorized as exc:
991
+ raise AuthError(url) from exc
992
+ except Exception as exc: # noqa: BLE001
993
+ raise InvalidRemote(url) from exc
0 commit comments