@@ -909,72 +909,85 @@ static struct ref *do_fetch_pack(struct fetch_pack_args *args,
909
909
sort_ref_list (& ref , ref_compare_name );
910
910
QSORT (sought , nr_sought , cmp_ref_by_name );
911
911
912
- if ((args -> depth > 0 || is_repository_shallow (the_repository )) && !server_supports ("shallow" ))
912
+ if ((agent_feature = server_feature_value ("agent" , & agent_len ))) {
913
+ agent_supported = 1 ;
914
+ if (agent_len )
915
+ print_verbose (args , _ ("Server version is %.*s" ),
916
+ agent_len , agent_feature );
917
+ }
918
+
919
+ if (server_supports ("shallow" ))
920
+ print_verbose (args , _ ("Server supports %s" ), "shallow" );
921
+ else if (args -> depth > 0 || is_repository_shallow (the_repository ))
913
922
die (_ ("Server does not support shallow clients" ));
914
923
if (args -> depth > 0 || args -> deepen_since || args -> deepen_not )
915
924
args -> deepen = 1 ;
916
925
if (server_supports ("multi_ack_detailed" )) {
917
- print_verbose (args , _ ("Server supports multi_ack_detailed" ) );
926
+ print_verbose (args , _ ("Server supports %s" ), "multi_ack_detailed" );
918
927
multi_ack = 2 ;
919
928
if (server_supports ("no-done" )) {
920
- print_verbose (args , _ ("Server supports no-done" ) );
929
+ print_verbose (args , _ ("Server supports %s" ), " no-done" );
921
930
if (args -> stateless_rpc )
922
931
no_done = 1 ;
923
932
}
924
933
}
925
934
else if (server_supports ("multi_ack" )) {
926
- print_verbose (args , _ ("Server supports multi_ack" ) );
935
+ print_verbose (args , _ ("Server supports %s" ), "multi_ack" );
927
936
multi_ack = 1 ;
928
937
}
929
938
if (server_supports ("side-band-64k" )) {
930
- print_verbose (args , _ ("Server supports side-band-64k" ) );
939
+ print_verbose (args , _ ("Server supports %s" ), " side-band-64k" );
931
940
use_sideband = 2 ;
932
941
}
933
942
else if (server_supports ("side-band" )) {
934
- print_verbose (args , _ ("Server supports side-band" ) );
943
+ print_verbose (args , _ ("Server supports %s" ), " side-band" );
935
944
use_sideband = 1 ;
936
945
}
937
946
if (server_supports ("allow-tip-sha1-in-want" )) {
938
- print_verbose (args , _ ("Server supports allow-tip-sha1-in-want" ) );
947
+ print_verbose (args , _ ("Server supports %s" ), " allow-tip-sha1-in-want" );
939
948
allow_unadvertised_object_request |= ALLOW_TIP_SHA1 ;
940
949
}
941
950
if (server_supports ("allow-reachable-sha1-in-want" )) {
942
- print_verbose (args , _ ("Server supports allow-reachable-sha1-in-want" ) );
951
+ print_verbose (args , _ ("Server supports %s" ), " allow-reachable-sha1-in-want" );
943
952
allow_unadvertised_object_request |= ALLOW_REACHABLE_SHA1 ;
944
953
}
945
- if (!server_supports ("thin-pack" ))
954
+ if (server_supports ("thin-pack" ))
955
+ print_verbose (args , _ ("Server supports %s" ), "thin-pack" );
956
+ else
946
957
args -> use_thin_pack = 0 ;
947
- if (!server_supports ("no-progress" ))
958
+ if (server_supports ("no-progress" ))
959
+ print_verbose (args , _ ("Server supports %s" ), "no-progress" );
960
+ else
948
961
args -> no_progress = 0 ;
949
- if (!server_supports ("include-tag" ))
962
+ if (server_supports ("include-tag" ))
963
+ print_verbose (args , _ ("Server supports %s" ), "include-tag" );
964
+ else
950
965
args -> include_tag = 0 ;
951
966
if (server_supports ("ofs-delta" ))
952
- print_verbose (args , _ ("Server supports ofs-delta" ) );
967
+ print_verbose (args , _ ("Server supports %s" ), " ofs-delta" );
953
968
else
954
969
prefer_ofs_delta = 0 ;
955
970
956
971
if (server_supports ("filter" )) {
957
972
server_supports_filtering = 1 ;
958
- print_verbose (args , _ ("Server supports filter" ) );
973
+ print_verbose (args , _ ("Server supports %s" ), "filter" );
959
974
} else if (args -> filter_options .choice ) {
960
975
warning ("filtering not recognized by server, ignoring" );
961
976
}
962
977
963
- if ((agent_feature = server_feature_value ("agent" , & agent_len ))) {
964
- agent_supported = 1 ;
965
- if (agent_len )
966
- print_verbose (args , _ ("Server version is %.*s" ),
967
- agent_len , agent_feature );
968
- }
969
- if (server_supports ("deepen-since" ))
978
+ if (server_supports ("deepen-since" )) {
979
+ print_verbose (args , _ ("Server supports %s" ), "deepen-since" );
970
980
deepen_since_ok = 1 ;
971
- else if (args -> deepen_since )
981
+ } else if (args -> deepen_since )
972
982
die (_ ("Server does not support --shallow-since" ));
973
- if (server_supports ("deepen-not" ))
983
+ if (server_supports ("deepen-not" )) {
984
+ print_verbose (args , _ ("Server supports %s" ), "deepen-not" );
974
985
deepen_not_ok = 1 ;
975
- else if (args -> deepen_not )
986
+ } else if (args -> deepen_not )
976
987
die (_ ("Server does not support --shallow-exclude" ));
977
- if (!server_supports ("deepen-relative" ) && args -> deepen_relative )
988
+ if (server_supports ("deepen-relative" ))
989
+ print_verbose (args , _ ("Server supports %s" ), "deepen-relative" );
990
+ else if (args -> deepen_relative )
978
991
die (_ ("Server does not support --deepen" ));
979
992
980
993
if (!args -> no_dependents ) {
0 commit comments