]> git.ipfire.org Git - thirdparty/git.git/commitdiff
fetch-pack: do not ask for unadvertised capabilities
authorJunio C Hamano <gitster@pobox.com>
Fri, 10 Aug 2012 21:27:52 +0000 (14:27 -0700)
committerJunio C Hamano <gitster@pobox.com>
Fri, 10 Aug 2012 21:27:52 +0000 (14:27 -0700)
In the same spirit as the previous fix, stop asking for thin-pack, no-progress
and include-tag capabilities when the other end does not claim to support them.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/fetch-pack.c

index bc7a0f9e7f6fe0ec89854405731a25aae5d874a4..fdec7f61c13671db8e736325c2336d4cbf71e1f5 100644 (file)
@@ -818,6 +818,12 @@ static struct ref *do_fetch_pack(int fd[2],
                        fprintf(stderr, "Server supports side-band\n");
                use_sideband = 1;
        }
+       if (!server_supports("thin-pack"))
+               args.use_thin_pack = 0;
+       if (!server_supports("no-progress"))
+               args.no_progress = 0;
+       if (!server_supports("include-tag"))
+               args.include_tag = 0;
        if (server_supports("ofs-delta")) {
                if (args.verbose)
                        fprintf(stderr, "Server supports ofs-delta\n");