3declare(strict_types=1);
 
   32    private static function detect(): void
 
   38        if (
null !== self::$revision_information) {
 
   51            if (!empty($origin[0])) {
 
   55            if (!empty($branch[0])) {
 
   59            if (!empty($version_number[0])) {
 
   60                $version_number = $version_number[0];
 
   63            if (!empty($version_mini_hash[0])) {
 
   64                $version_mini_hash = $version_mini_hash[0];
 
   67            if ($line && array_filter($line)) {
 
   68                $line = implode(
' | ', array_filter($line));
 
   71            $origin = trim(exec(
'git config --get remote.origin.url'));
 
   72            $branch = trim(exec(
'git rev-parse --abbrev-ref HEAD'));
 
   73            $version_mini_hash = trim(exec(
'git rev-parse --short HEAD'));
 
   74            $version_number = exec(
'git rev-list --count HEAD');
 
   75            $line = trim(exec(
'git log -1'));
 
   86        if ($version_number) {
 
   87            $info[] = sprintf(
$lng->txt(
'git_revision'), $version_number);
 
   90        if ($version_mini_hash) {
 
   91            $info[] = sprintf(
$lng->txt(
'git_hash_short'), $version_mini_hash);
 
   95            $info[] = sprintf(
$lng->txt(
'git_last_commit'), $line);
 
   98        self::$revision_information = $info;
 
  105        return implode(
"<br />", self::$revision_information);
 
static execQuoted(string $cmd, ?string $args=null)