Skip to content

Commit 1250dff

Browse files
dschogitster
authored andcommitted
merge-ort: do leave trace2 region even if checkout fails
In 557ac03 (merge-ort: begin performance work; instrument with trace2_region_* calls, 2021-01-23), we added Trace2 instrumentation, but in the error path that returns early, we forgot to tell Trace2 that we're leaving the region. Let's fix that. Pointed-out-by: Elijah Newren <[email protected]> Signed-off-by: Johannes Schindelin <[email protected]> Reviewed-by: Elijah Newren <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent fef2b6d commit 1250dff

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

merge-ort.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4226,6 +4226,7 @@ void merge_switch_to_result(struct merge_options *opt,
42264226
/* failure to function */
42274227
result->clean = -1;
42284228
merge_finalize(opt, result);
4229+
trace2_region_leave("merge", "checkout", opt->repo);
42294230
return;
42304231
}
42314232
trace2_region_leave("merge", "checkout", opt->repo);
@@ -4237,6 +4238,8 @@ void merge_switch_to_result(struct merge_options *opt,
42374238
opt->priv = NULL;
42384239
result->clean = -1;
42394240
merge_finalize(opt, result);
4241+
trace2_region_leave("merge", "record_conflicted",
4242+
opt->repo);
42404243
return;
42414244
}
42424245
opt->priv = NULL;

0 commit comments

Comments
 (0)