-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes missing after merge with upstream #11279
Comments
Relevant part of git reflog:
but if I manually checkout Here is the output of
and here is the result of
Note that both parent commits are the same but tree is not the same. And sure enough |
This is what Weblate does on merge: Lines 207 to 232 in b03e248
The magic there is only to change the ordering of the parents. Without that, the resulting merge requests on GitHub/GitLab/etc. are showing weird diffs. If the missing changes are in gettext PO files, it might be https://github.com/WeblateOrg/weblate/blob/main/weblate/examples/git-merge-gettext-po merge driver Weblate uses for these. |
I will try to reproduce this with the custom merge driver |
Indeed, with the custom merge driver I can reproduce the faulty merge |
@nijel found the problem and opened a PR. It's a pretty severe bug if you ask me. |
Thank you for your report; the issue you have reported has just been fixed.
|
@nijel Thanks. Do you think this warrants a 5.4.3 release? In my opinion it does, because the effect of the bug is that it silently discards changes done in weblate and causes loss of data. |
@bastianbeischer I didn't think about that so far, but there are probably enough fixes to make a 5.4.3. |
Describe the issue
With this git commit graph:
where the relevant po file in the repository was modified in both A and B (but in a way which doesn't result in a conflict), modifications in A were done in weblate, modifications in B were done directly in the upstream repository.
weblate merged the remote repository (I have setup the weblate component to use merge style 'merge' and not rebase) and created the following graph:
where M is a merge commit with parents A and B. So far so good.
However in the actual po file in commit M the changes in commit A are gone. The files in the commit M are identical to those in commit B (the git tree is the same). It looks like weblate was using some weird merge strategy which lead to changes in A being ignored?
When manually recreating the merge by creating a new branch on B and merging A into it, I get a different commit M2 which does not have this problem. Here changes from both A and B are present after the merge.
Any ideas how I could debug this further? I have already looked at the git reflog of the weblate internal repository (on the server), but it didn't provide any insights, except that apparently the merge was made with the 'ort' strategy, which seems to be reasonable...
I already tried
Steps to reproduce the behavior
Might need specific commits in the repository in question, so didn't try to build a reproducer
Expected behavior
No response
Screenshots
No response
Exception traceback
No response
How do you run Weblate?
Docker container
Weblate versions
5.4.2
Weblate deploy checks
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: