Immensely speed up 'vng changes'
authorThomas Zander <thomas.zander@trolltech.com>
Thu, 30 Jul 2009 19:14:05 +0000 (30 22:14 +0300)
committerThomas Zander <thomas.zander@trolltech.com>
Thu, 30 Jul 2009 19:14:05 +0000 (30 22:14 +0300)
When we are sure we have the correct treeism, set it.  This
saves us an extra show-ref later.

src/patches/Commit.cpp

index d590d24..7935c58 100644 (file)
@@ -296,8 +296,10 @@ Commit Commit::createFromStream(QIODevice *device, CommitPrivate *priv)
                 state = Comment;
                 continue;
             }
-            else if (line.startsWith("commit "))
+            else if (line.startsWith("commit ")) {
                 priv->treeIsm = line.mid(7).trimmed();
+                priv->resolvedTreeIsm = priv->treeIsm;
+            }
             else if (line.startsWith("parent "))
                 priv->parentTreeisms.append(line.mid(7).trimmed());
             else if (line.startsWith("author "))