diff options
author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-22 17:15:28 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-22 17:15:28 -0700 |
commit | b5af9107270171b79d46b099ee0b198e653f3a24 (patch) | |
tree | 8284e5e732d110051beb6281e423488b74ee7593 /read-cache.c | |
parent | 94537c78a82619b2625cb827ec0094703579bfed (diff) | |
download | git-b5af9107270171b79d46b099ee0b198e653f3a24.tar.gz git-b5af9107270171b79d46b099ee0b198e653f3a24.tar.xz |
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.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/read-cache.c b/read-cache.c index 4b668be47..f67aceb6b 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); |