From 417a51b1ff8abf9f64f623a96ad81b7b3bb1f85c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AF=AE?= Date: Sat, 21 Jan 2023 17:59:13 +0900 Subject: [PATCH] Nah, fuck it. --- index.php | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/index.php b/index.php index a924e59..0a617c6 100644 --- a/index.php +++ b/index.php @@ -30,15 +30,6 @@ return trim($res[array_key_last($res)]); } - function get_commit_msg (string $fp) : string { - $res = file_get_contents($fp.".git/logs/refs/heads/".git_branch($fp)); - $res = explode("\n", $res); - $res = $res[array_key_last($res)-1]; - $res = strstr($res, "commit: "); - $res = str_replace("commit: ", "", $res); - return trim($res); - } - function ls (string $fp = "") : array|bool { return array_diff(scandir(PDIR.$fp), ["..", ".", ".git"]); } @@ -70,10 +61,7 @@ ?> Branch: ".git_branch($proot).""; - echo "

Last commit: ".get_commit_msg($proot)."

"; - } + if ($isgit) echo "

Branch: ".git_branch($proot)."

"; if (!is_dir(PDIR.$path)) { echo "
".cat($path)."
"; }