From: Linus Torvalds Date: Sat, 9 Apr 2005 19:59:11 +0000 (-0700) Subject: Export "cache_name_compare()" helper function. X-Git-Tag: v0.99~935 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=79517a067a293ddf19867e363f0d9237c7ef8e22;p=git.git Export "cache_name_compare()" helper function. The "diff-tree" program needs it. --- diff --git a/cache.h b/cache.h index 2581117a1..8d163c062 100644 --- a/cache.h +++ b/cache.h @@ -105,5 +105,6 @@ extern char *sha1_to_hex(const unsigned char *sha1); /* static buffer result! */ /* General helper functions */ extern void usage(const char *err); +extern int cache_name_compare(const char *name1, int len1, const char *name2, int len2); #endif /* CACHE_H */ diff --git a/read-cache.c b/read-cache.c index 58487b569..ac8375a7f 100644 --- a/read-cache.c +++ b/read-cache.c @@ -245,7 +245,7 @@ int cache_match_stat(struct cache_entry *ce, struct stat *st) return changed; } -static int cache_name_compare(const char *name1, int len1, const char *name2, int len2) +int cache_name_compare(const char *name1, int len1, const char *name2, int len2) { int len = len1 < len2 ? len1 : len2; int cmp;