#define USE_THE_REPOSITORY_VARIABLE #include "git-compat-util.h" #include "diagnose.h" #include "compat/disk.h" #include "archive.h" #include "dir.h" #include "help.h" #include "gettext.h" #include "hex.h" #include "strvec.h" #include "object-store-ll.h" #include "packfile.h" #include "parse-options.h" #include "write-or-die.h" struct archive_dir { … }; struct diagnose_option { … }; static struct diagnose_option diagnose_options[] = …; int option_parse_diagnose(const struct option *opt, const char *arg, int unset) { … } static void dir_file_stats_objects(const char *full_path, size_t full_path_len UNUSED, const char *file_name, void *data) { … } static int dir_file_stats(struct object_directory *object_dir, void *data) { … } static int count_files(struct strbuf *path) { … } static void loose_objs_stats(struct strbuf *buf, const char *path) { … } static int add_directory_to_archiver(struct strvec *archiver_args, const char *path, int recurse) { … } int create_diagnostics_archive(struct strbuf *zip_path, enum diagnose_mode mode) { … }