Skip to content

Commit

Permalink
Export "cache_name_compare()" helper function.
Browse files Browse the repository at this point in the history
The "diff-tree" program needs it.
  • Loading branch information
Linus Torvalds committed Apr 9, 2005
1 parent 83adac3 commit 79517a0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions cache.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
2 changes: 1 addition & 1 deletion read-cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 79517a0

Please sign in to comment.