Update app/Jobs/ApplicationDeploymentJob.php

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
This commit is contained in:
Andras Bacsai 2025-10-14 15:21:38 +02:00 committed by GitHub
parent bf00405971
commit 893093fad3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1905,7 +1905,7 @@ private function check_git_if_build_needed()
$output = $lsRemoteOutput->value();
// Extract the line with the tab (actual ls-remote result)
preg_match('/([0-9a-f]{40})\s*\t/', $output, $matches);
preg_match('/\b([0-9a-fA-F]{40})(?=\s*\t)/', $output, $matches);
if (isset($matches[1])) {
$this->commit = $matches[1];