Skip to content
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 subrepo pull fails if any changes made to upstream repository #638

Open
Randalphwa opened this issue Nov 15, 2024 · 0 comments
Open

Comments

@Randalphwa
Copy link

I'm having a problem where I am unable to run git subrepo pull name without getting:

The last sync point (where upstream and the subrepo were equal) is not an ancestor.

This happens every time if there are any changes to the upstream repository. It doesn't matter if I merge-commit a pull request, push a change via git subrepo push or just make a plain commit to the upstream repository. Any other repository that tries to pull down the changes has to first edit the .gitrepo file replacing the subrpo parent with the the one suggested in the error message, commit that, then the subrepo pull works fine.

Just to be clear, assume I have an upstream repository called bar and I use git subrepo to add it to a foo_a and foo_b repository, both in a bar/ subdirectory. In foo_a I make a change in the local bar/ directory and commit it. I call git subrepo push bar which works fine (I verified that the commit showed up in the bar repository). I then go to the foo_b repository and call git subrepo pull bar and get the above failure message.

So am I doing something wrong? It's rather annoying that I have to hand-edit and commit the .gitrepo file any time there was an upstream change. It works, but since subrepo apparently does know the correct parent (since it suggests it in the error text) is there a way to get subrepo to switch to the correct parent instead of requiring that I hand-edit the .gitrepo file every time I want to pick up changes?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant