map2loop-2 icon indicating copy to clipboard operation
map2loop-2 copied to clipboard

Unexpected Error when pulling submodules (notebooks)

Open T4mmi opened this issue 4 years ago • 6 comments

Hi,

Thanks for refactoring of the repo, we have trouble pulling submodule (map2loop2-notebooks). It throws an unexpected error without log/traceback.

Nothing blocking but might require a very little patch.

this is more of a feedback than an issue...

T4mmi avatar Feb 19 '21 08:02 T4mmi

Hey @T4mmi , we are just getting to these now - Gautier got in touch and I suggested the following fix

git clone https://github.com/Loop3D/map2loop-2.git --recurse-submodules

as opposed to recures-submodule without the 's'. Is this all good now?

yohanderose avatar Mar 09 '21 07:03 yohanderose

nice addition, this should do ... but I still have an unexpected error trying to pull submodules (notebooks) ... I will cleanup my local repo to try again from scratch

T4mmi avatar Mar 09 '21 07:03 T4mmi

To make sure you don't lose any work, do a git status and copy over anything you've changed, or git stash --keep-index. And then remove the submodule directories and check out this post - https://stackoverflow.com/a/1032653/8490364 - it should just be a

git submodule update --recursive --remote

yohanderose avatar Mar 09 '21 08:03 yohanderose

Weirdly, It still crashes without notice or traceback/log (only Git GUI frontend gives me a unexpected error...) ... I tried to manually flush the .gitmodule content and added back the submodule using git submodule add https://github.com/Loop3D/map2loop2-notebooks and that works ...

[submodule "map2loop2-notebooks"]
	path = map2loop2-notebooks
	url = https://github.com/Loop3D/map2loop2-notebooks

works where

[submodule "notebooks"]
	path = notebooks
	url = https://github.com/Loop3D/map2loop2-notebooks

does not .... and I can't explain it so i'll just leave it here in case anyone faces the same problem ...

T4mmi avatar Mar 09 '21 08:03 T4mmi

There's likely old stuff lurking in the .git directory. Try git rm map2loop2-notebooks && rm -rf .git/modules/map2loop2-notebooks. Then change the .gitmodules entry back to map2loop2-notebooks and init submodules again. Or leave it as is, not sure it matters that much, haha

I will leave this open though, let me know if there are any more issues.

yohanderose avatar Mar 09 '21 09:03 yohanderose

I suspect there is indeed something lurking inthe .git directory but on the origin repo side 😢
even a fresh repo delete/clone/init keeps doing nothing ...

but the git submodule add https://github.com/Loop3D/map2loop2-notebooks notebooks that does add the submodule as you intended to (in the subdir notebooks) works which would make me think that the problem is "remote"

[edit] but maybe wait and see if someone else has the same issue to spend time on this, it might just be my setup that is messy :)

T4mmi avatar Mar 09 '21 09:03 T4mmi