git/object.c

#define USE_THE_REPOSITORY_VARIABLE

#include "git-compat-util.h"
#include "gettext.h"
#include "hex.h"
#include "object.h"
#include "replace-object.h"
#include "object-file.h"
#include "object-store.h"
#include "blob.h"
#include "statinfo.h"
#include "tree.h"
#include "commit.h"
#include "tag.h"
#include "alloc.h"
#include "packfile.h"
#include "commit-graph.h"
#include "loose.h"

unsigned int get_max_object_index(void)
{}

struct object *get_indexed_object(unsigned int idx)
{}

static const char *object_type_strings[] =;

const char *type_name(unsigned int type)
{}

int type_from_string_gently(const char *str, ssize_t len, int gentle)
{}

/*
 * Return a numerical hash value between 0 and n-1 for the object with
 * the specified sha1.  n must be a power of 2.  Please note that the
 * return value is *not* consistent across computer architectures.
 */
static unsigned int hash_obj(const struct object_id *oid, unsigned int n)
{}

/*
 * Insert obj into the hash table hash, which has length size (which
 * must be a power of 2).  On collisions, simply overflow to the next
 * empty bucket.
 */
static void insert_obj_hash(struct object *obj, struct object **hash, unsigned int size)
{}

/*
 * Look up the record for the given sha1 in the hash map stored in
 * obj_hash.  Return NULL if it was not found.
 */
struct object *lookup_object(struct repository *r, const struct object_id *oid)
{}

/*
 * Increase the size of the hash map stored in obj_hash to the next
 * power of 2 (but at least 32).  Copy the existing values to the new
 * hash map.
 */
static void grow_object_hash(struct repository *r)
{}

void *create_object(struct repository *r, const struct object_id *oid, void *o)
{}

void *object_as_type(struct object *obj, enum object_type type, int quiet)
{}

struct object *lookup_unknown_object(struct repository *r, const struct object_id *oid)
{}

struct object *lookup_object_by_type(struct repository *r,
			    const struct object_id *oid,
			    enum object_type type)
{}

enum peel_status peel_object(struct repository *r,
			     const struct object_id *name,
			     struct object_id *oid)
{}

struct object *parse_object_buffer(struct repository *r, const struct object_id *oid, enum object_type type, unsigned long size, void *buffer, int *eaten_p)
{}

struct object *parse_object_or_die(const struct object_id *oid,
				   const char *name)
{}

struct object *parse_object_with_flags(struct repository *r,
				       const struct object_id *oid,
				       enum parse_object_flags flags)
{}

struct object *parse_object(struct repository *r, const struct object_id *oid)
{}

struct object_list *object_list_insert(struct object *item,
				       struct object_list **list_p)
{}

int object_list_contains(struct object_list *list, struct object *obj)
{}

void object_list_free(struct object_list **list)
{}

/*
 * A zero-length string to which object_array_entry::name can be
 * initialized without requiring a malloc/free.
 */
static char object_array_slopbuf[1];

void object_array_init(struct object_array *array)
{}

void add_object_array_with_path(struct object *obj, const char *name,
				struct object_array *array,
				unsigned mode, const char *path)
{}

void add_object_array(struct object *obj, const char *name, struct object_array *array)
{}

/*
 * Free all memory associated with an entry; the result is
 * in an unspecified state and should not be examined.
 */
static void object_array_release_entry(struct object_array_entry *ent)
{}

struct object *object_array_pop(struct object_array *array)
{}

void object_array_filter(struct object_array *array,
			 object_array_each_func_t want, void *cb_data)
{}

void object_array_clear(struct object_array *array)
{}

/*
 * Return true if array already contains an entry.
 */
static int contains_object(struct object_array *array,
			   const struct object *item, const char *name)
{}

void object_array_remove_duplicates(struct object_array *array)
{}

void clear_object_flags(unsigned flags)
{}

void repo_clear_commit_marks(struct repository *r, unsigned int flags)
{}

struct parsed_object_pool *parsed_object_pool_new(struct repository *repo)
{}

struct raw_object_store *raw_object_store_new(void)
{}

void free_object_directory(struct object_directory *odb)
{}

static void free_object_directories(struct raw_object_store *o)
{}

void raw_object_store_clear(struct raw_object_store *o)
{}

void parsed_object_pool_reset_commit_grafts(struct parsed_object_pool *o)
{}

void parsed_object_pool_clear(struct parsed_object_pool *o)
{}