Commit Diff
--- lib/diff_main.c +++ lib/diff_main.c @@ -198,7 +198,12 @@ diff_atom_same(bool *same, const struct diff_atom *right) { int cmp; - int r = diff_atom_cmp(&cmp, left, right); + int r; + if (left->hash != right->hash) { + *same = false; + return 0; + } + r = diff_atom_cmp(&cmp, left, right); if (r) { *same = true; return r;