MCPcopy Create free account
hub / github.com/git/git / cmd_fast_export

Function cmd_fast_export

builtin/fast-export.c:1310–1441  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1308}
1309
1310int cmd_fast_export(int argc,
1311 const char **argv,
1312 const char *prefix,
1313 struct repository *repo UNUSED)
1314{
1315 struct rev_info revs;
1316 struct commit *commit;
1317 char *export_filename = NULL,
1318 *import_filename = NULL,
1319 *import_filename_if_exists = NULL;
1320 uint32_t lastimportid;
1321 struct string_list refspecs_list = STRING_LIST_INIT_NODUP;
1322 struct string_list paths_of_changed_objects = STRING_LIST_INIT_DUP;
1323 struct option options[] = {
1324 OPT_INTEGER(0, "progress", &progress,
1325 N_("show progress after <n> objects")),
1326 OPT_CALLBACK(0, "signed-tags", &signed_tag_mode, N_("mode"),
1327 N_("select handling of signed tags"),
1328 parse_opt_sign_mode),
1329 OPT_CALLBACK(0, "signed-commits", &signed_commit_mode, N_("mode"),
1330 N_("select handling of signed commits"),
1331 parse_opt_sign_mode),
1332 OPT_CALLBACK(0, "tag-of-filtered-object", &tag_of_filtered_mode, N_("mode"),
1333 N_("select handling of tags that tag filtered objects"),
1334 parse_opt_tag_of_filtered_mode),
1335 OPT_CALLBACK(0, "reencode", &reencode_mode, N_("mode"),
1336 N_("select handling of commit messages in an alternate encoding"),
1337 parse_opt_reencode_mode),
1338 OPT_STRING(0, "export-marks", &export_filename, N_("file"),
1339 N_("dump marks to this file")),
1340 OPT_STRING(0, "import-marks", &import_filename, N_("file"),
1341 N_("import marks from this file")),
1342 OPT_STRING(0, "import-marks-if-exists",
1343 &import_filename_if_exists,
1344 N_("file"),
1345 N_("import marks from this file if it exists")),
1346 OPT_BOOL(0, "fake-missing-tagger", &fake_missing_tagger,
1347 N_("fake a tagger when tags lack one")),
1348 OPT_BOOL(0, "full-tree", &full_tree,
1349 N_("output full tree for each commit")),
1350 OPT_BOOL(0, "use-done-feature", &use_done_feature,
1351 N_("use the done feature to terminate the stream")),
1352 OPT_BOOL(0, "no-data", &no_data, N_("skip output of blob data")),
1353 OPT_STRING_LIST(0, "refspec", &refspecs_list, N_("refspec"),
1354 N_("apply refspec to exported refs")),
1355 OPT_BOOL(0, "anonymize", &anonymize, N_("anonymize output")),
1356 OPT_CALLBACK_F(0, "anonymize-map", &anonymized_seeds, N_("from:to"),
1357 N_("convert <from> to <to> in anonymized output"),
1358 PARSE_OPT_NONEG, parse_opt_anonymize_map),
1359 OPT_BOOL(0, "reference-excluded-parents",
1360 &reference_excluded_commits, N_("reference parents which are not in fast-export stream by object id")),
1361 OPT_BOOL(0, "show-original-ids", &show_original_ids,
1362 N_("show original object ids of blobs/commits")),
1363 OPT_BOOL(0, "mark-tags", &mark_tags,
1364 N_("label tags with mark ids")),
1365
1366 OPT_END()
1367 };

Callers

nothing calls this directly

Calls 15

usage_with_optionsFunction · 0.85
repo_init_revisionsFunction · 0.85
parse_optionsFunction · 0.85
setup_revisionsFunction · 0.85
refspec_appendFunction · 0.85
string_list_clearFunction · 0.85
import_marksFunction · 0.85
get_tags_and_duplicatesFunction · 0.85
prepare_revision_walkFunction · 0.85
get_revisionFunction · 0.85
handle_deletesFunction · 0.85

Tested by

no test coverage detected