Procházet zdrojové kódy

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
Alexandre Alapetite před 5 roky
rodič
revize
c5ca737062
1 změnil soubory, kde provedl 2 přidání a 1 odebrání
  1. 2 1
      app/Controllers/updateController.php

+ 2 - 1
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);
 		}