summaryrefslogtreecommitdiff
path: root/src/protocol.c
diff options
context:
space:
mode:
authorCarlos Martín Nieto <carlos@cmartin.tk>2012-05-14 17:54:25 +0200
committerCarlos Martín Nieto <carlos@cmartin.tk>2012-08-24 20:29:39 +0200
commite03e71da56608f60770eb80767dcd94e698cdcae (patch)
tree934f1fe3e0441aaa96d0a91609e30f898d1ac8c8 /src/protocol.c
parentbffa852f89268390d6bc3e6f99f5f0cccdc88f63 (diff)
downloadlibgit2-e03e71da56608f60770eb80767dcd94e698cdcae.tar.gz
network: add sideband support
This lets us notify the user of what the remote end is doing while we wait for it to start sending us the packfile.
Diffstat (limited to 'src/protocol.c')
-rw-r--r--src/protocol.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/protocol.c b/src/protocol.c
index 20d6e230f..4526c857d 100644
--- a/src/protocol.c
+++ b/src/protocol.c
@@ -80,6 +80,20 @@ int git_protocol_detect_caps(git_pkt_ref *pkt, git_transport_caps *caps)
continue;
}
+ /* Keep side-band check after side-band-64k */
+ if(!git__prefixcmp(ptr, GIT_CAP_SIDE_BAND_64K)) {
+ caps->common = caps->side_band_64k = 1;
+ ptr += strlen(GIT_CAP_SIDE_BAND_64K);
+ continue;
+ }
+
+ if(!git__prefixcmp(ptr, GIT_CAP_SIDE_BAND)) {
+ caps->common = caps->side_band = 1;
+ ptr += strlen(GIT_CAP_SIDE_BAND);
+ continue;
+ }
+
+
/* We don't know this capability, so skip it */
ptr = strchr(ptr, ' ');
}