From 46428f7bc4fa4ca01c5e23c199607a55f2884548 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ku=C4=8Dera?= <26327373+vkucera@users.noreply.github.com> Date: Tue, 28 Oct 2025 17:12:00 +0100 Subject: [PATCH] Setup diagnostic script: Print branch name and status --- docs/tools/summarise_o2p_setup.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/tools/summarise_o2p_setup.sh b/docs/tools/summarise_o2p_setup.sh index 9ead2ca3..96624a27 100644 --- a/docs/tools/summarise_o2p_setup.sh +++ b/docs/tools/summarise_o2p_setup.sh @@ -38,7 +38,12 @@ fi for repo in alidist O2 O2Physics; do [[ -d "${repo}" ]] || { echo "Directory ${repo} not found in the current directory."; continue; } - echo "Last commit of ${repo}: $(cd "${repo}" && git log -n 1 --pretty="format:%ci %h")" + cd "${repo}" || { echo "Failed for enter ${repo}"; return 1; } + commit="$(git log -n 1 --pretty="format:%ci %h")" + branch="$(git rev-parse --abbrev-ref HEAD)" + git diff --quiet && status="clean" || status="modified" + cd - > /dev/null || { echo "Failed for leave ${repo}"; return 1; } + echo "Current commit of ${repo}: $commit (branch $branch, $status)" done # Package build info