summaryrefslogtreecommitdiff
path: root/read-cache.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-23 00:15:28 (GMT)
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-23 00:15:28 (GMT)
commitb5af9107270171b79d46b099ee0b198e653f3a24 (patch)
tree8284e5e732d110051beb6281e423488b74ee7593 /read-cache.c
parent94537c78a82619b2625cb827ec0094703579bfed (diff)
downloadgit-b5af9107270171b79d46b099ee0b198e653f3a24.zip
git-b5af9107270171b79d46b099ee0b198e653f3a24.tar.gz
git-b5af9107270171b79d46b099ee0b198e653f3a24.tar.bz2
New "diff-cache" implementation.
This one is about a million times simpler, and much more likely to be correct too. Instead of trying to match up a tree object against the index, we just read in the tree object side-by-side into the index, and just walk the resulting index file. This was what all the read-tree cleanups were all getting to.
Diffstat (limited to 'read-cache.c')
-rw-r--r--read-cache.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/read-cache.c b/read-cache.c
index 4b668be..f67aceb 100644
--- a/read-cache.c
+++ b/read-cache.c
@@ -87,7 +87,7 @@ int cache_name_pos(const char *name, int namelen)
}
/* Remove entry, return true if there are more entries to go.. */
-static int remove_entry_at(int pos)
+int remove_entry_at(int pos)
{
active_nr--;
if (pos >= active_nr)
@@ -106,7 +106,7 @@ int remove_file_from_cache(char *path)
return 0;
}
-static int same_name(struct cache_entry *a, struct cache_entry *b)
+int same_name(struct cache_entry *a, struct cache_entry *b)
{
int len = ce_namelen(a);
return ce_namelen(b) == len && !memcmp(a->name, b->name, len);