summaryrefslogtreecommitdiff
path: root/src/other_tools/root_maps/content_git_map.cpp
diff options
context:
space:
mode:
authorPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2023-08-14 10:00:29 +0200
committerPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2023-08-14 15:09:11 +0200
commit24ad2ce7d070ae684159b6445981017dd7a40f8a (patch)
tree4eeea470fda336146fdbb92b993a6b0da84d734c /src/other_tools/root_maps/content_git_map.cpp
parent26fe1ac82a8437b292e5c17e791c02d5a6813a26 (diff)
downloadjustbuild-24ad2ce7d070ae684159b6445981017dd7a40f8a.tar.gz
ArchiveOps: Add proper autodetection option for tarballs
We shouldn't exclude the possibility of receiving uncompressed tarballs as repositories in just-mr. Therefore, we introduce an explicit type that performs the autodetection (default behaviour in just-mr). This is done to also be more in line with our implementation which allows the granular handling of various archive types (currently used only for testing purposes).
Diffstat (limited to 'src/other_tools/root_maps/content_git_map.cpp')
-rw-r--r--src/other_tools/root_maps/content_git_map.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/other_tools/root_maps/content_git_map.cpp b/src/other_tools/root_maps/content_git_map.cpp
index 7f0b30e0..5fb1bd88 100644
--- a/src/other_tools/root_maps/content_git_map.cpp
+++ b/src/other_tools/root_maps/content_git_map.cpp
@@ -31,7 +31,8 @@ namespace {
std::filesystem::path const& dst_dir) noexcept
-> std::optional<std::string> {
if (repo_type == "archive") {
- return ArchiveOps::ExtractArchive(ArchiveType::Tar, archive, dst_dir);
+ return ArchiveOps::ExtractArchive(
+ ArchiveType::TarAuto, archive, dst_dir);
}
if (repo_type == "zip") {
return ArchiveOps::ExtractArchive(ArchiveType::Zip, archive, dst_dir);