git/cache-tree.c

#define USE_THE_REPOSITORY_VARIABLE

#include "git-compat-util.h"
#include "gettext.h"
#include "hex.h"
#include "lockfile.h"
#include "tree.h"
#include "tree-walk.h"
#include "cache-tree.h"
#include "bulk-checkin.h"
#include "object-file.h"
#include "object-store-ll.h"
#include "read-cache-ll.h"
#include "replace-object.h"
#include "repository.h"
#include "promisor-remote.h"
#include "trace.h"
#include "trace2.h"

#ifndef DEBUG_CACHE_TREE
#define DEBUG_CACHE_TREE
#endif

struct cache_tree *cache_tree(void)
{}

void cache_tree_free(struct cache_tree **it_p)
{}

static int subtree_name_cmp(const char *one, int onelen,
			    const char *two, int twolen)
{}

int cache_tree_subtree_pos(struct cache_tree *it, const char *path, int pathlen)
{}

static struct cache_tree_sub *find_subtree(struct cache_tree *it,
					   const char *path,
					   int pathlen,
					   int create)
{}

struct cache_tree_sub *cache_tree_sub(struct cache_tree *it, const char *path)
{}

static int do_invalidate_path(struct cache_tree *it, const char *path)
{}

void cache_tree_invalidate_path(struct index_state *istate, const char *path)
{}

static int verify_cache(struct index_state *istate, int flags)
{}

static void discard_unused_subtrees(struct cache_tree *it)
{}

int cache_tree_fully_valid(struct cache_tree *it)
{}

static int must_check_existence(const struct cache_entry *ce)
{}

static int update_one(struct cache_tree *it,
		      struct cache_entry **cache,
		      int entries,
		      const char *base,
		      int baselen,
		      int *skip_count,
		      int flags)
{}

int cache_tree_update(struct index_state *istate, int flags)
{}

static void write_one(struct strbuf *buffer, struct cache_tree *it,
		      const char *path, int pathlen)
{}

void cache_tree_write(struct strbuf *sb, struct cache_tree *root)
{}

static struct cache_tree *read_one(const char **buffer, unsigned long *size_p)
{}

struct cache_tree *cache_tree_read(const char *buffer, unsigned long size)
{}

static struct cache_tree *cache_tree_find(struct cache_tree *it, const char *path)
{}

static int write_index_as_tree_internal(struct object_id *oid,
					struct index_state *index_state,
					int cache_tree_valid,
					int flags,
					const char *prefix)
{}

struct tree* write_in_core_index_as_tree(struct repository *repo) {}


int write_index_as_tree(struct object_id *oid, struct index_state *index_state, const char *index_path, int flags, const char *prefix)
{}

static void prime_cache_tree_sparse_dir(struct cache_tree *it,
					struct tree *tree)
{}

static void prime_cache_tree_rec(struct repository *r,
				 struct cache_tree *it,
				 struct tree *tree,
				 struct strbuf *tree_path)
{}

void prime_cache_tree(struct repository *r,
		      struct index_state *istate,
		      struct tree *tree)
{}

/*
 * find the cache_tree that corresponds to the current level without
 * exploding the full path into textual form.  The root of the
 * cache tree is given as "root", and our current level is "info".
 * (1) When at root level, info->prev is NULL, so it is "root" itself.
 * (2) Otherwise, find the cache_tree that corresponds to one level
 *     above us, and find ourselves in there.
 */
static struct cache_tree *find_cache_tree_from_traversal(struct cache_tree *root,
							 struct traverse_info *info)
{}

int cache_tree_matches_traversal(struct cache_tree *root,
				 struct name_entry *ent,
				 struct traverse_info *info)
{}

static int verify_one_sparse(struct index_state *istate,
			     struct strbuf *path,
			     int pos)
{}

/*
 * Returns:
 *  0 - Verification completed.
 *  1 - Restart verification - a call to ensure_full_index() freed the cache
 *      tree that is being verified and verification needs to be restarted from
 *      the new toplevel cache tree.
 *  -1 - Verification failed.
 */
static int verify_one(struct repository *r,
		      struct index_state *istate,
		      struct cache_tree *it,
		      struct strbuf *path)
{}

int cache_tree_verify(struct repository *r, struct index_state *istate)
{}