diff options
author | Maksim Denisov <denisov.maksim@huawei.com> | 2024-07-12 14:25:10 +0200 |
---|---|---|
committer | Maksim Denisov <denisov.maksim@huawei.com> | 2024-07-22 17:01:13 +0200 |
commit | a57bcd17abee9c9f60653f27d26a46b99f46df8b (patch) | |
tree | d40717b962bdaaf47a8b2027124f4b814179ca4c /src | |
parent | b9e70662dfba7a9b5a674a6ad3c5194e2aec3a09 (diff) | |
download | justbuild-a57bcd17abee9c9f60653f27d26a46b99f46df8b.tar.gz |
Use a fixed HashFunction in Tree
Diffstat (limited to 'src')
-rw-r--r-- | src/buildtool/common/tree.hpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/buildtool/common/tree.hpp b/src/buildtool/common/tree.hpp index 06c2e7d5..2f33bfe0 100644 --- a/src/buildtool/common/tree.hpp +++ b/src/buildtool/common/tree.hpp @@ -85,8 +85,10 @@ class Tree { } static auto ComputeId(inputs_t const& inputs) -> std::string { - return HashFunction::Instance() - .ComputeHash(ComputeDescription(inputs).dump()) + // The type of HashFunction is irrelevant here. It is used for + // identification of trees. SHA256 is used. + HashFunction const hash_function{HashFunction::JustHash::Compatible}; + return hash_function.ComputeHash(ComputeDescription(inputs).dump()) .HexString(); } }; |