read-cache: add strcmp_offset function
commita6db3fbb6e4ec11695e2a3af8bc2cb9119cb1941
authorJeff Hostetler <jeffhost@microsoft.com>
Fri, 14 Apr 2017 19:12:28 +0000 (14 19:12 +0000)
committerJunio C Hamano <gitster@pobox.com>
Sat, 15 Apr 2017 09:21:12 +0000 (15 02:21 -0700)
tree6eeb1de45587403bee39e7579585c57409d1346c
parentcf11a67975b057a144618badf16dc4e3d25b9407
read-cache: add strcmp_offset function

Add strcmp_offset() function to also return the offset of the
first change.

Add unit test and helper to verify.

Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Makefile
cache.h
read-cache.c
t/helper/.gitignore
t/helper/test-strcmp-offset.c [new file with mode: 0644]
t/t0065-strcmp-offset.sh [new file with mode: 0755]