Oxymoron
Oxymoron

Reputation: 1452

git submodule 3 layers deep

So I've been using git submodules, and when I get more than 3 layers deep I start getting bad objects. Directories aren't exceeding 200 characters. I get the following errors:

user@USER-LT /C/Dev/Active/ABC.NET/ABC.NET.WholeSale/ABC.NET.WholeSale.Service/ABC.NET.Providers (master)
$ git status
fatal: bad object HEAD
fatal: 'git status --porcelain' failed in submodule Vendors/freshbooks.NET

Directory is as follows:


ABC.NET.Wholesale (Parent Project)
    |
    |-> ABC.NET.WholeSale.Service (Submodule to parent project)
    |    |
    |    |-> ABC.NET.Service.Configuration (SubModule to service)
    |    |
    |    |-> ABC.NET.WholeSale.Data (SubModule to Service)
    |    |    |
    |    |    |-> ABC.NET.Core (Submodule to data project)
    |    |
    |    |-> ABC.NET.Providers (Submodule to Service project)
    |         |
    |         |->Vendors (Folder)
    |              |
    |              |-> freshbooks.NET (submodule to providers project)
    |
    |-> ABC.NET.WholeSale.Web (Submodule to parent project)
         |
         |-> ABC.NET.Core (Submodule to Web project) [same as the one to data project]

              ^
              |-Everything past this level gets the error message
                (ABC.NET.Core & freshbooks.NET)

What's going on here? Is there something I'm doing wrong? Any insite would be appreciated

Moving the parent project & directory structure to the root of the hard drive seems to allow me to continue working. What is the maximum limit to directory path?

Upvotes: 0

Views: 313

Answers (1)

Oxymoron
Oxymoron

Reputation: 1452

Turns out it was really the path being too long, To fix this I changed the name of the directories in which the submodules was cloned, editing the .git file in each submodule directory and going into the root .git/modules/submodule and editing the name of the new directories there aswell.

Upvotes: 1

Related Questions