From 9f7a2d86cf72a2cbd81669dbc5ac0cbded3e223a Mon Sep 17 00:00:00 2001 From: clsty Date: Thu, 2 Oct 2025 18:55:33 +0800 Subject: [PATCH] No hash, just timestamp --- scriptdata/functions.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scriptdata/functions.sh b/scriptdata/functions.sh index 208c48b28..f6644f3f1 100644 --- a/scriptdata/functions.sh +++ b/scriptdata/functions.sh @@ -82,10 +82,11 @@ function git_unshallow(){ git fetch --unshallow fi } -function latest_commit_hash(){ +function latest_commit_timestamp(){ local target_path="$1" if [[ ! -e "$target_path" ]]; then - echo "[latest_commit_hash] '$target_path' does not exist. Aborting...";exit 1 + echo "[latest_commit_timestamp] '$target_path' does not exist. Aborting..." + return 1 fi - echo $(git log -1 --format="%H" -- "$target_path" 2>/dev/null) + echo $(git log -1 --format="%ct" -- "$target_path" 2>/dev/null) }