~~NOCACHE~~ $repoDir="/home/opc/rocketa.git"; $commitHash = $_GET['hash']; $file = $_GET['file']; $diff = shell_exec("git -C '/home/opc/rocketa.git' show ".$commitHash." -- ".$file); echo "git -C '/home/opc/rocketa.git' show ".$commitHash." -- ".$file; $lines = explode("\n", $diff); echo "
";
foreach ($lines as $line) {
    if (str_starts_with($line, '+')) {
        echo '' . htmlspecialchars($line) . '' . "\n";
    } elseif (str_starts_with($line, '-')) {
        echo '' . htmlspecialchars($line) . '' . "\n";
    } else {
        echo htmlspecialchars($line) . "\n";
    }
}
echo "
";