-
Describe the issueThe "Squash Git commits" add-on is trying to first rebase the local commits onto the I already tried
Steps to reproduce the behaviorPrerequisites:
At this point, a merge conflict occurs and everything is locked. What happens is, after step 4, Weblate is not aware yet that your Lines 254 to 263 in 992f32a However, the repo_needs_merge() function just does a git log --format=format:%H ..origin/main -- , which lists the commits on the remote that are not in the local repo. At this point it doesn't do a git fetch first, so it still has an old view of the origin/main branch that didn't contain its previous commit. So it does not rebase and squashes its new commit with the previous one (that is already on our remote).
When we try to do a real rebase afterwards, it gives a merge conflict. Expected behaviorThe check to rebase does a How do you run Weblate?Docker container |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
There will always be a possible race condition as we cannot lock the remote repository. Doing So you should not be updating manually but configure webhooks to make sure Weblate gets instant notifications when the remote repository changes and follows it automatically. See https://docs.weblate.org/en/latest/admin/continuous.html#updating-repositories |
Beta Was this translation helpful? Give feedback.
There will always be a possible race condition as we cannot lock the remote repository. Doing
git fetch
directly in the squash add-on will reduce the window but cannot fully eliminate it. On the other side, it will slow down every add-on invocation. This remote update is not needed when webhooks are configured and Weblate updates the repository automatically.So you should not be updating manually but configure webhooks to make sure Weblate gets instant notifications when the remote repository changes and follows it automatically. See https://docs.weblate.org/en/latest/admin/continuous.html#updating-repositories