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 | Merge branch 'ps/doc-more-c-coding-guidelines' (diff) | |
| parent | convert: return early when not tracing (diff) | |
| download | git-3e12106370213f73c27bd7cf544b7400931ddb0d.tar.gz git-3e12106370213f73c27bd7cf544b7400931ddb0d.zip | |
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
Diffstat (limited to '')
| -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( |
