#define USE_THE_REPOSITORY_VARIABLE
#include "git-compat-util.h"
#include "environment.h"
#include "ewah/ewok.h"
#include "gettext.h"
#include "name-hash.h"
#include "read-cache-ll.h"
#include "repository.h"
#include "sparse-index.h"
#include "tree.h"
#include "pathspec.h"
#include "trace2.h"
#include "cache-tree.h"
#include "config.h"
#include "dir.h"
#include "fsmonitor-ll.h"
#include "advice.h"
int give_advice_on_expansion = …;
#define ADVICE_MSG …
struct modify_index_context { … };
static struct cache_entry *construct_sparse_dir_entry(
struct index_state *istate,
const char *sparse_dir,
struct cache_tree *tree)
{ … }
static int convert_to_sparse_rec(struct index_state *istate,
int num_converted,
int start, int end,
const char *ct_path, size_t ct_pathlen,
struct cache_tree *ct)
{ … }
int set_sparse_index_config(struct repository *repo, int enable)
{ … }
static int index_has_unmerged_entries(struct index_state *istate)
{ … }
int is_sparse_index_allowed(struct index_state *istate, int flags)
{ … }
int convert_to_sparse(struct index_state *istate, int flags)
{ … }
static void set_index_entry(struct index_state *istate, int nr, struct cache_entry *ce)
{ … }
static int add_path_to_index(const struct object_id *oid,
struct strbuf *base, const char *path,
unsigned int mode, void *context)
{ … }
void expand_index(struct index_state *istate, struct pattern_list *pl)
{ … }
void ensure_full_index(struct index_state *istate)
{ … }
void ensure_correct_sparsity(struct index_state *istate)
{ … }
struct path_found_data { … };
#define PATH_FOUND_DATA_INIT …
static void clear_path_found_data(struct path_found_data *data)
{ … }
static size_t max_common_dir_prefix(const char *path1, const char *path2)
{ … }
static int path_found(const char *path, struct path_found_data *data)
{ … }
static int clear_skip_worktree_from_present_files_sparse(struct index_state *istate)
{ … }
static void clear_skip_worktree_from_present_files_full(struct index_state *istate)
{ … }
void clear_skip_worktree_from_present_files(struct index_state *istate)
{ … }
static int in_expand_to_path = …;
void expand_to_path(struct index_state *istate,
const char *path, size_t pathlen, int icase)
{ … }