@@ -902,72 +902,85 @@ static struct ref *do_fetch_pack(struct fetch_pack_args *args,
902902 sort_ref_list (& ref , ref_compare_name );
903903 QSORT (sought , nr_sought , cmp_ref_by_name );
904904
905- if ((args -> depth > 0 || is_repository_shallow (the_repository )) && !server_supports ("shallow" ))
905+ if ((agent_feature = server_feature_value ("agent" , & agent_len ))) {
906+ agent_supported = 1 ;
907+ if (agent_len )
908+ print_verbose (args , _ ("Server version is %.*s" ),
909+ agent_len , agent_feature );
910+ }
911+
912+ if (server_supports ("shallow" ))
913+ print_verbose (args , _ ("Server supports %s" ), "shallow" );
914+ else if (args -> depth > 0 || is_repository_shallow (the_repository ))
906915 die (_ ("Server does not support shallow clients" ));
907916 if (args -> depth > 0 || args -> deepen_since || args -> deepen_not )
908917 args -> deepen = 1 ;
909918 if (server_supports ("multi_ack_detailed" )) {
910- print_verbose (args , _ ("Server supports multi_ack_detailed" ) );
919+ print_verbose (args , _ ("Server supports %s" ), "multi_ack_detailed" );
911920 multi_ack = 2 ;
912921 if (server_supports ("no-done" )) {
913- print_verbose (args , _ ("Server supports no-done" ) );
922+ print_verbose (args , _ ("Server supports %s" ), " no-done" );
914923 if (args -> stateless_rpc )
915924 no_done = 1 ;
916925 }
917926 }
918927 else if (server_supports ("multi_ack" )) {
919- print_verbose (args , _ ("Server supports multi_ack" ) );
928+ print_verbose (args , _ ("Server supports %s" ), "multi_ack" );
920929 multi_ack = 1 ;
921930 }
922931 if (server_supports ("side-band-64k" )) {
923- print_verbose (args , _ ("Server supports side-band-64k" ) );
932+ print_verbose (args , _ ("Server supports %s" ), " side-band-64k" );
924933 use_sideband = 2 ;
925934 }
926935 else if (server_supports ("side-band" )) {
927- print_verbose (args , _ ("Server supports side-band" ) );
936+ print_verbose (args , _ ("Server supports %s" ), " side-band" );
928937 use_sideband = 1 ;
929938 }
930939 if (server_supports ("allow-tip-sha1-in-want" )) {
931- print_verbose (args , _ ("Server supports allow-tip-sha1-in-want" ) );
940+ print_verbose (args , _ ("Server supports %s" ), " allow-tip-sha1-in-want" );
932941 allow_unadvertised_object_request |= ALLOW_TIP_SHA1 ;
933942 }
934943 if (server_supports ("allow-reachable-sha1-in-want" )) {
935- print_verbose (args , _ ("Server supports allow-reachable-sha1-in-want" ) );
944+ print_verbose (args , _ ("Server supports %s" ), " allow-reachable-sha1-in-want" );
936945 allow_unadvertised_object_request |= ALLOW_REACHABLE_SHA1 ;
937946 }
938- if (!server_supports ("thin-pack" ))
947+ if (server_supports ("thin-pack" ))
948+ print_verbose (args , _ ("Server supports %s" ), "thin-pack" );
949+ else
939950 args -> use_thin_pack = 0 ;
940- if (!server_supports ("no-progress" ))
951+ if (server_supports ("no-progress" ))
952+ print_verbose (args , _ ("Server supports %s" ), "no-progress" );
953+ else
941954 args -> no_progress = 0 ;
942- if (!server_supports ("include-tag" ))
955+ if (server_supports ("include-tag" ))
956+ print_verbose (args , _ ("Server supports %s" ), "include-tag" );
957+ else
943958 args -> include_tag = 0 ;
944959 if (server_supports ("ofs-delta" ))
945- print_verbose (args , _ ("Server supports ofs-delta" ) );
960+ print_verbose (args , _ ("Server supports %s" ), " ofs-delta" );
946961 else
947962 prefer_ofs_delta = 0 ;
948963
949964 if (server_supports ("filter" )) {
950965 server_supports_filtering = 1 ;
951- print_verbose (args , _ ("Server supports filter" ) );
966+ print_verbose (args , _ ("Server supports %s" ), "filter" );
952967 } else if (args -> filter_options .choice ) {
953968 warning ("filtering not recognized by server, ignoring" );
954969 }
955970
956- if ((agent_feature = server_feature_value ("agent" , & agent_len ))) {
957- agent_supported = 1 ;
958- if (agent_len )
959- print_verbose (args , _ ("Server version is %.*s" ),
960- agent_len , agent_feature );
961- }
962- if (server_supports ("deepen-since" ))
971+ if (server_supports ("deepen-since" )) {
972+ print_verbose (args , _ ("Server supports %s" ), "deepen-since" );
963973 deepen_since_ok = 1 ;
964- else if (args -> deepen_since )
974+ } else if (args -> deepen_since )
965975 die (_ ("Server does not support --shallow-since" ));
966- if (server_supports ("deepen-not" ))
976+ if (server_supports ("deepen-not" )) {
977+ print_verbose (args , _ ("Server supports %s" ), "deepen-not" );
967978 deepen_not_ok = 1 ;
968- else if (args -> deepen_not )
979+ } else if (args -> deepen_not )
969980 die (_ ("Server does not support --shallow-exclude" ));
970- if (!server_supports ("deepen-relative" ) && args -> deepen_relative )
981+ if (server_supports ("deepen-relative" ))
982+ print_verbose (args , _ ("Server supports %s" ), "deepen-relative" );
983+ else if (args -> deepen_relative )
971984 die (_ ("Server does not support --deepen" ));
972985
973986 if (!args -> no_dependents ) {
0 commit comments