From c4769cf79f71f1a9f017241c86d92eb0ea74b6eb Mon Sep 17 00:00:00 2001 From: Jan Lindemann Date: Wed, 11 Nov 2026 16:34:54 +0100 Subject: [PATCH] pgit.sh, make: Fetch tags in get and pull targets Fetch tags with all get and pull targets: - pgit.sh cmd_get(): add --tags to the top-level fetch, which serves the get- and git-get- targets of the topdir and the projects-dir Makefiles - topdir.mk git-get-pub: add --tags to the pub fetch - projects-dir.mk git-pull-all: pass --tags to the per-project git pull --all - rules.mk update: pass --tags to git pull - pkg.sh check_scm(): pass --tags to git pull so the release flow sees the release tags of the remote Signed-off-by: Jan Lindemann --- make/projects-dir.mk | 2 +- make/rules.mk | 2 +- make/topdir.mk | 2 +- scripts/pgit.sh | 2 +- scripts/pkg.sh | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/make/projects-dir.mk b/make/projects-dir.mk index d47d92a1..0724beaa 100644 --- a/make/projects-dir.mk +++ b/make/projects-dir.mk @@ -353,7 +353,7 @@ git-get-mini: $(SSH_WRAPPER_SH) PGIT_SH_PROJECTS="$(patsubst %/.git,%,$(wildcard $(addsuffix /.git,$(shell make -s build-order))))" $(PGIT_SH_GET_DEFAULT) git-pull-all: $(SSH_WRAPPER_SH) - $(PGIT_SH) pull $(PGIT_SH_OPTS_NETWORK) --all + $(PGIT_SH) pull $(PGIT_SH_OPTS_NETWORK) --all --tags git-get-maintainer: $(SSH_WRAPPER_SH) PGIT_SH_PROJECTS="$(PROJECTS_WITH_PROJECT_CONF)" $(PGIT_SH) exec make $@ diff --git a/make/rules.mk b/make/rules.mk index 1a1eea40..3dbc26ba 100644 --- a/make/rules.mk +++ b/make/rules.mk @@ -119,7 +119,7 @@ love: @echo "Not war?" cvsupdate update: - if [ -d "CVS" ]; then cvs update -dP || exit 1; else git pull && git submodule update --init --recursive || exit 1; fi + if [ -d "CVS" ]; then cvs update -dP || exit 1; else git pull --tags && git submodule update --init --recursive || exit 1; fi cvsdiff diff: if [ -d "CVS" ]; then cvs diff -u || exit 1; else git --no-pager diff --relative --no-prefix . || exit 1; fi diff --git a/make/topdir.mk b/make/topdir.mk index bfd71b90..56b612f7 100644 --- a/make/topdir.mk +++ b/make/topdir.mk @@ -280,7 +280,7 @@ git-get-maintainer: git-get-pub: set -e; if git remote | grep -q "^pub$$"; then \ - git fetch --prune --recurse-submodules=on-demand pub master ;\ + git fetch --prune --tags --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 ;\ diff --git a/scripts/pgit.sh b/scripts/pgit.sh index 70f0ee7b..d9e68be5 100644 --- a/scripts/pgit.sh +++ b/scripts/pgit.sh @@ -263,7 +263,7 @@ cmd_get() run_git -C $project_dir remote add $remote_name $pull_url [ "$from_user" = "$remote_user" ] || run_git -C $project_dir remote set-url --push $remote_name no_push } - run_git -C $project_dir fetch --prune --recurse-submodules=on-demand $remote_name $from_ref + run_git -C $project_dir fetch --prune --tags --recurse-submodules=on-demand $remote_name $from_ref run_git -C $project_dir submodule foreach --recursive 'git fetch --tags -f origin' if [ "$to_ref" ]; then run_git -C $project_dir rebase --autostash $remote_name/$from_ref $to_ref diff --git a/scripts/pkg.sh b/scripts/pkg.sh index 0262d16f..e83bb573 100644 --- a/scripts/pkg.sh +++ b/scripts/pkg.sh @@ -130,7 +130,7 @@ check_scm() { if [ -d .git ]; then log + checking git - git pull --no-edit || fatal "git pull failed, giving up" + git pull --no-edit --tags || fatal "git pull failed, giving up" git submodule update --init --recursive || fatal "git submodule update failed, giving up" git status --porcelain | grep -v '^??' | grep -q . && { git status -- 2.56.1