commit fbd55577b9a5f11638570a18b52d4006bec3581b from: Neels Hofmeyr date: Mon Jan 27 21:50:39 2020 UTC dont escape tabs in text output commit - 9e6681576e294abc628335cb0d8d0b7800c7fd13 commit + fbd55577b9a5f11638570a18b52d4006bec3581b blob - 72a597bf05c06f25fd94c1421712e178888a0ca3 blob + 9479c323db2cdd91c5c7385fbd834708b5d0890b --- lib/debug.h +++ lib/debug.h @@ -45,7 +45,7 @@ static inline void dump_atom(const struct diff_data *l print("\\r"); else if (*s == '\n') print("\\n"); - else if (*s < 32 || *s >= 127) + else if ((*s < 32 || *s >= 127) && (*s != '\t')) print("\\x%02x", *s); else print("%c", *s); blob - 20d1f9a79ec84281efede279f51bd2292a99466a blob + 4c76a249cac3df710e57ed404bb9a918acf41870 --- lib/diff_output.c +++ lib/diff_output.c @@ -32,7 +32,7 @@ void diff_output_lines(FILE *dest, const char *prefix, for (i = 0; i < len; i++) { char c = atom->at[i]; - if (c < 0x20 || c >= 0x7f) + if ((c < 0x20 || c >= 0x7f) && c != '\t') fprintf(dest, "\\x%02x", (unsigned char)c); else fprintf(dest, "%c", c);