enigma icon indicating copy to clipboard operation
enigma copied to clipboard

Submodule failing to fetch unadvertised object

Open cgmcintyr opened this issue 4 years ago • 1 comments

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 avatar Oct 20 '19 22:10 cgmcintyr

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.

cgmcintyr avatar Oct 20 '19 22:10 cgmcintyr