|
@@ -28,6 +28,7 @@ import subprocess
|
|
|
|
|
|
from dulwich.errors import (
|
|
|
ChecksumMismatch,
|
|
|
+ HangupException,
|
|
|
)
|
|
|
from dulwich.protocol import (
|
|
|
Protocol,
|
|
@@ -119,10 +120,15 @@ class GitClient(object):
|
|
|
len(objects))
|
|
|
|
|
|
|
|
|
- client_sha = self.proto.read(20)
|
|
|
- if not client_sha in (None, "", sha):
|
|
|
- raise ChecksumMismatch(sha, client_sha)
|
|
|
-
|
|
|
+ try:
|
|
|
+ client_sha = self.proto.read_pkt_line()
|
|
|
+ if not client_sha in (None, "", sha):
|
|
|
+ raise ChecksumMismatch(sha, client_sha)
|
|
|
+ except HangupException:
|
|
|
+
|
|
|
+
|
|
|
+ pass
|
|
|
+
|
|
|
return new_refs
|
|
|
|
|
|
def fetch(self, path, target, determine_wants=None, progress=None):
|