From c5ca73706277486ed59e4581bfa42cc127726b38 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Mon, 7 Jun 2021 23:10:25 +0200 Subject: Git 2.21 compatiblity (#3669) #fix https://github.com/FreshRSS/FreshRSS/issues/3665 `git branch --show-current` requires git 2.22+ https://stackoverflow.com/questions/1417957/show-just-the-current-branch-in-git --- app/Controllers/updateController.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'app/Controllers/updateController.php') diff --git a/app/Controllers/updateController.php b/app/Controllers/updateController.php index 6f947d0c6..862fb0cf9 100644 --- a/app/Controllers/updateController.php +++ b/app/Controllers/updateController.php @@ -16,7 +16,8 @@ class FreshRSS_update_Controller extends Minz_ActionController { throw new Exception($errorMessage); } - exec('git branch --show-current', $output, $return); + //Note `git branch --show-current` requires git 2.22+ + exec('git symbolic-ref --short HEAD', $output, $return); if ($return != 0) { throw new Exception($errorMessage); } -- cgit v1.2.3