From 5d6cd03bb259bb560b1e1eb43d07e0650680cc04 Mon Sep 17 00:00:00 2001 From: Jan Lindemann Date: Sun, 7 Jun 2026 07:52:18 +0200 Subject: [PATCH] topdir.mk: Make git-get-pub rebase onto pub's master The git-get-pub does not have the same effect as the other git-get-% targets, and this commit makes it. The other git-get-% targets run pgit.sh, which rebases the current branch onto the fetched branch, and git-get-pub doesn't. Since devops merges contributor forges fast-forward without a merge-commit, the pub remote's master needs to be the last to be rebased on, because otherwise it will not allow to force-push the result. As soon as multiple forges with protected master branches contribute, fast-forward merging of the master branch will need to be abolished anyway, and the release machinery will need an overhaul. Signed-off-by: Jan Lindemann --- make/topdir.mk | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/make/topdir.mk b/make/topdir.mk index bdc0ed61..b8957248 100644 --- a/make/topdir.mk +++ b/make/topdir.mk @@ -272,8 +272,12 @@ git-get-maintainer: make git-get-$(call proj_query,getval global jw-maintainer) git-get-pub: - if git remote | grep -q "^pub$$"; then \ - JW_PKG_SSH_EXTRA_OPTS="" git pull pub master ;\ + set -e; if git remote | grep -q "^pub$$"; then \ + git fetch --prune --recurse-submodules=on-demand pub master ;\ + git submodule foreach --recursive 'git fetch --tags -f pub' ;\ + git rebase --autostash pub/master ;\ + git merge --ff-only pub/master ;\ + git submodule update --init --recursive ;\ fi git-get-%: FORCE