Nah, fuck it.

このコミットが含まれているのは:
2023-01-21 17:59:13 +09:00
コミット 417a51b1ff
1個のファイルの変更1行の追加13行の削除

ファイルの表示

@ -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 @@
?>
</h1>
<?php
if ($isgit) {
echo "<h2>Branch: ".git_branch($proot)."</h2>";
echo "<h3>Last commit: ".get_commit_msg($proot)."</h3>";
}
if ($isgit) echo "<h2>Branch: ".git_branch($proot)."</h2>";
if (!is_dir(PDIR.$path)) {
echo "<pre>".cat($path)."</pre>";
}