-
Notifications
You must be signed in to change notification settings - Fork 274
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
fatal: Not a valid object name: '' no2 #424
Comments
Is this something that you would still like help with? I know it has been a long time. I am sorry for the silence. |
Hi, So If you have any suggestions, I'll be happy to hear from you. Thanks, forry |
Do you still have a copy of your workspace? If so zip it and attach it and I will be happy to investigate it. If you can't I understand it will just require more back and forth. |
Yes, I have. I tested it and packed the inside of my repo. The subrepo is in the geGL subfolder. |
I have found the issue, you performed a massive squash merge and git can not find it's way from your head to the past operations. Should really have a better error message here. You can get subrepo to work again with your directory by manually modifying the .gitrepo parent entry to point to the SHA before the squash, but since you also squashed a number of other subrepo pulls and updates, you will not get the desired results for a push, basically your squash caused the original clone to be a modified merge and you will not be able to extract the difference between it and the original without manual intervention. Future operations would work correctly between the two using the subrepo command. |
Ok, not sure if I understand it all right but, there's what I did:
I tried delete the branch by Should I delete the .git/tmp by hand? |
I am typing this for clarification and not in the belief that you didn't do the correct steps. From the out put of subrepo:
After those steps have been completed then you should remove your worktree using subrepo clean. I personally believe that this should be automated, but I will have to talk with @ingydotnet to see if he agrees. If so we can add it to 0.5.0 |
Thank you very much for the clarification. I, for some reason, thought that the subrepo clean will somehow revert the pulling process. After issuing the clean command everything now seems to be in order (further investigation might be needed because there are lots of things that I could have overlooked). Now the subrepo pull correctly states that I'm up to date. Thank you so much for your time. I have learned! But one thing is bugging me. Does this experience means that creating subrepo in a feature branch that will be squashed and rebased to the other branch will always resolve to this kind of behavior meaning, that the subrepo needs to be created (parented) to some commit that will always be in the timeline of the branch the subrepo lives/will live in? I'm generalizing because in the early days when I learned that git can forget I was able to somehow squash commits even inside of the master (even though it was a bit hacky). Meaning that the subrepo don't know that you are squashing part of history in which it is parented? And one other question, whenever I'm doing changes to the local subrepo (which I can't or don't want to push to it's origin) is it ok that I commit these changes from the top/host repo? I guess that is the design since subrepo commit is somehow for manual pulling and only branch in the subrepo/ branch, but to be sure. Thank you very much |
You are correct, subrepo is blind to what happened inside a squash merge. This is true with subtrees and submodules also. The difficulty for subrepo is that the design says that a consumer that is not interested in pulling up on libraries should not need to directly install it. Therefore we can't add hooks that would automatically reparent during activities such as squash merges and rebases. |
Forgot to answer your second question. Yes, you can make modifications to the files in the subrepo in the parent. It will figure out what part applies to which subrepo and create the appropriate patches to push up stream if you desire, if you don't push it upstream then it will just merge your local changes with the upstream. |
Once again thanks for your time and patience. |
…rig parent got squashed (ingydotnet/git-subrepo#424)
Hi,
I'm not a git expert. I'm using subrepo for one of the modules (dormon/geGL) of our framework (Rendering-FIT/GPUEngine). I don't have push rights to this module. I have done one local change to the module and committed it as part of the framework repo. After while I wanted to pull new version getting:
I have read through issue #350 but I don't think it applies to me since I haven't changed the remote or the .gitrepo by hand. I have tried clean and doing the suggested commands by hand.
I just need to merge in new changes. Is there another way apart from deleting and recloning the subrepo from scratch. And how to avoid this issue in the future?
Thanks, forry
The text was updated successfully, but these errors were encountered: