]> andersk Git - svn-all-fast-export.git/blobdiff - src/repository.cpp
Fail if writing to the process fails
[svn-all-fast-export.git] / src / repository.cpp
index 63252b589fe576b7c38eb5f6d95852776e2582ca..18d145a6b0899f14f7f7044fb7c77da539a605de 100644 (file)
@@ -184,7 +184,6 @@ QIODevice *Repository::Transaction::addFile(const QString &path, int mode, qint6
     repository->fastImport.write("\ndata ");
     repository->fastImport.write(QByteArray::number(length));
     repository->fastImport.write("\n", 1);
-    repository->fastImport.waitForBytesWritten(0);
 #endif
 
     modifiedFiles.insert(path, fp);
@@ -243,7 +242,7 @@ void Repository::Transaction::commit()
 
     repository->fastImport.write("\n");
 
-    while (repository->fastImport.bytesToWrite() && repository->fastImport.waitForBytesWritten()) {
-        // nothing
-    }
+    while (repository->fastImport.bytesToWrite())
+        if (!repository->fastImport.waitForBytesWritten())
+            qFatal("Failed to write to process: %s", qPrintable(repository->fastImport.errorString()));
 }
This page took 0.025354 seconds and 4 git commands to generate.