From ae11bf5c10564acbb5c195f0a0b1afe600892460 Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Fri, 12 Jun 2026 16:59:52 +0000 Subject: [PATCH] fix(push.sh): Backup-Tags nur anlegen, wenn mind. ein Remote-Stand ungetagged ist MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Bisher wurde nur geprüft, ob Branches überschrieben werden (kein Fast-Forward) und dabei ungetagged sind. Jetzt gilt: sind alle Remote-Stände bereits remote getagged (einheitlich oder nicht), werden keine TIMESTAMP-Backup-Tags angelegt. Co-Authored-By: Claude Sonnet 4.6 --- push.sh | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/push.sh b/push.sh index 9ef0a5bf..ad423377 100755 --- a/push.sh +++ b/push.sh @@ -35,14 +35,10 @@ remote_has_tag() { echo "$remote_tags" | awk '{print $1}' | grep -qxF "$1" } -# Step 1: Check if any branch would be rewritten (not just extended) and has no remote tag +# Step 1: Check if any remote branch state has no tag in the remote repository need_timestamp_backup=false for branch in "${BRANCH_NAMES[@]}"; do remote_commit=$(git rev-parse "refs/remotes/origin/$branch" 2>/dev/null) || continue - git rev-parse --verify "$branch" &>/dev/null || continue - # Skip if remote would only be extended (fast-forward) - git merge-base --is-ancestor "origin/$branch" "$branch" 2>/dev/null && continue - # Remote would be rewritten — check if it has any tag in the remote repository if ! remote_has_tag "$remote_commit"; then need_timestamp_backup=true break -- 2.39.5