@@ -496,13 +496,16 @@ void FastImportRepository::reloadBranches()
496496 if (!branchRef.startsWith (" refs/" ))
497497 branchRef.prepend (" refs/heads/" );
498498
499+ startFastImport ();
499500 fastImport.write (" reset " + branchRef +
500501 " \n from :" + QByteArray::number (br.marks .last ()) + " \n\n "
501502 " progress Branch " + branchRef + " reloaded\n " );
502503 }
503504
504505 if (reset_notes &&
505506 CommandLineParser::instance ()->contains (" add-metadata-notes" )) {
507+
508+ startFastImport ();
506509 fastImport.write (" reset refs/notes/commits\n from :" +
507510 QByteArray::number (maxMark + 1 ) +
508511 " \n " );
@@ -903,8 +906,9 @@ QIODevice *FastImportRepository::Transaction::addFile(const QString &path, int m
903906 modifiedFiles.append (repository->prefix + path.toUtf8 ());
904907 modifiedFiles.append (" \n " );
905908
909+ // it is returned for being written to, so start the process in any case
910+ repository->startFastImport ();
906911 if (!CommandLineParser::instance ()->contains (" dry-run" )) {
907- repository->startFastImport ();
908912 repository->fastImport .writeNoLog (" blob\n mark :" );
909913 repository->fastImport .writeNoLog (QByteArray::number (mark));
910914 repository->fastImport .writeNoLog (" \n data " );
@@ -941,6 +945,7 @@ void FastImportRepository::Transaction::commitNote(const QByteArray ¬eText, b
941945 s.append (" N inline " + commitRef + " \n " );
942946 s.append (" data " + QString::number (text.length ()) + " \n " );
943947 s.append (text + " \n " );
948+ repository->startFastImport ();
944949 repository->fastImport .write (s);
945950
946951 if (commit.isNull ()) {
0 commit comments