`select_capabilities` would set local variables depending on the
user selection provided by `args` and the server advertisement which
is kept in a list in connect.c
When talking pack protocol version 2 however this has already happend
before during 'negotiate_capabilities'
Signed-off-by: Stefan Beller <redacted>
---
fetch-pack.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/fetch-pack.c b/fetch-pack.c
index 1544629..5ca1e97 100644
--- a/fetch-pack.c
+++ b/fetch-pack.c
@@ -915,7 +915,16 @@ static struct ref *do_fetch_pack(struct fetch_pack_args *args,
sort_ref_list(&ref, ref_compare_name);
qsort(sought, nr_sought, sizeof(*sought), cmp_ref_by_name);
- select_capabilities(args);
+ switch (args->transport_version) {
+ case 2:
+ /* capability selection already happend */
+ break;
+ case 1:
+ select_capabilities(args);
+ break;
+ default:
+ die ("transport version %d not supported", args->transport_version);
+ }
if (everything_local(args, &ref, sought, nr_sought)) {
packet_flush(fd[1]);--
2.8.0.32.g71f8beb.dirty