summaryrefslogtreecommitdiff
path: root/fetch-pack.c
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2019-06-20 11:59:51 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-06-20 21:01:00 (GMT)
commit0e042971011956be86a59fb3b5e0dbf3a127fae5 (patch)
treec3fa0378bf5685ce0456734944ae2a51c4f7a11f /fetch-pack.c
parent5a88583b0b241c335b4baf2ccd9b04bc1650efcb (diff)
downloadgit-0e042971011956be86a59fb3b5e0dbf3a127fae5.zip
git-0e042971011956be86a59fb3b5e0dbf3a127fae5.tar.gz
git-0e042971011956be86a59fb3b5e0dbf3a127fae5.tar.bz2
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>
Diffstat (limited to 'fetch-pack.c')
-rw-r--r--fetch-pack.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/fetch-pack.c b/fetch-pack.c
index de935f8..445a261 100644
--- a/fetch-pack.c
+++ b/fetch-pack.c
@@ -902,6 +902,13 @@ static struct ref *do_fetch_pack(struct fetch_pack_args *args,
sort_ref_list(&ref, ref_compare_name);
QSORT(sought, nr_sought, cmp_ref_by_name);
+ if ((agent_feature = server_feature_value("agent", &agent_len))) {
+ agent_supported = 1;
+ if (agent_len)
+ print_verbose(args, _("Server version is %.*s"),
+ agent_len, agent_feature);
+ }
+
if (server_supports("shallow"))
print_verbose(args, _("Server supports %s"), "shallow");
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,
warning("filtering not recognized by server, ignoring");
}
- if ((agent_feature = server_feature_value("agent", &agent_len))) {
- agent_supported = 1;
- if (agent_len)
- print_verbose(args, _("Server version is %.*s"),
- agent_len, agent_feature);
- }
if (server_supports("deepen-since")) {
print_verbose(args, _("Server supports %s"), "deepen-since");
deepen_since_ok = 1;