-
Notifications
You must be signed in to change notification settings - Fork 271
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: Can't commit: 'subrepo/myrepo' doesn't contain upstream HEAD: #602
Comments
That means the SHA in the commit field of your .gitrepo file isn't a valid SHA on the remote repo. This can happen if the remote's history was rewritten. Rewriting the history of a public repo is extremely dangerous so I would be wary if you can't identify what happened. |
Thanks, good to know |
Well, I ended up removing myrepo and recloning it using subrepo, almost immediately ran into the same problem. Ended up running
It overwrote myrepo with the parent repository! I lost all history and code. Thank god I had a backup. So far subrepo has been a fragile disaster for me. Only useful if I only make/push changes as a std repository, then pull them projects that have it as a subrepo. Edit/push via the subrepo just seem to break regularly. |
I am really curious about your use case. We use subrepo daily in a corporate environment and have not experienced such fragility. Are there any examples you have of public repos you are experiencing this on? Is there any way you can generate logs that you would be willing to share so I can help alleviate this for you? |
Unfortunately, I'm working on private repos (github) for a private company. But logs shouldn't be a problem, though I'm not sure what logs would be useful. I'm working in Visual Studio and wondering if the problem is I make changes to the parent project and the subrepo project and do commits from there, before dropping to a command line to do the subrepo push - would that mess things up. My apologies for my tone earlier, it was unwarranted. Been a long day here. |
The Visual Studio should not inject such a problem since that is also my workflow. If you decide to keep using subrepo, next time you try to do a push could you do a |
Will do |
@admorgan, I've been seeing this intermittently for the better part of a year now. I've been trying to track it down, but may need help in order to get to the bottom of it. Verbose output can be found here. The subrepo can be found here. The containing repo is private. I've been trying to hack the git-subrepo source to track it down. Here is the command that is failing unexpectedly:
I believe the specified commit is not contained in the rev-list because it is getting rebased unexpectedly by this line. I conclude this because I would expected
...but instead it shows this, which of course means 5d843c1 won't be found:
I should be able to reproduce this consistently by creating test repos from these commits, but am at a loss as to how to solve it. At the moment, it seems like using |
@admorgan, I just did a force push to get around & keep moving (in case you test the docs repo in its current state). If example is useful, I could recreate the branches necessary to reproduce this. |
@admorgan, it happened again and I found simple way for anyone to reproduce the issue by running the following commands:
|
I found a potential fix for this issue here: #617 |
There are two elements at play here. The technical element about why this doesn't work, and the UI issue where the report doesn't do a good enough job describing it. The technical explanationAll of subrepo's state is stored in the .gitrepo file that makes a subdirectory a subrepo.
The problem is that there is a SHA that doesn't exist on git-subrepo-but-1, and subrepo can't do any more actions. The UI issue
|
@admorgan, it seems like you may have missed important details from my previous messages. The SHAs in |
@mmcev106 sorry about not listening close enough. You are correct the issues I list are not related to the issue you are having. The issue you are having is because the parent value did not get updated correctly in the git pull. I will try to find some time to dig into deeply next week. |
Just want you to know that I am still investigating this, just haven't had as much time as I need. |
I appreciate you investigating it! I know it's not exactly trivial. |
I am having the same issue: I have found that the I second the sentiment above - I really appreciate what you are doing with git-subrepo and I look forward to a real fix, but I also get what a chore a successful open source project like this can be. Thank you. |
If you get time to work on this, feel free to contact me for repo links, logs, etc. |
Getting the above error when trying to execute
git subrepo push myrepo
"myrepo" is on the master branch, the parent repository on development branch
The text was updated successfully, but these errors were encountered: