Skip to content

Commit 79517a0

Browse files
author
Linus Torvalds
committed
Export "cache_name_compare()" helper function.
The "diff-tree" program needs it.
1 parent 83adac3 commit 79517a0

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

cache.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,5 +105,6 @@ extern char *sha1_to_hex(const unsigned char *sha1); /* static buffer result! */
105105

106106
/* General helper functions */
107107
extern void usage(const char *err);
108+
extern int cache_name_compare(const char *name1, int len1, const char *name2, int len2);
108109

109110
#endif /* CACHE_H */

read-cache.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ int cache_match_stat(struct cache_entry *ce, struct stat *st)
245245
return changed;
246246
}
247247

248-
static int cache_name_compare(const char *name1, int len1, const char *name2, int len2)
248+
int cache_name_compare(const char *name1, int len1, const char *name2, int len2)
249249
{
250250
int len = len1 < len2 ? len1 : len2;
251251
int cmp;

0 commit comments

Comments
 (0)