]> andersk Git - svn-all-fast-export.git/commitdiff
Don't crash when running in dry-mode
authorThiago Macieira <thiago@cassini.local.lan>
Tue, 25 Dec 2007 22:39:25 +0000 (20:39 -0200)
committerThiago Macieira <thiago@cassini.local.lan>
Tue, 25 Dec 2007 22:39:25 +0000 (20:39 -0200)
src/repository.cpp
src/repository.h

index 1cb7c410a0370f38f4b76b51f94829fc4c1230b0..bec114b4553c9fea8842e85bc7cf3682ad7a544c 100644 (file)
@@ -201,7 +201,11 @@ void Repository::Transaction::commit()
         s << "committer " << author << ' ' << datetime << " -0000" << endl;
 
         Branch &br = repository->branches[branch];
-        Q_ASSERT(br.created);
+        if (!br.created) {
+            qWarning() << "Branch" << branch << "doesn't exist at revision"
+                       << revnum << "-- did you resume from the wrong revision?";
+            br.created = revnum;
+        }
 
         s << "data " << message.length() << endl;
     }
index edd04b72d08e901314cafd2c51bd78102675282b..171b3b7dd96bd7e51c23ecb3d03b513dd0531853 100644 (file)
@@ -70,7 +70,7 @@ public:
 private:
     struct Branch
     {
-        uint created;
+        int created;
     };
 
     QHash<QString, Branch> branches;
This page took 0.03345 seconds and 5 git commands to generate.