-
-
Notifications
You must be signed in to change notification settings - Fork 54
Description
When updating an existing branch, msync update --force seems to consider the values in the .sync.yml file of the existing branch (meant to be updated), instead of the .sync.yml file of the target branch. This might be a design fault.
Side note: I did this on a GitLab merge request, but the behavior is likely the same even w/o --pr
Example update flow
- I run
msync update --pr, which creates an update (new branch, optional merge request) - I figure out that the change was wrong on a target module, due to a value I forgot to update in
.sync.yml; hence, I update.sync.yml(in target module, in target branch, e.g.master). - I run
msync update --pr --forceto update the already existing branch (created earlier)
Now, I would expect the updated branch to consider the values in .sync.yml of the target branch (i.e. master in our example). But the changes are based on the values of .sync.yml from the existing, earlier created branch.
I need to delete the branch created by msync update and run ModuleSync afresh. 😟
Recreate target branch? (instead of "update")
The above behavior is probably not intended. The branch was originally created off the target branch, which then naturally has a .sync.yml file that matches across both branches.
When a branch is updated, especially with --force, then the branch should really, technically, be created off that target branch again and force-pushed over the branch created by ModuleSync earlier. That way we would guarantee the same behavior at all times. Correct?