Skip to content

Commit be7356d

Browse files
committed
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.
1 parent 12832ba commit be7356d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/libgit2/transports/smart_protocol.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,13 +207,13 @@ int git_smart__detect_caps(git_pkt_ref *pkt, transport_smart_caps *caps, git_vec
207207

208208
if (!git__prefixcmp(ptr, GIT_CAP_WANT_TIP_SHA1)) {
209209
caps->common = caps->want_tip_sha1 = 1;
210-
ptr += strlen(GIT_CAP_DELETE_REFS);
210+
ptr += strlen(GIT_CAP_WANT_TIP_SHA1);
211211
continue;
212212
}
213213

214214
if (!git__prefixcmp(ptr, GIT_CAP_WANT_REACHABLE_SHA1)) {
215215
caps->common = caps->want_reachable_sha1 = 1;
216-
ptr += strlen(GIT_CAP_DELETE_REFS);
216+
ptr += strlen(GIT_CAP_WANT_REACHABLE_SHA1);
217217
continue;
218218
}
219219

0 commit comments

Comments
 (0)