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.
This commit is contained in:
@ -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);
|
||||
|
Reference in New Issue
Block a user