rocket-a

差分

このページの2つのバージョン間の差分を表示します。

この比較画面へのリンク

次のリビジョン
前のリビジョン
diff [2025/10/20 15:42] – 作成 rootdiff [2026/01/29 19:06] (現在) root
行 1: 行 1:
-<?php +~~NOCACHE~~ 
-$repoDir = '/home/alma/rocketa_mvp.git'; +<php> 
-$commit = '43ee072'; +$repoDir="/home/opc/rocketa.git"; 
-$diff = shell_exec("git --git-dir=" . escapeshellarg($repoDir) . " show . escapeshellarg($commit)); +$commitHash = $_GET['hash']
-echo "<pre>$diff</pre>";+$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 "<pre>"; 
 +foreach ($lines as $line) { 
 +    if (str_starts_with($line, '+')) { 
 +        echo '<span style="color:green;">' htmlspecialchars($line. '</span>' . "\n"
 +    } elseif (str_starts_with($line, '-')) { 
 +        echo '<span style="color:red;">' . htmlspecialchars($line) . '</span>' . "\n"; 
 +    } else { 
 +        echo htmlspecialchars($line) . "\n"; 
 +    } 
 +
 +echo "</pre>"; 
 +</php> 
diff.1760942565.txt.gz · 最終更新: by root