struct parsed_object_pool {
struct object **obj_hash;
int nr_objs, obj_hash_size;
+
+ /* TODO: migrate alloc_states to mem-pool? */
+ struct alloc_state *blob_state;
+ struct alloc_state *tree_state;
+ struct alloc_state *commit_state;
+ struct alloc_state *tag_state;
+ struct alloc_state *object_state;
+ unsigned commit_count;
+
+ /* parent substitutions from .git/info/grafts and .git/shallow */
+ struct commit_graft **grafts;
+ int grafts_alloc, grafts_nr;
+
+ int is_shallow;
+ struct stat_validity *shallow_stat;
+ char *alternate_shallow_file;
+
+ int commit_graft_prepared;
};
struct parsed_object_pool *parsed_object_pool_new(void);
#define OBJECT_ARRAY_INIT { 0, 0, NULL }
-#define TYPE_BITS 3
/*
* object flag allocation:
* revision.h: 0---------10 26
* bundle.c: 16
* http-push.c: 16-----19
* commit.c: 16-----19
- * sha1_name.c: 20
+ * sha1-name.c: 20
* list-objects-filter.c: 21
* builtin/fsck.c: 0--3
* builtin/index-pack.c: 2021
* builtin/pack-objects.c: 20
* builtin/reflog.c: 10--12
+ * builtin/show-branch.c: 0-------------------------------------------26
* builtin/unpack-objects.c: 2021
*/
#define FLAG_BITS 27
*/
struct object *lookup_object(const unsigned char *sha1);
-#define create_object(r, s, o) create_object_##r(s, o)
-extern void *create_object_the_repository(const unsigned char *sha1, void *obj);
+extern void *create_object(struct repository *r, const unsigned char *sha1, void *obj);
void *object_as_type(struct object *obj, enum object_type type, int quiet);