From e4fae68f0e00381048c91bef95861df59ef62000 Mon Sep 17 00:00:00 2001 From: Andras Bacsai <5845193+andrasbacsai@users.noreply.github.com> Date: Tue, 3 Mar 2026 08:54:58 +0100 Subject: [PATCH] docs(application): add comments explaining commit selection logic for rollback support Add clarifying comments to the setGitImportSettings method explaining how the commit selection works, including the fallback to git_commit_sha and that invalid refs will cause failures on the remote server. This documents the behavior introduced for proper rollback commit handling. Also remove an extra blank line for minor code cleanup. --- app/Models/Application.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Models/Application.php b/app/Models/Application.php index b4272b3c7..a4f51780e 100644 --- a/app/Models/Application.php +++ b/app/Models/Application.php @@ -1093,6 +1093,8 @@ public function setGitImportSettings(string $deployment_uuid, string $git_clone_ $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 @@ public function parseHealthcheckFromDockerfile($dockerfile, bool $isInit = false } } - public function getLimits(): array { return [