]> andersk Git - svn-all-fast-export.git/blobdiff - src/repository.cpp
Add a --no-metadata option to suppress the svn info in commit messages.
[svn-all-fast-export.git] / src / repository.cpp
index 512a7454fa3ca5c99913bab30162a20bdec92dff..9c2a9d5421964cd2261a0f75c2ebedf9ae91d369 100644 (file)
@@ -16,6 +16,7 @@
  */
 
 #include "repository.h"
+#include "options.h"
 #include <QTextStream>
 #include <QDebug>
 #include <QLinkedList>
@@ -159,7 +160,7 @@ Repository::Transaction *Repository::newTransaction(const QString &branch, const
     if ((++commitCount % 10000) == 0)
         // write everything to disk every 10000 commits
         fastImport.write("checkpoint\n");
-    if (++outstandingTransactions == 0)
+    if (outstandingTransactions++ == 0)
         lastmark = 1;           // reset the mark number
     return txn;
 }
@@ -246,7 +247,8 @@ void Repository::Transaction::commit()
     QByteArray message = log;
     if (!message.endsWith('\n'))
         message += '\n';
-    message += "\nsvn path=" + svnprefix + "; revision=" + QByteArray::number(revnum) + "\n";
+    if (Options::globalOptions->switches.value("metadata", true))
+        message += "\nsvn path=" + svnprefix + "; revision=" + QByteArray::number(revnum) + "\n";
 
     {
         QByteArray branchRef = branch;
This page took 0.026861 seconds and 4 git commands to generate.