rocket-a

差分

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

この比較画面へのリンク

両方とも前のリビジョン前のリビジョン
次のリビジョン
前のリビジョン
diff [2025/10/20 15:48] rootdiff [2026/01/29 19:06] (現在) root
行 1: 行 1:
 +~~NOCACHE~~
 <php> <php>
-$repoDir = '/home/alma/rocketa_mvp.git';+$repoDir="/home/opc/rocketa.git";
 $commitHash = $_GET['hash']; $commitHash = $_GET['hash'];
-$diff = shell_exec("git -C '/home/alma/rocketa_mvp.git' show 43ee072 -- resources/views/admin/client/bill/invoice_preview.blade.php"); +$file = $_GET['file']; 
-echo "<code>".$diff."</code>";+$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> </php>
 +
diff.1760942936.txt.gz · 最終更新: by root