http-fetch: invoke trace2_cmd_name()

ee4512ed48 ("trace2: create new combined trace facility", 2019-02- 22) introduced trace2_cmd_name() and taught both the Git built-ins and some non-built-ins to use it. However, http-fetch was not one of them (perhaps due to its low usage at the time). Teach http-fetch to invoke this function. After this patch, this function will be invoked right after argument parsing, just like in remote-curl.c. Signed-off-by: Jonathan Tan <jonathantanmy@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Jonathan Tan committed Dec 12, 2022 at 14:46 UTC 7abb43cbc84c874b118e9cf22cd80d346dda171d
1 file changed +3
http-fetch.c
+3
@@ -5,6 +5,7 @@
5 #include "walker.h"
6 #include "strvec.h"
7 #include "urlmatch.h"
8 +#include "trace2.h"
9
10 static const char http_fetch_usage[] = "git http-fetch "
11 "[-c] [-t] [-a] [-v] [--recover] [-w ref] [--stdin | --packfile=hash | commit-id] url";
@@ -137,6 +138,8 @@ int cmd_main(int argc, const char **argv)
138 if (nongit)
139 die(_("not a git repository"));
140
141 + trace2_cmd_name("http-fetch");
142 +
143 git_config(git_default_config, NULL);
144
145 if (packfile) {