From e505f990decc1915490573ed950d33b6af3fa8dc Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Mon, 4 Nov 2019 18:05:20 +0100 Subject: [PATCH] Better git fetch (#2626) Related to https://github.com/FreshRSS/FreshRSS/pull/2625 If for some reasons branches have diverged:, e.g.: ``` $ git status -sb --porcelain remote ## dev...origin/dev [ahead 4, behind 1] ``` --- app/Controllers/updateController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Controllers/updateController.php b/app/Controllers/updateController.php index cc3aef9fd9c5..c0c1ef1c8e3d 100644 --- a/app/Controllers/updateController.php +++ b/app/Controllers/updateController.php @@ -23,7 +23,7 @@ public static function hasGitUpdate() { } chdir($cwd); $line = is_array($output) ? implode('; ', $output) : '' . $output; - return strpos($line, '[behind') !== false; + return strpos($line, '[behind') !== false || strpos($line, '[ahead') !== false; } public static function gitPull() {