MCPcopy Create free account
hub / github.com/ClickHouse/ClickHouse / Options

Class Options

programs/git-import/git-import.cpp:545–583  ·  view source on GitHub ↗

See description in "main". */

Source from the content-addressed store, hash-verified

543/** See description in "main".
544 */
545struct Options
546{
547 bool skip_commits_without_parents = true;
548 bool skip_commits_with_duplicate_diffs = true;
549 size_t threads = 1;
550 std::optional<re2::RE2> skip_paths;
551 std::optional<re2::RE2> skip_commits_with_messages;
552 std::unordered_set<std::string> skip_commits;
553 std::optional<size_t> diff_size_limit;
554 std::string stop_after_commit;
555
556 explicit Options(const po::variables_map & options)
557 {
558 skip_commits_without_parents = options["skip-commits-without-parents"].as<bool>();
559 skip_commits_with_duplicate_diffs = options["skip-commits-with-duplicate-diffs"].as<bool>();
560 threads = options["threads"].as<size_t>();
561 if (options.contains("skip-paths"))
562 {
563 skip_paths.emplace(options["skip-paths"].as<std::string>());
564 }
565 if (options.contains("skip-commits-with-messages"))
566 {
567 skip_commits_with_messages.emplace(options["skip-commits-with-messages"].as<std::string>());
568 }
569 if (options.contains("skip-commit"))
570 {
571 auto vec = options["skip-commit"].as<std::vector<std::string>>();
572 skip_commits.insert(vec.begin(), vec.end());
573 }
574 if (options.contains("diff-size-limit"))
575 {
576 diff_size_limit = options["diff-size-limit"].as<size_t>();
577 }
578 if (options.contains("stop-after-commit"))
579 {
580 stop_after_commit = options["stop-after-commit"].as<std::string>();
581 }
582 }
583};
584
585
586/** Rough snapshot of repository calculated by application of diffs. It's used to calculate blame info.

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected