aboutsummaryrefslogtreecommitdiffstats
path: root/src/ruleparser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ruleparser.cpp')
-rw-r--r--src/ruleparser.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/ruleparser.cpp b/src/ruleparser.cpp
index c9279ac..7ae9570 100644
--- a/src/ruleparser.cpp
+++ b/src/ruleparser.cpp
@@ -55,7 +55,7 @@ void Rules::load()
QRegExp matchBranchLine("branch\\s+(\\S+)", Qt::CaseInsensitive);
QRegExp matchRevLine("(min|max) revision (\\d+)", Qt::CaseInsensitive);
QRegExp matchAnnotateLine("annotated\\s+(\\S+)", Qt::CaseInsensitive);
- QRegExp matchRootDirLine("rootdir\\s+(\\S+)", Qt::CaseInsensitive);
+ QRegExp matchPrefixLine("prefix\\s+(\\S+)", Qt::CaseInsensitive);
QTextStream s(&file);
enum { ReadingNone, ReadingRepository, ReadingMatch } state = ReadingNone;
@@ -99,8 +99,10 @@ void Rules::load()
else // must be max
match.maxRevision = matchRevLine.cap(2).toInt();
continue;
- } else if (matchRootDirLine.exactMatch(line)) {
- match.rootdir = QRegExp(matchRootDirLine.cap(1), Qt::CaseSensitive, QRegExp::RegExp2);
+ } else if (matchPrefixLine.exactMatch(line)) {
+ match.prefix = matchPrefixLine.cap(1);
+ if( match.prefix.startsWith('/'))
+ qFatal("Prefix starts with \"/\" on line %d, this can cause git-fast-import to crach.", lineNumber );
continue;
} else if (matchActionLine.exactMatch(line)) {
QString action = matchActionLine.cap(1);