aboutsummaryrefslogtreecommitdiff
path: root/src/libutil/hash.cc
diff options
context:
space:
mode:
authorKasper Gałkowski <kpg@posteo.net>2022-04-06 19:28:12 +0200
committerKasper Gałkowski <kpg@posteo.net>2022-04-07 19:49:47 +0200
commit2c2fd4946f96e6839ecbfb4cf61318d8910e7e8f (patch)
tree63d3aada6e7f9af6dcbd7d934904d9801465c240 /src/libutil/hash.cc
parentf01e33f283f4ff4e04ccdd4c3692c631cb7290b9 (diff)
don't assume that rev is a SHA1 hash
This was a problem when writing a fetcher that uses e.g. sha256 hashes for revisions. This doesn't actually do anything new, but allows for creating such fetchers in the future (perhaps when support for Git's SHA256 object format gains more popularity).
Diffstat (limited to 'src/libutil/hash.cc')
-rw-r--r--src/libutil/hash.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libutil/hash.cc b/src/libutil/hash.cc
index a4d632161..d2fd0c15a 100644
--- a/src/libutil/hash.cc
+++ b/src/libutil/hash.cc
@@ -155,7 +155,7 @@ static std::pair<std::optional<HashType>, bool> getParsedTypeAndSRI(std::string_
{
bool isSRI = false;
- // Parse the has type before the separater, if there was one.
+ // Parse the hash type before the separator, if there was one.
std::optional<HashType> optParsedType;
{
auto hashRaw = splitPrefixTo(rest, ':');