Merge pull request #2274 from gx1400/dev

Add git LastFetch time to debug view based on FETCH_HEAD modification…
这个提交包含在:
Peter Goodhall 2023-07-12 21:20:46 +01:00 提交者 GitHub
当前提交 a21bb4de00
找不到此签名对应的密钥
GPG 密钥 ID: 4AEE18F83AFDEB23

查看文件

@ -169,6 +169,8 @@
$commitDate = trim(exec('git log --pretty="%ci" -n1 HEAD'));
$line = trim(exec('git log -n 1 --pretty=%D HEAD'));
$pieces = explode(', ', $line);
$lastFetch = trim(exec('stat -c %Y .git/FETCH_HEAD'));
$dt = new DateTime("@$lastFetch");
if (isset($pieces[1])) {
$remote = substr($pieces[1], 0, strpos($pieces[1], '/'));
$branch = substr($pieces[1], strpos($pieces[1], '/')+1);
@ -225,6 +227,12 @@
<?php } ?>
</td>
</tr>
<tr>
<td>Last Fetch</td>
<td>
<?php echo $dt->format(\DateTime::RFC850); ?>
</td>
</tr>
</table>
</table>
</div>