From 402812e417f1d4e7e2be13f1c3b53aca3a8565b3 Mon Sep 17 00:00:00 2001 From: Andrii Bodnar Date: Mon, 12 Jan 2026 15:08:09 +0200 Subject: [PATCH] fix: skip commit and push when no changes compared to remote Fetch the remote localization branch before checkout to ensure translations are compared against the actual remote state, not the base branch. This prevents unnecessary commits and force pushes when translations haven't changed. Closes #296 --- entrypoint.sh | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index 36ce8b9..af5728b 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -247,11 +247,9 @@ push_to_branch() { git checkout "${CHECKOUT}" fi - if [ -n "$(git show-ref refs/heads/${BRANCH})" ]; then - git checkout "${BRANCH}" - else - git checkout -b "${BRANCH}" - fi + # Checkout localization branch, using remote state if available + git fetch origin "${BRANCH}" 2>/dev/null || true + git checkout -B "${BRANCH}" "origin/${BRANCH}" 2>/dev/null || git checkout -B "${BRANCH}" git add .