mirror of
https://github.com/git/git.git
synced 2025-12-12 20:36:24 +01:00
Merge branch 'dh/encoding-trace-optim' into maint-2.46
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
This commit is contained in:
@@ -324,6 +324,9 @@ static void trace_encoding(const char *context, const char *path,
|
|||||||
struct strbuf trace = STRBUF_INIT;
|
struct strbuf trace = STRBUF_INIT;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
if (!trace_want(&coe))
|
||||||
|
return;
|
||||||
|
|
||||||
strbuf_addf(&trace, "%s (%s, considered %s):\n", context, path, encoding);
|
strbuf_addf(&trace, "%s (%s, considered %s):\n", context, path, encoding);
|
||||||
for (i = 0; i < len && buf; ++i) {
|
for (i = 0; i < len && buf; ++i) {
|
||||||
strbuf_addf(
|
strbuf_addf(
|
||||||
|
|||||||
Reference in New Issue
Block a user