From add9aaf41b158d65dc7a5d51771392918eff5b87 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Sun, 23 Dec 2007 20:07:44 -0200 Subject: [PATCH] Parse rules correctly --- src/ruleparser.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/ruleparser.cpp b/src/ruleparser.cpp index ea67865..f116ce4 100644 --- a/src/ruleparser.cpp +++ b/src/ruleparser.cpp @@ -77,14 +77,19 @@ void Rules::load() branch.branchFrom = repoBranchLine.cap(1); repo.branches += branch; + continue; } } else if (state == ReadingMatch) { - if (matchRepoLine.exactMatch(line)) + if (matchRepoLine.exactMatch(line)) { match.repository = matchRepoLine.cap(0); - else if (matchBranchLine.exactMatch(line)) + continue; + } else if (matchBranchLine.exactMatch(line)) { match.branch = matchBranchLine.cap(0); - else if (matchPathLine.exactMatch(line)) + continue; + } else if (matchPathLine.exactMatch(line)) { match.path = matchPathLine.cap(0); + continue; + } } bool isRepositoryRule = repoLine.exactMatch(line); -- 2.45.0