@@ -902,72 +902,85 @@ static struct ref *do_fetch_pack(struct fetch_pack_args *args,
902
902
sort_ref_list (& ref , ref_compare_name );
903
903
QSORT (sought , nr_sought , cmp_ref_by_name );
904
904
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 ))
906
915
die (_ ("Server does not support shallow clients" ));
907
916
if (args -> depth > 0 || args -> deepen_since || args -> deepen_not )
908
917
args -> deepen = 1 ;
909
918
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" );
911
920
multi_ack = 2 ;
912
921
if (server_supports ("no-done" )) {
913
- print_verbose (args , _ ("Server supports no-done" ) );
922
+ print_verbose (args , _ ("Server supports %s" ), " no-done" );
914
923
if (args -> stateless_rpc )
915
924
no_done = 1 ;
916
925
}
917
926
}
918
927
else if (server_supports ("multi_ack" )) {
919
- print_verbose (args , _ ("Server supports multi_ack" ) );
928
+ print_verbose (args , _ ("Server supports %s" ), "multi_ack" );
920
929
multi_ack = 1 ;
921
930
}
922
931
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" );
924
933
use_sideband = 2 ;
925
934
}
926
935
else if (server_supports ("side-band" )) {
927
- print_verbose (args , _ ("Server supports side-band" ) );
936
+ print_verbose (args , _ ("Server supports %s" ), " side-band" );
928
937
use_sideband = 1 ;
929
938
}
930
939
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" );
932
941
allow_unadvertised_object_request |= ALLOW_TIP_SHA1 ;
933
942
}
934
943
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" );
936
945
allow_unadvertised_object_request |= ALLOW_REACHABLE_SHA1 ;
937
946
}
938
- if (!server_supports ("thin-pack" ))
947
+ if (server_supports ("thin-pack" ))
948
+ print_verbose (args , _ ("Server supports %s" ), "thin-pack" );
949
+ else
939
950
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
941
954
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
943
958
args -> include_tag = 0 ;
944
959
if (server_supports ("ofs-delta" ))
945
- print_verbose (args , _ ("Server supports ofs-delta" ) );
960
+ print_verbose (args , _ ("Server supports %s" ), " ofs-delta" );
946
961
else
947
962
prefer_ofs_delta = 0 ;
948
963
949
964
if (server_supports ("filter" )) {
950
965
server_supports_filtering = 1 ;
951
- print_verbose (args , _ ("Server supports filter" ) );
966
+ print_verbose (args , _ ("Server supports %s" ), "filter" );
952
967
} else if (args -> filter_options .choice ) {
953
968
warning ("filtering not recognized by server, ignoring" );
954
969
}
955
970
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" );
963
973
deepen_since_ok = 1 ;
964
- else if (args -> deepen_since )
974
+ } else if (args -> deepen_since )
965
975
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" );
967
978
deepen_not_ok = 1 ;
968
- else if (args -> deepen_not )
979
+ } else if (args -> deepen_not )
969
980
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 )
971
984
die (_ ("Server does not support --deepen" ));
972
985
973
986
if (!args -> no_dependents ) {
0 commit comments