Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'object.h')
-rw-r--r--object.h31
1 files changed, 29 insertions, 2 deletions
diff --git a/object.h b/object.h
index 7db4941d6d..7227b97166 100644
--- a/object.h
+++ b/object.h
@@ -1,6 +1,32 @@
#ifndef OBJECT_H
#define OBJECT_H
+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);
+void parsed_object_pool_clear(struct parsed_object_pool *o);
+
struct object_list {
struct object *item;
struct object_list *next;
@@ -27,7 +53,7 @@ struct object_array {
/*
* object flag allocation:
- * revision.h: 0---------10 26
+ * revision.h: 0---------10 2526
* fetch-pack.c: 01
* negotiator/default.c: 2--5
* walker.c: 0-2
@@ -43,6 +69,7 @@ struct object_array {
* 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
@@ -85,7 +112,7 @@ extern struct object *get_indexed_object(unsigned int);
*/
struct object *lookup_object(const unsigned char *sha1);
-extern void *create_object(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);