Skip to content

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

docs(application): add comments explaining commit selection logic for rollback support

Andras Bacsaie4fae68f0e00
diff --git a/app/Models/Application.php b/app/Models/Application.php
index b4272b3c73..a4f51780ed 100644
--- a/app/Models/Application.php
+++ b/app/Models/Application.php
@@ -1093,6 +1093,8 @@ class Application extends BaseModel
$escapedBaseDir = escapeshellarg($baseDir);
$isShallowCloneEnabled = $this->settings?->is_git_shallow_clone_enabled ?? false;
+ // Use the explicitly passed commit (e.g. from rollback), falling back to the application's git_commit_sha.
+ // Invalid refs will cause the git checkout/fetch command to fail on the remote server.
$commitToUse = $commit ?? $this->git_commit_sha;
if ($commitToUse !== 'HEAD') {
@@ -1964,7 +1966,6 @@ class Application extends BaseModel
}
}
-
public function getLimits(): array
{
return [