From b9cafd7014304e83c4f23c14fc57a40079434a10 Mon Sep 17 00:00:00 2001 From: "florian.azizian" <florian.azizian@maarch.org> Date: Fri, 26 Mar 2021 18:50:39 +0100 Subject: [PATCH] FEAT #16564 TIME 0 Improve git commit --- src/core/controllers/AuthenticationController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/controllers/AuthenticationController.php b/src/core/controllers/AuthenticationController.php index fd2c637f35..ed8b9cff29 100755 --- a/src/core/controllers/AuthenticationController.php +++ b/src/core/controllers/AuthenticationController.php @@ -424,7 +424,7 @@ class AuthenticationController preg_match('#^ref:(.+)$#', $head, $matches); $currentHead = trim($matches[1]); - if (empty($currentHead)) { + if (empty($currentHead) || !is_file('.git/' . $currentHead)) { return $response->withJson(['hash' => null]); } -- GitLab