commit 72057b70697f93fa5e0c0b63ed2e378aab485bda from: Neels Hofmeyr date: Mon Jan 27 21:54:44 2020 UTC debug: dont dump too large myers graphs commit - fbd55577b9a5f11638570a18b52d4006bec3581b commit + 72057b70697f93fa5e0c0b63ed2e378aab485bda blob - 9479c323db2cdd91c5c7385fbd834708b5d0890b blob + 3c20bbfd322cfa4115053a4501a21fb3fb62c229 --- lib/debug.h +++ lib/debug.h @@ -25,7 +25,6 @@ #define debug_dump dump #define debug_dump_atom dump_atom #define debug_dump_atoms dump_atoms -#define debug_dump_myers_graph dump_myers_graph static inline void dump_atom(const struct diff_data *left, const struct diff_data *right, const struct diff_atom *atom) { @@ -124,6 +123,14 @@ static inline void dump_myers_graph(const struct diff_ } } +static inline void debug_dump_myers_graph(const struct diff_data *l, const struct diff_data *r, + int *kd) +{ + if (l->atoms.len > 99 || r->atoms.len > 99) + return; + dump_myers_graph(l, r, kd); +} + #else #define debug(args...) #define debug_dump(args...)