From 4368bf026fa7d18d2c01ac18cdb3e9ff6a228221 Mon Sep 17 00:00:00 2001 From: Maksim Denisov Date: Mon, 8 Jul 2024 15:07:24 +0200 Subject: Use a fixed HashFunction for reading trees --- src/buildtool/execution_api/local/local_cas_reader.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/buildtool/execution_api/local/local_cas_reader.cpp') diff --git a/src/buildtool/execution_api/local/local_cas_reader.cpp b/src/buildtool/execution_api/local/local_cas_reader.cpp index 504b4c74..397c02ad 100644 --- a/src/buildtool/execution_api/local/local_cas_reader.cpp +++ b/src/buildtool/execution_api/local/local_cas_reader.cpp @@ -58,9 +58,12 @@ auto LocalCasReader::ReadGitTree(ArtifactDigest const& digest) const noexcept } return true; }; + + // Git-SHA1 hashing is used for reading from git. + HashFunction const hash_function{HashFunction::JustHash::Native}; return GitRepo::ReadTreeData( *content, - HashFunction::Instance().ComputeTreeHash(*content).Bytes(), + hash_function.ComputeTreeHash(*content).Bytes(), check_symlinks, /*is_hex_id=*/false); } -- cgit v1.2.3