index d448daeab172a2a8b1a1c0624319f3f0096d40c0..96f78f6a3407ee86ab73de736e0485614017cb92 100644 (file)
--- a/tree.c
+++ b/tree.c
memcpy(ce->name, base, baselen);
memcpy(ce->name + baselen, pathname, len+1);
memcpy(ce->sha1, sha1, 20);
memcpy(ce->name, base, baselen);
memcpy(ce->name + baselen, pathname, len+1);
memcpy(ce->sha1, sha1, 20);
- return add_cache_entry(ce, ADD_CACHE_OK_TO_ADD);
+ return add_cache_entry(ce, ADD_CACHE_OK_TO_ADD|ADD_CACHE_SKIP_DFCHECK);
}
static int read_tree_recursive(void *buffer, unsigned long size,
}
static int read_tree_recursive(void *buffer, unsigned long size,
return read_tree_recursive(buffer, size, "", 0, stage);
}
return read_tree_recursive(buffer, size, "", 0, stage);
}
-struct tree *lookup_tree(unsigned char *sha1)
+struct tree *lookup_tree(const unsigned char *sha1)
{
struct object *obj = lookup_object(sha1);
if (!obj) {
{
struct object *obj = lookup_object(sha1);
if (!obj) {
}
if (obj)
add_ref(&item->object, obj);
}
if (obj)
add_ref(&item->object, obj);
-
+ entry->parent = NULL; /* needs to be filled by the user */
*list_p = entry;
list_p = &entry->next;
}
*list_p = entry;
list_p = &entry->next;
}