-
Notifications
You must be signed in to change notification settings - Fork 272
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Clear error when rebase has broken parent reference #415
base: master
Are you sure you want to change the base?
Clear error when rebase has broken parent reference #415
Conversation
I like the error message change, but #407 does a better job fixing the submodule issue. |
…HEAD Before, there would be a cryptic error about invalid parameters, because prev_commit would never get set. This situation can occur when the commit that last touched the subrepo has been rebased.
Moved the parent verification inside the branch that actually depends on the parent. Without that it fails needlessly when there is no parent yet.
c8788f2
to
f261515
Compare
I removed the part that touched the submodule issue. The remaining test failures seem to equal those in master. |
I've accidentally rebased after doing a subrepo push/pull a few times and then getting weird failures the next time I try to update. Having a meaningful error message would be really useful. |
I found a potential fix for this issue here: #617 |
I did not find it immediately obvious how to gather the information needed to fix a missing parent error. Search the repository for the values needed and present them as part of the message. Fixes ingydotnet#617, ingydotnet#415, ingydotnet#600
I had rebased the commit where I performed the
git subrepo
clone and when I tried to do apull
after that, I received the errorI was able to figure out this was because of the rebase eventually, but it took some doing, so I made this MR to make the problem obvious in the future.
Also replaced one raw reference to .git with an invocation of
git rev-parse --git-dir
.