forked from qt-creator/qt-creator
Git: Place conflicted files last in submit editor
Change-Id: Ie4c7423d85f3f568d04d6c86e8b8123c73dab5fb Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
@@ -108,6 +108,15 @@ static FileStates stateFor(const QChar &c)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool operator<(const CommitData::StateFilePair &a, const CommitData::StateFilePair &b)
|
||||||
|
{
|
||||||
|
if ((a.first & UnmergedFile) && !(b.first & UnmergedFile))
|
||||||
|
return false;
|
||||||
|
if ((b.first & UnmergedFile) && !(a.first & UnmergedFile))
|
||||||
|
return true;
|
||||||
|
return a.second < b.second;
|
||||||
|
}
|
||||||
|
|
||||||
bool CommitData::checkLine(const QString &stateInfo, const QString &file)
|
bool CommitData::checkLine(const QString &stateInfo, const QString &file)
|
||||||
{
|
{
|
||||||
QTC_ASSERT(stateInfo.count() == 2, return false);
|
QTC_ASSERT(stateInfo.count() == 2, return false);
|
||||||
@@ -147,6 +156,7 @@ bool CommitData::checkLine(const QString &stateInfo, const QString &file)
|
|||||||
files.append(qMakePair(yState, newFile));
|
files.append(qMakePair(yState, newFile));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
qSort(files);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -109,6 +109,8 @@ private:
|
|||||||
bool checkLine(const QString &stateInfo, const QString &file);
|
bool checkLine(const QString &stateInfo, const QString &file);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
bool operator<(const CommitData::StateFilePair &a, const CommitData::StateFilePair &b);
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
} // namespace Git
|
} // namespace Git
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user