From 87a728ce91128fde567a8501c530cb57c123ab62 Mon Sep 17 00:00:00 2001 From: Derek Rowland Date: Tue, 11 Jul 2023 13:30:24 -0500 Subject: [PATCH] Add git LastFetch time to debug view based on FETCH_HEAD modification time --- application/views/debug/main.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/application/views/debug/main.php b/application/views/debug/main.php index 64e9857a..5d986ffa 100644 --- a/application/views/debug/main.php +++ b/application/views/debug/main.php @@ -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 @@ + + Last Fetch + + format(\DateTime::RFC850); ?> + +