summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRussell Sim <rsl@simopolis.xyz>2022-11-25 19:11:54 +0100
committerRussell Sim <rsl@simopolis.xyz>2022-11-25 19:11:54 +0100
commitbe7356d0c6dca4154ae7b7f57c556d7b58b0d5f5 (patch)
tree652ba29c4304694ea327150b91f31120a63f3c30
parent12832bab7363e92bfa45d1ef3c3bc10495d71abd (diff)
downloadlibgit2-be7356d0c6dca4154ae7b7f57c556d7b58b0d5f5.tar.gz
transport: fix capabilities calculation
This looks like a typo to me, from what i can see these lines were added at the same time and because of how capabilities are calculated, it's likely that this code will work in situations where these capabilities were the last ones.
-rw-r--r--src/libgit2/transports/smart_protocol.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libgit2/transports/smart_protocol.c b/src/libgit2/transports/smart_protocol.c
index 09778b335..88c208fb5 100644
--- a/src/libgit2/transports/smart_protocol.c
+++ b/src/libgit2/transports/smart_protocol.c
@@ -207,13 +207,13 @@ int git_smart__detect_caps(git_pkt_ref *pkt, transport_smart_caps *caps, git_vec
if (!git__prefixcmp(ptr, GIT_CAP_WANT_TIP_SHA1)) {
caps->common = caps->want_tip_sha1 = 1;
- ptr += strlen(GIT_CAP_DELETE_REFS);
+ ptr += strlen(GIT_CAP_WANT_TIP_SHA1);
continue;
}
if (!git__prefixcmp(ptr, GIT_CAP_WANT_REACHABLE_SHA1)) {
caps->common = caps->want_reachable_sha1 = 1;
- ptr += strlen(GIT_CAP_DELETE_REFS);
+ ptr += strlen(GIT_CAP_WANT_REACHABLE_SHA1);
continue;
}