Greetings.
I have notice the following. When a PR is behind the destination branch, Bitbucket offers the option to sync the featured branch. When used, it brings the featured branch up to date with destination branch.
However, it is not updating the submodules. The only way to get a real sync that include submodules, is to merge the destination branch into the featured branch.
Is this something that was overlooked or not implemented?
Will different merge technique allows for the submodules to be updated as well?
We currently use the squash technique when merging but the synchronisation is not updating the submodules.
Anyone have a solution for this?
Hello @Ian Dorion ,
thank you for reaching out to the Community!
The parent repository and the submodule repository are different repos, and they are not automatically kept in sync. This means that the parent repository will always explicitly point to a specific commit in the submodule.
If you push new commits to the submodule, it will not automatically update the parent repository with the new version. You will need to make a new commit in the parent repository to "update" the pointer to this new commit on the submodule repository.
The sync operation in the UI essentially merges the destination branch of the pull request into the source branch so that the source branch is up to date with the new changes introduced in the destination branch after the source branch was branched off.
If a new commit was pushed to the destination branch updating the pointer of a submodule to a different commit, the Sync operation in a pull request targeting that branch will also contain that update. You can confirm that after clicking on the Sync option and checking the merge commit that was created. It should look similar to the below :
This is the merge commit automatically created by the Sync button. As you can see, it includes the updated pointer to the submodule that was previously pushed in a new commit to the destination branch.
Could you confirm if you are getting a different behavior? If yes, could you share the exact steps you are taking to get to that state?
Let us know in case you have any questions.
Thank you, @Ian Dorion !
Patrik S
Thank You @Patrik S
So I guess it's comes down to how the devs manage their PR. The update on the submodules with and old commit must come as a change made on the devs side.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.