summaryrefslogtreecommitdiff
path: root/cache.h
diff options
context:
space:
mode:
authorJeff Hostetler <jeffhost@microsoft.com>2017-04-14 19:12:28 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-04-15 09:21:12 (GMT)
commita6db3fbb6e4ec11695e2a3af8bc2cb9119cb1941 (patch)
tree6eeb1de45587403bee39e7579585c57409d1346c /cache.h
parentcf11a67975b057a144618badf16dc4e3d25b9407 (diff)
downloadgit-a6db3fbb6e4ec11695e2a3af8bc2cb9119cb1941.zip
git-a6db3fbb6e4ec11695e2a3af8bc2cb9119cb1941.tar.gz
git-a6db3fbb6e4ec11695e2a3af8bc2cb9119cb1941.tar.bz2
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>
Diffstat (limited to 'cache.h')
-rw-r--r--cache.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/cache.h b/cache.h
index 5c80782..2aea7ca 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);