git/builtin/submodule--helper.c

#define USE_THE_REPOSITORY_VARIABLE
#include "builtin.h"
#include "abspath.h"
#include "environment.h"
#include "gettext.h"
#include "hex.h"

#include "config.h"
#include "parse-options.h"
#include "quote.h"
#include "path.h"
#include "pathspec.h"
#include "preload-index.h"
#include "dir.h"
#include "read-cache.h"
#include "setup.h"
#include "sparse-index.h"
#include "submodule.h"
#include "submodule-config.h"
#include "string-list.h"
#include "run-command.h"
#include "remote.h"
#include "refs.h"
#include "refspec.h"
#include "revision.h"
#include "diffcore.h"
#include "diff.h"
#include "object-file.h"
#include "object-name.h"
#include "object-store-ll.h"
#include "advice.h"
#include "branch.h"
#include "list-objects-filter-options.h"

#define OPT_QUIET
#define OPT_CACHED
#define OPT_RECURSIVE
#define OPT_FORCE

each_submodule_fn;

static int repo_get_default_remote(struct repository *repo, char **default_remote)
{}

static int get_default_remote_submodule(const char *module_path, char **default_remote)
{}

static char *get_default_remote(void)
{}

static char *resolve_relative_url(const char *rel_url, const char *up_path, int quiet)
{}

/* the result should be freed by the caller. */
static char *get_submodule_displaypath(const char *path, const char *prefix,
				       const char *super_prefix)
{}

static char *compute_rev_name(const char *sub_path, const char* object_id)
{}

struct module_list {};
#define MODULE_LIST_INIT

static void module_list_release(struct module_list *ml)
{}

static int module_list_compute(const char **argv,
			       const char *prefix,
			       struct pathspec *pathspec,
			       struct module_list *list)
{}

static void module_list_active(struct module_list *list)
{}

static char *get_up_path(const char *path)
{}

static void for_each_listed_submodule(const struct module_list *list,
				      each_submodule_fn fn, void *cb_data)
{}

struct foreach_cb {};
#define FOREACH_CB_INIT

static void runcommand_in_submodule_cb(const struct cache_entry *list_item,
				       void *cb_data)
{}

static int module_foreach(int argc, const char **argv, const char *prefix)
{}

static int starts_with_dot_slash(const char *const path)
{}

static int starts_with_dot_dot_slash(const char *const path)
{}

struct init_cb {};
#define INIT_CB_INIT

static void init_submodule(const char *path, const char *prefix,
			   const char *super_prefix,
			   unsigned int flags)
{}

static void init_submodule_cb(const struct cache_entry *list_item, void *cb_data)
{}

static int module_init(int argc, const char **argv, const char *prefix)
{}

struct status_cb {};
#define STATUS_CB_INIT

static void print_status(unsigned int flags, char state, const char *path,
			 const struct object_id *oid, const char *displaypath)
{}

static int handle_submodule_head_ref(const char *refname UNUSED,
				     const char *referent UNUSED,
				     const struct object_id *oid,
				     int flags UNUSED,
				     void *cb_data)
{}

static void status_submodule(const char *path, const struct object_id *ce_oid,
			     unsigned int ce_flags, const char *prefix,
			     const char *super_prefix, unsigned int flags)
{}

static void status_submodule_cb(const struct cache_entry *list_item,
				void *cb_data)
{}

static int module_status(int argc, const char **argv, const char *prefix)
{}

struct module_cb {};
#define MODULE_CB_INIT

static void module_cb_release(struct module_cb *mcb)
{}

struct module_cb_list {};
#define MODULE_CB_LIST_INIT

static void module_cb_list_release(struct module_cb_list *mcbl)
{}

struct summary_cb {};
#define SUMMARY_CB_INIT

enum diff_cmd {};

static char *verify_submodule_committish(const char *sm_path,
					 const char *committish)
{}

static void print_submodule_summary(struct summary_cb *info, const char *errmsg,
				    int total_commits, const char *displaypath,
				    const char *src_abbrev, const char *dst_abbrev,
				    struct module_cb *p)
{}

static void generate_submodule_summary(struct summary_cb *info,
				       struct module_cb *p)
{}

static void prepare_submodule_summary(struct summary_cb *info,
				      struct module_cb_list *list)
{}

static void submodule_summary_callback(struct diff_queue_struct *q,
				       struct diff_options *options UNUSED,
				       void *data)
{}

static const char *get_diff_cmd(enum diff_cmd diff_cmd)
{}

static int compute_summary_module_list(struct object_id *head_oid,
				       struct summary_cb *info,
				       enum diff_cmd diff_cmd)
{}

static int module_summary(int argc, const char **argv, const char *prefix)
{}

struct sync_cb {};
#define SYNC_CB_INIT

