#define USE_THE_REPOSITORY_VARIABLE
#include "builtin.h"
#include "bulk-checkin.h"
#include "config.h"
#include "environment.h"
#include "gettext.h"
#include "hash.h"
#include "hex.h"
#include "lockfile.h"
#include "quote.h"
#include "cache-tree.h"
#include "tree-walk.h"
#include "object-file.h"
#include "refs.h"
#include "resolve-undo.h"
#include "parse-options.h"
#include "pathspec.h"
#include "dir.h"
#include "read-cache.h"
#include "setup.h"
#include "sparse-index.h"
#include "split-index.h"
#include "symlinks.h"
#include "fsmonitor.h"
#include "write-or-die.h"
static int allow_add;
static int allow_remove;
static int allow_replace;
static int info_only;
static int force_remove;
static int verbose;
static int mark_valid_only;
static int mark_skip_worktree_only;
static int mark_fsmonitor_only;
static int ignore_skip_worktree_entries;
#define MARK_FLAG …
#define UNMARK_FLAG …
static struct strbuf mtime_dir = …;
enum uc_mode { … };
__attribute__((format (printf, 1, 2)))
static void report(const char *fmt, ...)
{ … }
static void remove_test_directory(void)
{ … }
static const char *get_mtime_path(const char *path)
{ … }
static void xmkdir(const char *path)
{ … }
static int xstat_mtime_dir(struct stat *st)
{ … }
static int create_file(const char *path)
{ … }
static void xunlink(const char *path)
{ … }
static void xrmdir(const char *path)
{ … }
static void avoid_racy(void)
{ … }
static int test_if_untracked_cache_is_supported(void)
{ … }
static int mark_ce_flags(const char *path, int flag, int mark)
{ … }
static int remove_one_path(const char *path)
{ … }
static int process_lstat_error(const char *path, int err)
{ … }
static int add_one_path(const struct cache_entry *old, const char *path, int len, struct stat *st)
{ … }
static int process_directory(const char *path, int len, struct stat *st)
{ … }
static int process_path(const char *path, struct stat *st, int stat_errno)
{ … }
static int add_cacheinfo(unsigned int mode, const struct object_id *oid,
const char *path, int stage)
{ … }
static void chmod_path(char flip, const char *path)
{ … }
static void update_one(const char *path)
{ … }
static void read_index_info(int nul_term_line)
{ … }
static const char * const update_index_usage[] = …;
static struct cache_entry *read_one_ent(const char *which,
struct object_id *ent, const char *path,
int namelen, int stage)
{ … }
static int unresolve_one(const char *path)
{ … }
static int do_unresolve(int ac, const char **av,
const char *prefix, int prefix_length)
{ … }
static int do_reupdate(const char **paths,
const char *prefix)
{ … }
struct refresh_params { … };
static int refresh(struct refresh_params *o, unsigned int flag)
{ … }
static int refresh_callback(const struct option *opt,
const char *arg, int unset)
{ … }
static int really_refresh_callback(const struct option *opt,
const char *arg, int unset)
{ … }
static int chmod_callback(const struct option *opt,
const char *arg, int unset)
{ … }
static int resolve_undo_clear_callback(const struct option *opt UNUSED,
const char *arg, int unset)
{ … }
static int parse_new_style_cacheinfo(const char *arg,
unsigned int *mode,
struct object_id *oid,
const char **path)
{ … }
static enum parse_opt_result cacheinfo_callback(
struct parse_opt_ctx_t *ctx, const struct option *opt UNUSED,
const char *arg, int unset)
{ … }
static enum parse_opt_result stdin_cacheinfo_callback(
struct parse_opt_ctx_t *ctx, const struct option *opt,
const char *arg, int unset)
{ … }
static enum parse_opt_result stdin_callback(
struct parse_opt_ctx_t *ctx, const struct option *opt,
const char *arg, int unset)
{ … }
static enum parse_opt_result unresolve_callback(
struct parse_opt_ctx_t *ctx, const struct option *opt,
const char *arg, int unset)
{ … }
static enum parse_opt_result reupdate_callback(
struct parse_opt_ctx_t *ctx, const struct option *opt,
const char *arg, int unset)
{ … }
int cmd_update_index(int argc,
const char **argv,
const char *prefix,
struct repository *repo UNUSED)
{ … }