git-subrepo icon indicating copy to clipboard operation
git-subrepo copied to clipboard

Clear error when rebase has broken parent reference

Open OskiKervinen-MF opened this issue 5 years ago • 4 comments

I had rebased the commit where I performed the git subrepo clone and when I tried to do a pullafter that, I received the error

git-subrepo: Command failed: 'git branch subrepo/utilities/cacherer '.
fatal: Not a valid object name: ''.

I 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.

OskiKervinen-MF avatar Jul 19 '19 12:07 OskiKervinen-MF

I like the error message change, but https://github.com/ingydotnet/git-subrepo/pull/407 does a better job fixing the submodule issue.

admorgan avatar Jul 19 '19 15:07 admorgan

I removed the part that touched the submodule issue. The remaining test failures seem to equal those in master.

OskiKervinen-MF avatar Jul 22 '19 08:07 OskiKervinen-MF

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. Thanks!

arichardson avatar Jun 18 '20 12:06 arichardson

I found a potential fix for this issue here: https://github.com/ingydotnet/git-subrepo/issues/617

taktran avatar Apr 17 '24 13:04 taktran