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 <jan@janware.com>
This commit is contained in:
Jan Lindemann 2026-06-07 07:52:18 +02:00
commit 5d6cd03bb2
Signed by: Jan Lindemann
GPG key ID: 3750640C9E25DD61

View file

@ -272,8 +272,12 @@ git-get-maintainer:
make git-get-$(call proj_query,getval global jw-maintainer) make git-get-$(call proj_query,getval global jw-maintainer)
git-get-pub: git-get-pub:
if git remote | grep -q "^pub$$"; then \ set -e; if git remote | grep -q "^pub$$"; then \
JW_PKG_SSH_EXTRA_OPTS="" git pull pub master ;\ 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 fi
git-get-%: FORCE git-get-%: FORCE