| 2978 | } |
| 2979 | |
| 2980 | static int module_update(int argc, const char **argv, const char *prefix, |
| 2981 | struct repository *repo UNUSED) |
| 2982 | { |
| 2983 | struct pathspec pathspec = { 0 }; |
| 2984 | struct pathspec pathspec2 = { 0 }; |
| 2985 | struct update_data opt = UPDATE_DATA_INIT; |
| 2986 | struct list_objects_filter_options filter_options = |
| 2987 | LIST_OBJECTS_FILTER_INIT; |
| 2988 | const char *ref_storage_format = NULL; |
| 2989 | int ret; |
| 2990 | struct option module_update_options[] = { |
| 2991 | OPT__SUPER_PREFIX(&opt.super_prefix), |
| 2992 | OPT__FORCE(&opt.force, N_("force checkout updates"), 0), |
| 2993 | OPT_BOOL(0, "init", &opt.init, |
| 2994 | N_("initialize uninitialized submodules before update")), |
| 2995 | OPT_BOOL(0, "remote", &opt.remote, |
| 2996 | N_("use SHA-1 of submodule's remote tracking branch")), |
| 2997 | OPT_BOOL(0, "recursive", &opt.recursive, |
| 2998 | N_("traverse submodules recursively")), |
| 2999 | OPT_BOOL('N', "no-fetch", &opt.nofetch, |
| 3000 | N_("don't fetch new objects from the remote site")), |
| 3001 | OPT_SET_INT(0, "checkout", &opt.update_default, |
| 3002 | N_("use the 'checkout' update strategy (default)"), |
| 3003 | SM_UPDATE_CHECKOUT), |
| 3004 | OPT_SET_INT('m', "merge", &opt.update_default, |
| 3005 | N_("use the 'merge' update strategy"), |
| 3006 | SM_UPDATE_MERGE), |
| 3007 | OPT_SET_INT('r', "rebase", &opt.update_default, |
| 3008 | N_("use the 'rebase' update strategy"), |
| 3009 | SM_UPDATE_REBASE), |
| 3010 | OPT_STRING_LIST(0, "reference", &opt.references, N_("repo"), |
| 3011 | N_("reference repository")), |
| 3012 | OPT_STRING(0, "ref-format", &ref_storage_format, N_("format"), |
| 3013 | N_("specify the reference format to use")), |
| 3014 | OPT_BOOL(0, "dissociate", &opt.dissociate, |
| 3015 | N_("use --reference only while cloning")), |
| 3016 | OPT_INTEGER(0, "depth", &opt.depth, |
| 3017 | N_("create a shallow clone truncated to the " |
| 3018 | "specified number of revisions")), |
| 3019 | OPT_INTEGER('j', "jobs", &opt.max_jobs, |
| 3020 | N_("parallel jobs")), |
| 3021 | OPT_BOOL(0, "recommend-shallow", &opt.recommend_shallow, |
| 3022 | N_("whether the initial clone should follow the shallow recommendation")), |
| 3023 | OPT__QUIET(&opt.quiet, N_("don't print cloning progress")), |
| 3024 | OPT_BOOL(0, "progress", &opt.progress, |
| 3025 | N_("force cloning progress")), |
| 3026 | OPT_BOOL(0, "require-init", &opt.require_init, |
| 3027 | N_("disallow cloning into non-empty directory, implies --init")), |
| 3028 | OPT_BOOL(0, "single-branch", &opt.single_branch, |
| 3029 | N_("clone only one branch, HEAD or --branch")), |
| 3030 | OPT_PARSE_LIST_OBJECTS_FILTER(&filter_options), |
| 3031 | OPT_END() |
| 3032 | }; |
| 3033 | const char *const git_submodule_helper_usage[] = { |
| 3034 | N_("git submodule [--quiet] update" |
| 3035 | " [--init [--filter=<filter-spec>]] [--remote]" |
| 3036 | " [-N|--no-fetch] [-f|--force]" |
| 3037 | " [--checkout|--merge|--rebase]" |
nothing calls this directly
no test coverage detected