diff options
Diffstat (limited to 'xdiff-interface.h')
-rw-r--r-- | xdiff-interface.h | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/xdiff-interface.h b/xdiff-interface.h index fbb5a1c394..135fc05d72 100644 --- a/xdiff-interface.h +++ b/xdiff-interface.h @@ -1,6 +1,7 @@ #ifndef XDIFF_INTERFACE_H #define XDIFF_INTERFACE_H +#include "cache.h" #include "xdiff/xdiff.h" /* @@ -20,7 +21,7 @@ int parse_hunk_header(char *line, int len, int *ob, int *on, int *nb, int *nn); int read_mmfile(mmfile_t *ptr, const char *filename); -void read_mmblob(mmfile_t *ptr, const unsigned char *sha1); +void read_mmblob(mmfile_t *ptr, const struct object_id *oid); int buffer_is_binary(const char *ptr, unsigned long size); extern void xdiff_set_find_func(xdemitconf_t *xecfg, const char *line, int cflags); @@ -28,4 +29,20 @@ extern void xdiff_clear_find_func(xdemitconf_t *xecfg); extern int git_xmerge_config(const char *var, const char *value, void *cb); extern int git_xmerge_style; +/* + * Compare the strings l1 with l2 which are of size s1 and s2 respectively. + * Returns 1 if the strings are deemed equal, 0 otherwise. + * The `flags` given as XDF_WHITESPACE_FLAGS determine how white spaces + * are treated for the comparision. + */ +extern int xdiff_compare_lines(const char *l1, long s1, + const char *l2, long s2, long flags); + +/* + * Returns a hash of the string s of length len. + * The `flags` given as XDF_WHITESPACE_FLAGS determine how white spaces + * are treated for the hash. + */ +extern unsigned long xdiff_hash_string(const char *s, size_t len, long flags); + #endif |