[projects/pld-builder.new] make-request: autotag against the remote branch, not the local checkout

arekm arekm at pld-linux.org
Sat Nov 14 22:14:18 CET 2026


commit 57bea5b9d8439f88b626107bd7ab5c9e600eec83
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Sat Nov 14 22:13:14 2026 +0100

    make-request: autotag against the remote branch, not the local checkout
    
    git fetch moves origin/<branch> only, so --merged=HEAD skipped tags
    newer than the local checkout.

 client/make-request.sh | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/client/make-request.sh b/client/make-request.sh
index a82da0e..2a1f02b 100755
--- a/client/make-request.sh
+++ b/client/make-request.sh
@@ -196,12 +196,16 @@ autotag() {
 		# get branch only
 		branch=${s#*:}
 		branch=${branch%%"$s"}
-		[ -n "$branch" ] && branch="--merged=$branch"
 		# strip branches
 		s=${s%:*}
 		# ensure package ends with .spec
 		s=${s%.spec}.spec
 		git fetch --tags
+		# fetch doesn't move the local checkout; match tags against the remote branch
+		if [ -n "$branch" ] && git rev-parse -q --verify "refs/remotes/origin/$branch" >/dev/null; then
+			branch="origin/$branch"
+		fi
+		[ -n "$branch" ] && branch="--merged=$branch"
 		out=$(git for-each-ref --count=1 --sort=-authordate refs/tags/auto/$dist \
 			--format='%(refname:short)' $branch)
 		echo "$s:$out"
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/projects/pld-builder.new.git/commitdiff/57bea5b9d8439f88b626107bd7ab5c9e600eec83



More information about the pld-cvs-commit mailing list