#define USE_THE_REPOSITORY_VARIABLE
#include "builtin.h"
#include "config.h"
#include "convert.h"
#include "quote.h"
#include "dir.h"
#include "gettext.h"
#include "object-name.h"
#include "strbuf.h"
#include "parse-options.h"
#include "resolve-undo.h"
#include "string-list.h"
#include "path.h"
#include "pathspec.h"
#include "read-cache.h"
#include "setup.h"
#include "sparse-index.h"
#include "submodule.h"
#include "object-store.h"
#include "hex.h"
static int abbrev;
static int show_deleted;
static int show_cached;
static int show_others;
static int show_stage;
static int show_unmerged;
static int show_resolve_undo;
static int show_modified;
static int show_killed;
static int show_valid_bit;
static int show_fsmonitor_bit;
static int line_terminator = …;
static int debug_mode;
static int show_eol;
static int recurse_submodules;
static int skipping_duplicates;
static int show_sparse_dirs;
static const char *prefix;
static int max_prefix_len;
static int prefix_len;
static struct pathspec pathspec;
static int error_unmatch;
static char *ps_matched;
static const char *with_tree;
static int exc_given;
static int exclude_args;
static const char *format;
static const char *tag_cached = …;
static const char *tag_unmerged = …;
static const char *tag_removed = …;
static const char *tag_other = …;
static const char *tag_killed = …;
static const char *tag_modified = …;
static const char *tag_skip_worktree = …;
static const char *tag_resolve_undo = …;
static void write_eolinfo(struct index_state *istate,
const struct cache_entry *ce, const char *path)
{ … }
static void write_name(const char *name)
{ … }
static void write_name_to_buf(struct strbuf *sb, const char *name)
{ … }
static const char *get_tag(const struct cache_entry *ce, const char *tag)
{ … }
static void print_debug(const struct cache_entry *ce)
{ … }
static void show_dir_entry(struct index_state *istate,
const char *tag, struct dir_entry *ent)
{ … }
static void show_other_files(struct index_state *istate,
const struct dir_struct *dir)
{ … }
static void show_killed_files(struct index_state *istate,
const struct dir_struct *dir)
{ … }
static void show_files(struct repository *repo, struct dir_struct *dir);
static void show_submodule(struct repository *superproject,
struct dir_struct *dir, const char *path)
{ … }
static void expand_objectsize(struct strbuf *line, const struct object_id *oid,
const enum object_type type, unsigned int padded)
{ … }
static void show_ce_fmt(struct repository *repo, const struct cache_entry *ce,
const char *format, const char *fullname) { … }
static void show_ce(struct repository *repo, struct dir_struct *dir,
const struct cache_entry *ce, const char *fullname,
const char *tag)
{ … }
static void show_ru_info(struct index_state *istate)
{ … }
static int ce_excluded(struct dir_struct *dir, struct index_state *istate,
const char *fullname, const struct cache_entry *ce)
{ … }
static void construct_fullname(struct strbuf *out, const struct repository *repo,
const struct cache_entry *ce)
{ … }
static void show_files(struct repository *repo, struct dir_struct *dir)
{ … }
static void prune_index(struct index_state *istate,
const char *prefix, size_t prefixlen)
{ … }
static int get_common_prefix_len(const char *common_prefix)
{ … }
static const char * const ls_files_usage[] = …;
static int option_parse_exclude(const struct option *opt,
const char *arg, int unset)
{ … }
static int option_parse_exclude_from(const struct option *opt,
const char *arg, int unset)
{ … }
static int option_parse_exclude_standard(const struct option *opt,
const char *arg, int unset)
{ … }
int cmd_ls_files(int argc,
const char **argv,
const char *cmd_prefix,
struct repository *repo UNUSED)
{ … }