Commit 71c2352e authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Orgad Shaneh

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's avatarTobias Hunger <tobias.hunger@qt.io>
parent 86f32f5b
......@@ -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();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment