scanForReferences: Remove misleading comment

References have always been determined only by the hash part, not the
name or the store prefix.

Fixes #4396.
This commit is contained in:
Eelco Dolstra 2020-12-28 17:21:19 +01:00
parent 5ef7e63ac6
commit 6262a70363
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE

View file

@ -88,9 +88,6 @@ PathSet scanForReferences(Sink & toTee,
TeeSink sink { refsSink, toTee };
std::map<string, Path> backMap;
/* For efficiency (and a higher hit rate), just search for the
hash part of the file name. (This assumes that all references
have the form `HASH-bla'). */
for (auto & i : refs) {
auto baseName = std::string(baseNameOf(i));
string::size_type pos = baseName.find('-');