static void sync_submodule(const char *path, const char *prefix,
			   const char *super_prefix, unsigned int flags)
{}

static void sync_submodule_cb(const struct cache_entry *list_item, void *cb_data)
{}

static int module_sync(int argc, const char **argv, const char *prefix)
{}

struct deinit_cb {};
#define DEINIT_CB_INIT

static void deinit_submodule(const char *path, const char *prefix,
			     unsigned int flags)
{}

static void deinit_submodule_cb(const struct cache_entry *list_item,
				void *cb_data)
{}

static int module_deinit(int argc, const char **argv, const char *prefix)
{}

struct module_clone_data {};
#define MODULE_CLONE_DATA_INIT

struct submodule_alternate_setup {};
#define SUBMODULE_ALTERNATE_SETUP_INIT

static const char alternate_error_advice[] =
);

static int add_possible_reference_from_superproject(
		struct object_directory *odb, void *sas_cb)
{}

static void prepare_possible_alternates(const char *sm_name,
		struct string_list *reference)
{}

static char *clone_submodule_sm_gitdir(const char *name)
{}

static int dir_contains_only_dotgit(const char *path)
{}

static int clone_submodule(const struct module_clone_data *clone_data,
			   struct string_list *reference)
{}

static int module_clone(int argc, const char **argv, const char *prefix)
{}

static int determine_submodule_update_strategy(struct repository *r,
					       int just_cloned,
					       const char *path,
					       enum submodule_update_type update,
					       struct submodule_update_strategy *out)
{}

struct update_clone_data {};

struct submodule_update_clone {};
#define SUBMODULE_UPDATE_CLONE_INIT

static void submodule_update_clone_release(struct submodule_update_clone *suc)
{}

struct update_data {};
#define UPDATE_DATA_INIT

static void update_data_release(struct update_data *ud)
{}

static void next_submodule_warn_missing(struct submodule_update_clone *suc,
		struct strbuf *out, const char *displaypath)
{}

/**
 * Determine whether 'ce' needs to be cloned. If so, prepare the 'child' to
 * run the clone. Returns 1 if 'ce' needs to be cloned, 0 otherwise.
 */
static int prepare_to_clone_next_submodule(const struct cache_entry *ce,
					   struct child_process *child,
					   struct submodule_update_clone *suc,
					   struct strbuf *out)
{}

static int update_clone_get_next_task(struct child_process *child,
				      struct strbuf *err,
				      void *suc_cb,
				      void **idx_task_cb)
{}

static int update_clone_start_failure(struct strbuf *err UNUSED,
				      void *suc_cb,
				      void *idx_task_cb UNUSED)
{}

static int update_clone_task_finished(int result,
				      struct strbuf *err,
				      void *suc_cb,
				      void *idx_task_cb)
{}

static int git_update_clone_config(const char *var, const char *value,
				   const struct config_context *ctx,
				   void *cb)
{}

static int is_tip_reachable(const char *path, const struct object_id *oid)
{}

static int fetch_in_submodule(const char *module_path, int depth, int quiet,
			      const struct object_id *oid)
{}

static int run_update_command(const struct update_data *ud, int subforce)
{}

static int run_update_procedure(const struct update_data *ud)
{}

static int remote_submodule_branch(const char *path, const char **branch)
{}

static int ensure_core_worktree(const char *path)
{}

static const char *submodule_update_type_to_label(enum submodule_update_type type)
{}

static void update_data_to_args(const struct update_data *update_data,
				struct strvec *args)
{}

static int update_submodule(struct update_data *update_data)
{}

static int update_submodules(struct update_data *update_data)
{}

static int module_update(int argc, const char **argv, const char *prefix)
{}

static int push_check(int argc, const char **argv, const char *prefix UNUSED)
{}

static int absorb_git_dirs(int argc, const char **argv, const char *prefix)
{}

static int module_set_url(int argc, const char **argv, const char *prefix)
{}

static int module_set_branch(int argc, const char **argv, const char *prefix)
{}

static int module_create_branch(int argc, const char **argv, const char *prefix)
{}

struct add_data {};
#define ADD_DATA_INIT

static void append_fetch_remotes(struct strbuf *msg, const char *git_dir_path)
{}

static int add_submodule(const struct add_data *add_data)
{}

static int config_submodule_in_gitmodules(const char *name, const char *var, const char *value)
{}

static void configure_added_submodule(struct add_data *add_data)
{}

static void die_on_index_match(const char *path, int force)
{}

static void die_on_repo_without_commits(const char *path)
{}

static int module_add(int argc, const char **argv, const char *prefix)
{}

int cmd_submodule__helper(int argc,
			  const char **argv,
			  const char *prefix,
			  struct repository *repo UNUSED)
{}