diff options
| author | Junio C Hamano <gitster@pobox.com> | 2024-08-08 10:41:20 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2024-08-08 10:41:20 -0700 |
| commit | 3e12106370213f73c27bd7cf544b7400931ddb0d (patch) | |
| tree | 6db8f4941cfd082f2397086cff35b78a3542cc2f | |
| parent | 536695cabefc8638f4e1b0bbd38f6bd37a3142a0 (diff) | |
| parent | 63ad8dbf169ec8e2b3cef40ff51499ee751a84a5 (diff) | |
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
| -rw-r--r-- | convert.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -324,6 +324,9 @@ static void trace_encoding(const char *context, const char *path, struct strbuf trace = STRBUF_INIT; int i; + if (!trace_want(&coe)) + return; + strbuf_addf(&trace, "%s (%s, considered %s):\n", context, path, encoding); for (i = 0; i < len && buf; ++i) { strbuf_addf( |
