#define USE_THE_REPOSITORY_VARIABLE #include "builtin.h" #include "config.h" #include "dir.h" #include "environment.h" #include "gettext.h" #include "object-file.h" #include "object-name.h" #include "parse-options.h" #include "pathspec.h" #include "strbuf.h" #include "string-list.h" #include "lockfile.h" #include "unpack-trees.h" #include "quote.h" #include "setup.h" #include "sparse-index.h" #include "worktree.h" static const char *empty_base = …; static char const * const builtin_sparse_checkout_usage[] = …; static void write_patterns_to_file(FILE *fp, struct pattern_list *pl) { … } static char const * const builtin_sparse_checkout_list_usage[] = …; static int sparse_checkout_list(int argc, const char **argv, const char *prefix) { … } static void clean_tracked_sparse_directories(struct repository *r) { … } static int update_working_directory(struct pattern_list *pl) { … } static char *escaped_pattern(char *pattern) { … } static void write_cone_to_file(FILE *fp, struct pattern_list *pl) { … } static int write_patterns_and_update(struct pattern_list *pl) { … } enum sparse_checkout_mode { … }; static int set_config(enum sparse_checkout_mode mode) { … } static enum sparse_checkout_mode update_cone_mode(int *cone_mode) { … } static int update_modes(int *cone_mode, int *sparse_index) { … } static char const * const builtin_sparse_checkout_init_usage[] = …; static struct sparse_checkout_init_opts { … } init_opts; static int sparse_checkout_init(int argc, const char **argv, const char *prefix) { … } static void insert_recursive_pattern(struct pattern_list *pl, struct strbuf *path) { … } static void strbuf_to_cone_pattern(struct strbuf *line, struct pattern_list *pl) { … } static void add_patterns_from_input(struct pattern_list *pl, int argc, const char **argv, FILE *file) { … } enum modify_type { … }; static void add_patterns_cone_mode(int argc, const char **argv, struct pattern_list *pl, int use_stdin) { … } static void add_patterns_literal(int argc, const char **argv, struct pattern_list *pl, int use_stdin) { … } static int modify_pattern_list(int argc, const char **argv, int use_stdin, enum modify_type m) { … } static void sanitize_paths(int argc, const char **argv, const char *prefix, int skip_checks) { … } static char const * const builtin_sparse_checkout_add_usage[] = …; static struct sparse_checkout_add_opts { … } add_opts; static int sparse_checkout_add(int argc, const char **argv, const char *prefix) { … } static char const * const builtin_sparse_checkout_set_usage[] = …; static struct sparse_checkout_set_opts { … } set_opts; static int sparse_checkout_set(int argc, const char **argv, const char *prefix) { … } static char const * const builtin_sparse_checkout_reapply_usage[] = …; static struct sparse_checkout_reapply_opts { … } reapply_opts; static int sparse_checkout_reapply(int argc, const char **argv, const char *prefix) { … } static char const * const builtin_sparse_checkout_disable_usage[] = …; static int sparse_checkout_disable(int argc, const char **argv, const char *prefix) { … } static char const * const builtin_sparse_checkout_check_rules_usage[] = …; static struct sparse_checkout_check_rules_opts { … } check_rules_opts; static int check_rules(struct pattern_list *pl, int null_terminated) { … } static int sparse_checkout_check_rules(int argc, const char **argv, const char *prefix) { … } int cmd_sparse_checkout(int argc, const char **argv, const char *prefix, struct repository *repo UNUSED) { … }