fixup! If path no longer have SCM info, include it in change set

The iterator checks were wrong.
This commit is contained in:
Allan Odgaard
2012-09-03 12:06:41 +02:00
parent 2b3e0bd7dc
commit 460185724d

View File

@@ -162,16 +162,16 @@ namespace scm
auto oldStatusIter = oldStatus.begin();
auto newStatusIter = newStatus.begin();
while(oldStatusIter != oldStatus.end() && newStatusIter != newStatus.end())
while(oldStatusIter != oldStatus.end() || newStatusIter != newStatus.end())
{
if(newStatusIter == newStatus.end() || oldStatusIter->first < newStatusIter->first)
if(newStatusIter == newStatus.end() || oldStatusIter != oldStatus.end() && oldStatusIter->first < newStatusIter->first)
{
changedPaths.insert(oldStatusIter->first);
++oldStatusIter;
continue;
}
if(oldStatusIter == oldStatus.end() || newStatusIter->first < oldStatusIter->first)
if(oldStatusIter == oldStatus.end() || newStatusIter != newStatus.end() && newStatusIter->first < oldStatusIter->first)
{
changedPaths.insert(newStatusIter->first);
++newStatusIter;