#define USE_THE_REPOSITORY_VARIABLE
#include "git-compat-util.h"
#include "tree-walk.h"
#include "dir.h"
#include "gettext.h"
#include "hex.h"
#include "object-file.h"
#include "object-store-ll.h"
#include "trace2.h"
#include "tree.h"
#include "pathspec.h"
#include "json-writer.h"
#include "environment.h"
static int decode_tree_entry(struct tree_desc *desc, const char *buf, unsigned long size, struct strbuf *err)
{ … }
static int init_tree_desc_internal(struct tree_desc *desc,
const struct object_id *oid,
const void *buffer, unsigned long size,
struct strbuf *err,
enum tree_desc_flags flags)
{ … }
void init_tree_desc(struct tree_desc *desc, const struct object_id *tree_oid,
const void *buffer, unsigned long size)
{ … }
int init_tree_desc_gently(struct tree_desc *desc, const struct object_id *oid,
const void *buffer, unsigned long size,
enum tree_desc_flags flags)
{ … }
void *fill_tree_descriptor(struct repository *r,
struct tree_desc *desc,
const struct object_id *oid)
{ … }
static void entry_clear(struct name_entry *a)
{ … }
static void entry_extract(struct tree_desc *t, struct name_entry *a)
{ … }
static int update_tree_entry_internal(struct tree_desc *desc, struct strbuf *err)
{ … }
void update_tree_entry(struct tree_desc *desc)
{ … }
int update_tree_entry_gently(struct tree_desc *desc)
{ … }
int tree_entry(struct tree_desc *desc, struct name_entry *entry)
{ … }
int tree_entry_gently(struct tree_desc *desc, struct name_entry *entry)
{ … }
static int traverse_trees_atexit_registered;
static int traverse_trees_count;
static int traverse_trees_cur_depth;
static int traverse_trees_max_depth;
static void trace2_traverse_trees_statistics_atexit(void)
{ … }
void setup_traverse_info(struct traverse_info *info, const char *base)
{ … }
char *make_traverse_path(char *path, size_t pathlen,
const struct traverse_info *info,
const char *name, size_t namelen)
{ … }
void strbuf_make_traverse_path(struct strbuf *out,
const struct traverse_info *info,
const char *name, size_t namelen)
{ … }
struct tree_desc_skip { … };
struct tree_desc_x { … };
static int check_entry_match(const char *a, int a_len, const char *b, int b_len)
{ … }
static void extended_entry_extract(struct tree_desc_x *t,
struct name_entry *a,
const char *first,
int first_len)
{ … }
static void update_extended_entry(struct tree_desc_x *t, struct name_entry *a)
{ … }
static void free_extended_entry(struct tree_desc_x *t)
{ … }
static inline int prune_traversal(struct index_state *istate,
struct name_entry *e,
struct traverse_info *info,
struct strbuf *base,
int still_interesting)
{ … }
int traverse_trees(struct index_state *istate,
int n, struct tree_desc *t,
struct traverse_info *info)
{ … }
struct dir_state { … };
static int find_tree_entry(struct repository *r, struct tree_desc *t,
const char *name, struct object_id *result,
unsigned short *mode)
{ … }
int get_tree_entry(struct repository *r,
const struct object_id *tree_oid,
const char *name,
struct object_id *oid,
unsigned short *mode)
{ … }
#define GET_TREE_ENTRY_FOLLOW_SYMLINKS_MAX_LINKS …
enum get_oid_result get_tree_entry_follow_symlinks(struct repository *r,
struct object_id *tree_oid, const char *name,
struct object_id *result, struct strbuf *result_path,
unsigned short *mode)
{ … }
static int match_entry(const struct pathspec_item *item,
const struct name_entry *entry, int pathlen,
const char *match, int matchlen,
enum interesting *never_interesting)
{ … }
static int basecmp(const struct pathspec_item *item,
const char *base, const char *match, int len)
{ … }
static int match_dir_prefix(const struct pathspec_item *item,
const char *base,
const char *match, int matchlen)
{ … }
static int match_wildcard_base(const struct pathspec_item *item,
const char *base, int baselen,
int *matched)
{ … }
static enum interesting do_match(struct index_state *istate,
const struct name_entry *entry,
struct strbuf *base,
const struct pathspec *ps,
int exclude)
{ … }
enum interesting tree_entry_interesting(struct index_state *istate,
const struct name_entry *entry,
struct strbuf *base,
const struct pathspec *ps)
{ … }