archseer / enigma

An Erlang VM implementation in Rust
Mozilla Public License 2.0
1.05k stars 40 forks source link

Submodule failing to fetch unadvertised object #39

Open cgmcintyr opened 5 years ago

cgmcintyr commented 5 years ago

Seems a similar problem to #34

When I run git submodule update --init -depth 1 I get the following error:

Submodule 'otp' (https://github.com/erlang/otp) registered for path 'otp'
Cloning into '/home/cgm/devel/rust/enigma/otp'...
remote: Total 0 (delta 0), reused 0 (delta 0), pack-reused 0
error: Server does not allow request for unadvertised object 9c35d42191003d1325ad99189d7327f87c9f6fd4
Fetched in submodule path 'otp', but it did not contain 9c35d42191003d1325ad99189d7327f87c9f6fd4. Direct fetching of that commit failed.
cgmcintyr commented 5 years ago

One fix for this is to change the ignore setting in .gitmodules to all:

[submodule "otp"]
    path = otp
    url = https://github.com/erlang/otp
    ignore = all

This means you have to explicitly git add otp to add submodule changes to a commit - avoiding accidentally committing a submodule change.