forked from qt-creator/qt-creator
Git: Fix parsing of "already merged" files in merge tool
If you have several files that require merging, and you externally resolve (and git add) some of them, the following message appears: foo.cpp: file does not need merging Continue merging other unresolved paths [y/n]? We don't identify the first line, so the second one is lost too. Change-Id: I54c579910656c07be7e6b3236551257443fe8fb9 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
committed by
Orgad Shaneh
parent
86f32f5b9c
commit
71c2352e4b
@@ -212,6 +212,7 @@ void MergeTool::readData()
|
||||
m_mergeType = mergeType(m_line.left(index));
|
||||
int quote = m_line.indexOf('\'');
|
||||
m_fileName = QString::fromLocal8Bit(m_line.mid(quote + 1, m_line.lastIndexOf('\'') - quote - 1));
|
||||
m_line.clear();
|
||||
} else if (m_line.startsWith(" {local}")) {
|
||||
waitForFurtherInput = !hasLine;
|
||||
if (waitForFurtherInput)
|
||||
@@ -229,7 +230,11 @@ void MergeTool::readData()
|
||||
prompt(tr("Unchanged File"), tr("Was the merge successful?"));
|
||||
} else if (m_line.startsWith("Continue merging")) {
|
||||
prompt(tr("Continue Merging"), tr("Continue merging other unresolved paths?"));
|
||||
} else if (m_line.endsWith('\n')) {
|
||||
// Skip unidentified lines
|
||||
m_line.clear();
|
||||
}
|
||||
|
||||
}
|
||||
if (!waitForFurtherInput)
|
||||
m_line.clear();
|
||||
|
Reference in New Issue
Block a user