diff options
Diffstat (limited to 'src/buildtool/file_system/git_repo.cpp')
-rw-r--r-- | src/buildtool/file_system/git_repo.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/buildtool/file_system/git_repo.cpp b/src/buildtool/file_system/git_repo.cpp index e7db261a..0aba51a2 100644 --- a/src/buildtool/file_system/git_repo.cpp +++ b/src/buildtool/file_system/git_repo.cpp @@ -23,6 +23,7 @@ extern "C" { #include <git2/sys/odb_backend.h> } +#ifndef BOOTSTRAP_BUILD_TOOL namespace { constexpr std::size_t kWaitTime{2}; // time in ms between tries for git locks @@ -273,13 +274,9 @@ void backend_free(git_odb_backend* /*_backend*/) {} return b; } -#ifndef BOOTSTRAP_BUILD_TOOL - // A backend that can be used to read and create tree objects in-memory. auto const kInMemoryODBParent = CreateInMemoryODBParent(); -#endif // BOOTSTRAP_BUILD_TOOL - struct FetchIntoODBBackend { git_odb_backend parent; git_odb* target_odb; // the odb where the fetch objects will end up into @@ -319,13 +316,9 @@ void fetch_backend_free(git_odb_backend* /*_backend*/) {} return b; } -#ifndef BOOTSTRAP_BUILD_TOOL - // A backend that can be used to fetch from the remote of another repository. auto const kFetchIntoODBParent = CreateFetchIntoODBParent(); -#endif // BOOTSTRAP_BUILD_TOOL - // callback to enable SSL certificate check for remote fetch const auto certificate_check_cb = [](git_cert* /*cert*/, int /*valid*/, @@ -369,6 +362,7 @@ const auto certificate_passthrough_cb = [](git_cert* /*cert*/, } } // namespace +#endif // BOOTSTRAP_BUILD_TOOL auto GitRepo::Open(GitCASPtr git_cas) noexcept -> std::optional<GitRepo> { #ifdef BOOTSTRAP_BUILD_TOOL |