summaryrefslogtreecommitdiff
path: root/builtin/fetch.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2019-10-15 04:48:03 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-10-15 04:48:03 (GMT)
commit3b9ec279191b70e9e5ecde15910991f7c5669a17 (patch)
tree2b8741466c7e6a6d4b26ef008d8bed94ce00321e /builtin/fetch.c
parentc7d2cedec27560caec9283e73759a734154cf505 (diff)
parent360c7ba3305ba66bd2f38df659b6769f25be661b (diff)
downloadgit-3b9ec279191b70e9e5ecde15910991f7c5669a17.zip
git-3b9ec279191b70e9e5ecde15910991f7c5669a17.tar.gz
git-3b9ec279191b70e9e5ecde15910991f7c5669a17.tar.bz2
Merge branch 'js/trace2-fetch-push'
Dev support. * js/trace2-fetch-push: transport: push codepath can take arbitrary repository push: add trace2 instrumentation fetch: add trace2 instrumentation
Diffstat (limited to 'builtin/fetch.c')
-rw-r--r--builtin/fetch.c22
1 files changed, 15 insertions, 7 deletions
diff --git a/builtin/fetch.c b/builtin/fetch.c
index ef73163..0c345b5 100644
--- a/builtin/fetch.c
+++ b/builtin/fetch.c
@@ -1085,8 +1085,11 @@ static int check_exist_and_connected(struct ref *ref_map)
static int fetch_refs(struct transport *transport, struct ref *ref_map)
{
int ret = check_exist_and_connected(ref_map);
- if (ret)
+ if (ret) {
+ trace2_region_enter("fetch", "fetch_refs", the_repository);
ret = transport_fetch_refs(transport, ref_map);
+ trace2_region_leave("fetch", "fetch_refs", the_repository);
+ }
if (!ret)
/*
* Keep the new pack's ".keep" file around to allow the caller
@@ -1102,11 +1105,14 @@ static int consume_refs(struct transport *transport, struct ref *ref_map)
{
int connectivity_checked = transport->smart_options
? transport->smart_options->connectivity_checked : 0;
- int ret = store_updated_refs(transport->url,
- transport->remote->name,
- connectivity_checked,
- ref_map);
+ int ret;
+ trace2_region_enter("fetch", "consume_refs", the_repository);
+ ret = store_updated_refs(transport->url,
+ transport->remote->name,
+ connectivity_checked,
+ ref_map);
transport_unlock_pack(transport);
+ trace2_region_leave("fetch", "consume_refs", the_repository);
return ret;
}
@@ -1351,9 +1357,11 @@ static int do_fetch(struct transport *transport,
argv_array_push(&ref_prefixes, "refs/tags/");
}
- if (must_list_refs)
+ if (must_list_refs) {
+ trace2_region_enter("fetch", "remote_refs", the_repository);
remote_refs = transport_get_remote_refs(transport, &ref_prefixes);
- else
+ trace2_region_leave("fetch", "remote_refs", the_repository);
+ } else
remote_refs = NULL;
argv_array_clear(&ref_prefixes);