diff --git a/misuzu.php b/misuzu.php index f6470405..d92e3b44 100644 --- a/misuzu.php +++ b/misuzu.php @@ -290,7 +290,6 @@ MIG; tpl_add_function('csrf', true, 'csrf_html'); tpl_add_function('git_commit_hash'); - tpl_add_function('git_branch'); tpl_add_function('git_tag'); tpl_add_function('csrf_token'); tpl_add_function('startup_time', false, function (float $time = MSZ_STARTUP) { diff --git a/src/WhoopsReporter.php b/src/WhoopsReporter.php index 277a0ac7..d866fb03 100644 --- a/src/WhoopsReporter.php +++ b/src/WhoopsReporter.php @@ -69,7 +69,9 @@ HTML; $json = json_encode([ 'git' => [ - 'branch' => git_branch(), + // providing branch as tag still for now, can't be bothered to update the references + 'branch' => git_tag(), + 'tag' => git_tag(), 'hash' => git_commit_hash(true), ], 'misuzu' => [ diff --git a/src/git.php b/src/git.php index 86c341ee..e1b61c4f 100644 --- a/src/git.php +++ b/src/git.php @@ -18,11 +18,6 @@ function git_commit_time(): int return strtotime(git_commit_info(MSZ_GIT_FORMAT_HASH_DATE_TIME)); } -function git_branch(): string -{ - return trim(shell_exec('git rev-parse --abbrev-ref HEAD')); -} - function git_tag(): string { return trim(shell_exec('git describe --abbrev=0 --tags'));