@@ -334,39 +334,39 @@ std::pair<bool, QString> GitUIProxy::removeSubmodule(const QString& MainPathStr
334
334
StandardOutput += " Git manual removal of module failed\n " ;
335
335
}
336
336
337
- // 3. remove .gitmodules if empty
338
- openfluid::tools::FilesystemPath SubmoduleFile ({MainPathString.toStdString (), " .gitmodules" });
339
- if (SubmoduleFile.isFile ())
340
- {
341
- std::ifstream SubmoduleFileStream;
342
- SubmoduleFileStream.open (SubmoduleFile.toGeneric (), std::ifstream::in);
343
- if (SubmoduleFileStream.peek () == std::ifstream::traits_type::eof ())
344
- {
345
- SubmoduleFileStream.close ();
346
- // file empty, can be removed
347
- QProcess* Process = new QProcess ();
348
- Process->setWorkingDirectory (MainPathString);
349
-
350
- Process->start (QString::fromStdString (m_LocalGitProgram),{" rm" , " --cached" , " .gitmodules" });
351
- Process->waitForReadyRead (-1 );
352
- Process->waitForFinished (-1 );
353
- int ErrCode = Process->exitCode ();
354
- if (ErrCode != 0 )
355
- {
356
- SummaryStatusCode = 1 ;
357
- StandardOutput += tr (" Git rm command for .gitmodules failed with error code %1\n " ).arg (ErrCode);
358
- }
359
- delete Process;
360
- Process = nullptr ;
361
- std::error_code TmpErr;
362
- if (!SubmoduleFile.removeFile (" " , TmpErr))
363
- {
364
- SummaryStatusCode = 1 ;
365
- StandardOutput += tr (" Submodule file removal failed\n " );
366
- openfluid::utils::log::error (" Git" , " Submodule file removal failed: " +TmpErr.message ());
367
- }
368
- }
369
- }
337
+ // 3. remove .gitmodules if empty (disabled since may not be relevant)
338
+ // openfluid::tools::FilesystemPath SubmoduleFile({MainPathString.toStdString(), ".gitmodules"});
339
+ // if (SubmoduleFile.isFile())
340
+ // {
341
+ // std::ifstream SubmoduleFileStream;
342
+ // SubmoduleFileStream.open(SubmoduleFile.toGeneric(), std::ifstream::in);
343
+ // if (SubmoduleFileStream.peek() == std::ifstream::traits_type::eof())
344
+ // {
345
+ // SubmoduleFileStream.close();
346
+ // // file empty, can be removed
347
+ // QProcess* Process = new QProcess();
348
+ // Process->setWorkingDirectory(MainPathString);
349
+
350
+ // Process->start(QString::fromStdString(m_LocalGitProgram),{"rm", "--cached", ".gitmodules"});
351
+ // Process->waitForReadyRead(-1);
352
+ // Process->waitForFinished(-1);
353
+ // int ErrCode = Process->exitCode();
354
+ // if (ErrCode != 0)
355
+ // {
356
+ // SummaryStatusCode = 1;
357
+ // StandardOutput += tr("Git rm command for .gitmodules failed with error code %1\n").arg(ErrCode);
358
+ // }
359
+ // delete Process;
360
+ // Process = nullptr;
361
+ // std::error_code TmpErr;
362
+ // if (!SubmoduleFile.removeFile("", TmpErr))
363
+ // {
364
+ // SummaryStatusCode = 1;
365
+ // StandardOutput += tr("Submodule file removal failed\n");
366
+ // openfluid::utils::log::error("Git", "Submodule file removal failed: "+TmpErr.message());
367
+ // }
368
+ // }
369
+ // }
370
370
371
371
StatusTxt = StatusTxt + " \n " + RmReturn.second ;
372
372
if (SummaryStatusCode == 0 )
0 commit comments