Skip to content

Commit 3e12106

Browse files
committed
Merge branch 'dh/encoding-trace-optim'
An expensive operation to prepare tracing was done in re-encoding code path even when the tracing was not requested, which has been corrected. * dh/encoding-trace-optim: convert: return early when not tracing
2 parents 536695c + 63ad8db commit 3e12106

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

convert.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,9 @@ static void trace_encoding(const char *context, const char *path,
324324
struct strbuf trace = STRBUF_INIT;
325325
int i;
326326

327+
if (!trace_want(&coe))
328+
return;
329+
327330
strbuf_addf(&trace, "%s (%s, considered %s):\n", context, path, encoding);
328331
for (i = 0; i < len && buf; ++i) {
329332
strbuf_addf(

0 commit comments

Comments
 (0)