summaryrefslogtreecommitdiff
path: root/src/buildtool/main/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/buildtool/main/main.cpp')
-rw-r--r--src/buildtool/main/main.cpp36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/buildtool/main/main.cpp b/src/buildtool/main/main.cpp
index 79c7c0cb..2bfe631b 100644
--- a/src/buildtool/main/main.cpp
+++ b/src/buildtool/main/main.cpp
@@ -664,6 +664,42 @@ auto ParseRoot(std::string const& repo,
root[1]);
std::exit(kExitFailure);
}
+ if (root[0] == FileRoot::kFileIgnoreSpecialMarker) {
+ if (root.size() != 2 or (not root[1].is_string())) {
+ Logger::Log(
+ LogLevel::Error,
+ "\"file ignore-special\" scheme expects precisely one string "
+ "argument, but found {} for {} of repository {}",
+ root.dump(),
+ keyword,
+ repo);
+ std::exit(kExitFailure);
+ }
+ auto path = std::filesystem::path{root[1]};
+ return {FileRoot{path, /*ignore_special=*/true}, std::move(path)};
+ }
+ if (root[0] == FileRoot::kGitTreeIgnoreSpecialMarker) {
+ if (root.size() != 3 or (not root[1].is_string()) or
+ (not root[2].is_string())) {
+ Logger::Log(LogLevel::Error,
+ "\"git tree ignore-special\" scheme expects two string "
+ "arguments, but found {} for {} of repository {}",
+ root.dump(),
+ keyword,
+ repo);
+ std::exit(kExitFailure);
+ }
+ if (auto git_root =
+ FileRoot::FromGit(root[2], root[1], /*ignore_special=*/true)) {
+ return {std::move(*git_root), std::nullopt};
+ }
+ Logger::Log(LogLevel::Error,
+ "Could not create file root for git repository {} and tree "
+ "id {}",
+ root[2],
+ root[1]);
+ std::exit(kExitFailure);
+ }
Logger::Log(LogLevel::Error,
"Unknown scheme in the specification {} of {} of repository {}",
root.dump(),