From 0e2de3eadb9a3595f9c6ea1004ff4bb09c457211 Mon Sep 17 00:00:00 2001 From: SpiritCroc Date: Sat, 3 Dec 2022 17:16:42 +0100 Subject: [PATCH] merge_helpers.sh: Fix downstream_latest_tag if sc_v and sc_last are identical Change-Id: I750b4ce873229de098988c5dbf94e0cfe6a57b82 --- merge_helpers.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/merge_helpers.sh b/merge_helpers.sh index 7bc2b84a3a..503de8ea61 100755 --- a/merge_helpers.sh +++ b/merge_helpers.sh @@ -99,8 +99,8 @@ upstream_previous_tag() { downstream_latest_tag() { local commit="HEAD" while true; do - local tag=`git describe --abbrev=0 "$commit" --tags` - if [[ "$tag" =~ "sc_v" ]]; then + local tag=`git tag --points-at "$commit" | grep "^sc_v" | head -n 1` + if [ ! -z "$tag" ]; then echo "$tag" break else