|
@@ -765,10 +765,17 @@ class TraditionalGitClient(GitClient):
|
|
|
return refs
|
|
|
|
|
|
def archive(self, path, committish, write_data, progress=None,
|
|
|
- write_error=None):
|
|
|
+ write_error=None, format=None, subdirs=None, prefix=None):
|
|
|
proto, can_read = self._connect(b'upload-archive', path)
|
|
|
with proto:
|
|
|
+ if format is not None:
|
|
|
+ proto.write_pkt_line(b"argument --format=" + format)
|
|
|
proto.write_pkt_line(b"argument " + committish)
|
|
|
+ if subdirs is not None:
|
|
|
+ for subdir in subdirs:
|
|
|
+ proto.write_pkt_line(b"argument " + subdir)
|
|
|
+ if prefix is not None:
|
|
|
+ proto.write_pkt_line(b"argument --prefix=" + prefix)
|
|
|
proto.write_pkt_line(None)
|
|
|
pkt = proto.read_pkt_line()
|
|
|
if pkt == b"NACK\n":
|