Skip to content

Commit 0e04297

Browse files
pcloudsgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 5a88583 commit 0e04297

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

fetch-pack.c

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -902,6 +902,13 @@ 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 ((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+
905912
if (server_supports("shallow"))
906913
print_verbose(args, _("Server supports %s"), "shallow");
907914
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,
961968
warning("filtering not recognized by server, ignoring");
962969
}
963970

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-
}
970971
if (server_supports("deepen-since")) {
971972
print_verbose(args, _("Server supports %s"), "deepen-since");
972973
deepen_since_ok = 1;

0 commit comments

Comments
 (0)