summaryrefslogtreecommitdiff
path: root/cache.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-09 16:26:55 (GMT)
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-09 16:26:55 (GMT)
commiteb38c22f535c7c973f27b62845c5136c4be0ae49 (patch)
treedd229923a70e17998038996d66d4562df16f6d28 /cache.h
parent59c1e249808c6ba38194733fa00efddb9e0eb488 (diff)
downloadgit-eb38c22f535c7c973f27b62845c5136c4be0ae49.zip
git-eb38c22f535c7c973f27b62845c5136c4be0ae49.tar.gz
git-eb38c22f535c7c973f27b62845c5136c4be0ae49.tar.bz2
Make "cache_name_pos()" available to others.
It finds the cache entry position for a given name, and is generally useful. Sure, everybody can just scan the active cache array, but since it's sorted, you actually want to search it with a binary search, so let's not duplicate that logic all over the place.
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 900824a..a23ad51 100644
--- a/cache.h
+++ b/cache.h
@@ -73,6 +73,7 @@ unsigned int active_nr, active_alloc;
/* Initialize the cache information */
extern int read_cache(void);
+extern int cache_name_pos(const char *name, int namelen);
/* Return a statically allocated filename matching the sha1 signature */
extern char *sha1_file_name(unsigned char *sha1);