From ad6dd6bab44a685fb2c61f9b6d9df3d66a10cacf Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Mon, 27 Mar 2023 15:14:57 -0300 Subject: src/infrastructure/scripts/report.sh: Auto-fetch missing commits --- src/infrastructure/config/gitconfig | 2 ++ src/infrastructure/scripts/report.sh | 7 ++++++- 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/infrastructure/config/gitconfig b/src/infrastructure/config/gitconfig index 996aa74..43ab464 100644 --- a/src/infrastructure/config/gitconfig +++ b/src/infrastructure/config/gitconfig @@ -7,3 +7,5 @@ detachedHead = false [receive] advertisePushOptions = true +[uploadpack] + allowAnySHA1InWant = true diff --git a/src/infrastructure/scripts/report.sh b/src/infrastructure/scripts/report.sh index 5c89b91..11ddc42 100755 --- a/src/infrastructure/scripts/report.sh +++ b/src/infrastructure/scripts/report.sh @@ -198,7 +198,12 @@ done SHA="$( grep '^sha ' "$f" | cut -d' ' -f2- | esc)" FILENAME="$(grep '^filename ' "$f" | cut -d' ' -f2- | esc)" DURATION="$(grep '^duration ' "$f" | cut -d' ' -f2- | cut -d'"' -f1 | esc)" - MESSAGE="$(git -C "$REPO" log -1 --format=%B "$SHA" | esc)" + MESSAGE="$({ + git -C "$REPO" log -1 --format=%B "$SHA" || { + git fetch origin "$SHA" + git -C "$REPO" log -1 --format=%B "$SHA" + } + } | esc)" if [ "$STATUS" = 0 ]; then if [ "$DURATION" -le 60 ]; then -- cgit v1.2.3