Fix the project version check not trusting the user's repo for some git versions
Some checks are pending
Build Porymap / build-linux (5.14.2) (push) Waiting to run
Build Porymap / build-linux (6.8.2) (push) Waiting to run
Build Porymap / build-macos (macos-15-intel) (push) Waiting to run
Build Porymap / build-macos (macos-latest) (push) Waiting to run
Build Porymap / build-static-windows (push) Waiting to run

This commit is contained in:
GriffinR 2025-11-21 18:00:33 -05:00
parent 5f6246b394
commit 97bf444b64
2 changed files with 3 additions and 3 deletions

View File

@ -24,6 +24,7 @@ and this project somewhat adheres to [Semantic Versioning](https://semver.org/sp
- Fix some `INCBIN` statements not being parsed correctly.
- Fix excessive logging if Porymap fails to monitor all map files.
- Fix map connections getting cut off in exported map images if they're on the same side as another short map connection.
- Fix the project version check failing for some versions of `git`.
## [6.2.0] - 2025-08-08
### Added

View File

@ -95,8 +95,7 @@ int Project::getSupportedMajorVersion(QString *errorOut) {
// First we need to know which (if any) known history this project belongs to.
// We'll get the root commit, then compare it to the known root commits for the base project repos.
static const QStringList args_getRootCommit = { "rev-list", "--max-parents=0", "HEAD" };
process.setArguments(args_getRootCommit);
process.setArguments({ "-c", QString("safe.directory=%1").arg(this->root), "rev-list", "--max-parents=0", "HEAD" });
process.start();
if (!process.waitForFinished(timeoutLimit) || process.exitStatus() != QProcess::ExitStatus::NormalExit || process.exitCode() != 0) {
if (errorOut) {
@ -158,7 +157,7 @@ int Project::getSupportedMajorVersion(QString *errorOut) {
// An empty commit hash means 'consider any point in the history a supported version'
return versionNum;
}
process.setArguments({ "merge-base", "--is-ancestor", commitHash, "HEAD" });
process.setArguments({ "-c", QString("safe.directory=%1").arg(this->root), "merge-base", "--is-ancestor", commitHash, "HEAD" });
process.start();
if (!process.waitForFinished(timeoutLimit) || process.exitStatus() != QProcess::ExitStatus::NormalExit) {
if (errorOut) {