MCPcopy Index your code
hub / github.com/git/git / cmd_pack_objects

Function cmd_pack_objects

builtin/pack-objects.c:5029–5452  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5027}
5028
5029int cmd_pack_objects(int argc,
5030 const char **argv,
5031 const char *prefix,
5032 struct repository *repo UNUSED)
5033{
5034 int use_internal_rev_list = 0;
5035 int all_progress_implied = 0;
5036 struct strvec rp = STRVEC_INIT;
5037 int rev_list_unpacked = 0, rev_list_all = 0, rev_list_reflog = 0;
5038 int rev_list_index = 0;
5039 enum stdin_packs_mode stdin_packs = STDIN_PACKS_MODE_NONE;
5040 struct string_list keep_pack_list = STRING_LIST_INIT_NODUP;
5041 struct list_objects_filter_options filter_options =
5042 LIST_OBJECTS_FILTER_INIT;
5043 struct repo_config_values *cfg = repo_config_values(the_repository);
5044
5045 struct option pack_objects_options[] = {
5046 OPT_CALLBACK_F('q', "quiet", &progress, NULL,
5047 N_("do not show progress meter"),
5048 PARSE_OPT_NOARG, option_parse_quiet),
5049 OPT_SET_INT(0, "progress", &progress,
5050 N_("show progress meter"), 1),
5051 OPT_SET_INT(0, "all-progress", &progress,
5052 N_("show progress meter during object writing phase"), 2),
5053 OPT_BOOL(0, "all-progress-implied",
5054 &all_progress_implied,
5055 N_("similar to --all-progress when progress meter is shown")),
5056 OPT_CALLBACK_F(0, "index-version", &pack_idx_opts, N_("<version>[,<offset>]"),
5057 N_("write the pack index file in the specified idx format version"),
5058 PARSE_OPT_NONEG, option_parse_index_version),
5059 OPT_UNSIGNED(0, "max-pack-size", &pack_size_limit,
5060 N_("maximum size of each output pack file")),
5061 OPT_BOOL(0, "local", &local,
5062 N_("ignore borrowed objects from alternate object store")),
5063 OPT_BOOL(0, "incremental", &incremental,
5064 N_("ignore packed objects")),
5065 OPT_INTEGER(0, "window", &window,
5066 N_("limit pack window by objects")),
5067 OPT_UNSIGNED(0, "window-memory", &window_memory_limit,
5068 N_("limit pack window by memory in addition to object limit")),
5069 OPT_INTEGER(0, "depth", &depth,
5070 N_("maximum length of delta chain allowed in the resulting pack")),
5071 OPT_BOOL(0, "reuse-delta", &reuse_delta,
5072 N_("reuse existing deltas")),
5073 OPT_BOOL(0, "reuse-object", &reuse_object,
5074 N_("reuse existing objects")),
5075 OPT_BOOL(0, "delta-base-offset", &allow_ofs_delta,
5076 N_("use OFS_DELTA objects")),
5077 OPT_INTEGER(0, "threads", &delta_search_threads,
5078 N_("use threads when searching for best delta matches")),
5079 OPT_BOOL(0, "non-empty", &non_empty,
5080 N_("do not create an empty pack output")),
5081 OPT_BOOL(0, "revs", &use_internal_rev_list,
5082 N_("read revision arguments from standard input")),
5083 OPT_SET_INT_F(0, "unpacked", &rev_list_unpacked,
5084 N_("limit the objects to those that are not yet packed"),
5085 1, PARSE_OPT_NONEG),
5086 OPT_SET_INT_F(0, "all", &rev_list_all,

Callers

nothing calls this directly

Calls 15

disable_replace_refsFunction · 0.85
git_env_boolFunction · 0.85
prepare_repo_settingsFunction · 0.85
reset_pack_idx_optionFunction · 0.85
parse_optionsFunction · 0.85
usage_with_optionsFunction · 0.85
warningFunction · 0.85
strvec_pushFunction · 0.85
online_cpusFunction · 0.85

Tested by

no test coverage detected