@@ -2408,6 +2408,7 @@ int cmd_fetch(int argc, const char **argv, const char *prefix)
2408
2408
struct oidset_iter iter ;
2409
2409
const struct object_id * oid ;
2410
2410
2411
+ trace2_region_enter ("fetch" , "negotiate-only" , the_repository );
2411
2412
if (!remote )
2412
2413
die (_ ("must supply remote when using --negotiate-only" ));
2413
2414
gtransport = prepare_transport (remote , 1 );
@@ -2416,6 +2417,7 @@ int cmd_fetch(int argc, const char **argv, const char *prefix)
2416
2417
} else {
2417
2418
warning (_ ("protocol does not support --negotiate-only, exiting" ));
2418
2419
result = 1 ;
2420
+ trace2_region_leave ("fetch" , "negotiate-only" , the_repository );
2419
2421
goto cleanup ;
2420
2422
}
2421
2423
if (server_options .nr )
@@ -2426,11 +2428,17 @@ int cmd_fetch(int argc, const char **argv, const char *prefix)
2426
2428
while ((oid = oidset_iter_next (& iter )))
2427
2429
printf ("%s\n" , oid_to_hex (oid ));
2428
2430
oidset_clear (& acked_commits );
2431
+ trace2_region_leave ("fetch" , "negotiate-only" , the_repository );
2429
2432
} else if (remote ) {
2430
- if (filter_options .choice || repo_has_promisor_remote (the_repository ))
2433
+ if (filter_options .choice || repo_has_promisor_remote (the_repository )) {
2434
+ trace2_region_enter ("fetch" , "setup-partial" , the_repository );
2431
2435
fetch_one_setup_partial (remote );
2436
+ trace2_region_leave ("fetch" , "setup-partial" , the_repository );
2437
+ }
2438
+ trace2_region_enter ("fetch" , "fetch-one" , the_repository );
2432
2439
result = fetch_one (remote , argc , argv , prune_tags_ok , stdin_refspecs ,
2433
2440
& config );
2441
+ trace2_region_leave ("fetch" , "fetch-one" , the_repository );
2434
2442
} else {
2435
2443
int max_children = max_jobs ;
2436
2444
@@ -2450,7 +2458,9 @@ int cmd_fetch(int argc, const char **argv, const char *prefix)
2450
2458
max_children = config .parallel ;
2451
2459
2452
2460
/* TODO should this also die if we have a previous partial-clone? */
2461
+ trace2_region_enter ("fetch" , "fetch-multiple" , the_repository );
2453
2462
result = fetch_multiple (& list , max_children , & config );
2463
+ trace2_region_leave ("fetch" , "fetch-multiple" , the_repository );
2454
2464
}
2455
2465
2456
2466
/*
@@ -2472,13 +2482,15 @@ int cmd_fetch(int argc, const char **argv, const char *prefix)
2472
2482
max_children = config .parallel ;
2473
2483
2474
2484
add_options_to_argv (& options , & config );
2485
+ trace2_region_enter_printf ("fetch" , "recurse-submodule" , the_repository , "%s" , submodule_prefix );
2475
2486
result = fetch_submodules (the_repository ,
2476
2487
& options ,
2477
2488
submodule_prefix ,
2478
2489
config .recurse_submodules ,
2479
2490
recurse_submodules_default ,
2480
2491
verbosity < 0 ,
2481
2492
max_children );
2493
+ trace2_region_leave_printf ("fetch" , "recurse-submodule" , the_repository , "%s" , submodule_prefix );
2482
2494
strvec_clear (& options );
2483
2495
}
2484
2496
@@ -2502,9 +2514,11 @@ int cmd_fetch(int argc, const char **argv, const char *prefix)
2502
2514
if (progress )
2503
2515
commit_graph_flags |= COMMIT_GRAPH_WRITE_PROGRESS ;
2504
2516
2517
+ trace2_region_enter ("fetch" , "write-commit-graph" , the_repository );
2505
2518
write_commit_graph_reachable (the_repository -> objects -> odb ,
2506
2519
commit_graph_flags ,
2507
2520
NULL );
2521
+ trace2_region_leave ("fetch" , "write-commit-graph" , the_repository );
2508
2522
}
2509
2523
2510
2524
if (enable_auto_gc ) {
0 commit comments