-
-
Notifications
You must be signed in to change notification settings - Fork 1.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
git squash by author does not squash if multiple authors touching the same file #13828
Comments
I've added the test #13830, and it works just fine locally. I think the problem in your case is that Weblate squashes too much. It picks all commits from This might be caused by the custom merge driver Weblate which might end up doing weird things here. We should really figure out a way to use it only in merge and not in cherry-picking or rebasing... |
In regular merge it it useful to merge timestamps in the PO file, but this often causes issues in rebase (because the commits become different) or squash (because it can apply changes before they should be applied). Fixes WeblateOrg#13828
In regular merge it it useful to merge timestamps in the PO file, but this often causes issues in rebase (because the commits become different) or squash (because it can apply changes before they should be applied). Fixes #13828
Thank you for your report; the issue you have reported has just been fixed.
|
Describe the issue
When use squash by author and a component is touched by two authors squash fails and all commits are not handled at all. From the code it already looks like it should handle those case, but it does not.
I saw that the test does not test this case. I have a suggestion for a test case, but I do not get the tests running on my machine, so I cannot test if this testcase matches the issue already. I expect that the additional commit needs to happen on a different unit:
I already tried
Steps to reproduce the behavior
The problem is something like:
In a way, that squash aurthor can merge user1 commits but fails to cherry-pick user2 with a "Merge conflict".
The behaviour currently is "Weblate do not squash at all and fails".
run git squash_author with the commits for the https://gitlab.tails.boum.org/tails/tails.git:
master = 8ecd43e9e99d4ebc0a829bbdd91a584b6908ebdd
origin/master = f2215b5e878d0c2a86fb0b9d3a4cf9eaa93696db
Expected behavior
Weblate squashes at much as possible aka:
3 commits:
user1 edits comp1&comp2
user2 edits comp2
user1 edits comp2
Exception traceback
How do you run Weblate?
Docker container
Weblate versions
Docker version v5.3.0.1
Weblate deploy checks
Additional context
You can find the testcase in our repo. The test sets the git commits as expected and calls gitsquash.py:
https://gitlab.torproject.org/tpo/tpa/puppet-weblate/-/blob/master/files/scripts/tests/test_gitsquash.py#L43
gitshquash.py is simplify calling squash_author on the main component (first component):
https://gitlab.torproject.org/tpo/tpa/puppet-weblate/-/blob/master/files/scripts/gitsquash.py
The text was updated successfully, but these errors were encountered: