xdiff: add recs_match helper function
commit92e5b62fec0e9b647429e8d3736c571c434dd375
authorJacob Keller <jacob.keller@gmail.com>
Fri, 15 Apr 2016 23:01:45 +0000 (15 16:01 -0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 18 Apr 2016 18:47:08 +0000 (18 11:47 -0700)
tree9d111b6c0aaf8cf56d677ed7a3666c10b70d719f
parent765428699a5381f113d19974720bc91b5bfeaf1d
xdiff: add recs_match helper function

It is a common pattern in xdl_change_compact to check that hashes and
strings match. The resulting code to perform this change causes very
long lines and makes it hard to follow the intention. Introduce a helper
function recs_match which performs both checks to increase
code readability.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
xdiff/xdiffi.c