From a6db3fbb6e4ec11695e2a3af8bc2cb9119cb1941 Mon Sep 17 00:00:00 2001 From: Jeff Hostetler Date: Fri, 14 Apr 2017 19:12:28 +0000 Subject: 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 Signed-off-by: Junio C Hamano --- cache.h | 1 + 1 file changed, 1 insertion(+) (limited to 'cache.h') diff --git a/cache.h b/cache.h index 5c8078291c..2aea7caf44 100644 --- a/cache.h +++ b/cache.h @@ -595,6 +595,7 @@ extern int write_locked_index(struct index_state *, struct lock_file *lock, unsi extern int discard_index(struct index_state *); extern int unmerged_index(const struct index_state *); extern int verify_path(const char *path); +extern int strcmp_offset(const char *s1, const char *s2, size_t *first_change); extern int index_dir_exists(struct index_state *istate, const char *name, int namelen); extern void adjust_dirname_case(struct index_state *istate, char *name); extern struct cache_entry *index_file_exists(struct index_state *istate, const char *name, int namelen, int igncase); -- cgit v1.2.1