forked from lix-project/lix
Don't partial match sourcehut refs
This commit is contained in:
parent
345a8ee0cb
commit
9720797f69
|
@ -399,7 +399,9 @@ struct SourceHutInputScheme : GitArchiveInputScheme
|
||||||
std::string line;
|
std::string line;
|
||||||
std::string id;
|
std::string id;
|
||||||
while(getline(is, line)) {
|
while(getline(is, line)) {
|
||||||
std::regex pattern(ref_uri);
|
// Append $ to avoid partial name matches
|
||||||
|
std::regex pattern(fmt("%s$", ref_uri));
|
||||||
|
|
||||||
if (std::regex_search(line, pattern)) {
|
if (std::regex_search(line, pattern)) {
|
||||||
id = line.substr(0, line.find('\t'));
|
id = line.substr(0, line.find('\t'));
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue