fetch-pack: do not ask for unadvertised capabilities
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>
Junio C Hamano committed
Aug 10, 2012 at 14:27 UTC
74991a98df79ff3702dcb3b5c22c7b9ec20cfead
1 file changed
+6
builtin/fetch-pack.c
+6
@@ -818,6 +818,12 @@ static struct ref *do_fetch_pack(int fd[2],
818
fprintf(stderr, "Server supports side-band\n");
819
use_sideband = 1;
820
}
821
+ if (!server_supports("thin-pack"))
822
+ args.use_thin_pack = 0;
823
+ if (!server_supports("no-progress"))
824
+ args.no_progress = 0;
825
+ if (!server_supports("include-tag"))
826
+ args.include_tag = 0;
827
if (server_supports("ofs-delta")) {
828
if (args.verbose)
829
fprintf(stderr, "Server supports ofs-delta\n");