fetch-pack: print server version at the top in -v -v

Before the previous patch, the server version is printed after all the "Server supports" lines. The previous one puts the version in the middle of "Server supports" group. Instead of moving it to the bottom, I move it to the top. Version may stand out more at the top as we will have even more debug out after capabilities. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Nguyễn Thái Ngọc Duy committed Jun 20, 2019 at 18:59 UTC 0e042971011956be86a59fb3b5e0dbf3a127fae5
1 file changed +7 -6
fetch-pack.c
+7 -6
@@ -902,6 +902,13 @@ static struct ref *do_fetch_pack(struct fetch_pack_args *args,
902 sort_ref_list(&ref, ref_compare_name);
903 QSORT(sought, nr_sought, cmp_ref_by_name);
904
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))
@@ -961,12 +968,6 @@ static struct ref *do_fetch_pack(struct fetch_pack_args *args,
968 warning("filtering not recognized by server, ignoring");
969 }
970
964 - if ((agent_feature = server_feature_value("agent", &agent_len))) {
965 - agent_supported = 1;
966 - if (agent_len)
967 - print_verbose(args, _("Server version is %.*s"),
968 - agent_len, agent_feature);
969 - }
971 if (server_supports("deepen-since")) {
972 print_verbose(args, _("Server supports %s"), "deepen-since");
973 deepen_since_ok = 1;