threads / discuss / 57069

[RFE] git submodule foreach where initialized

Subject: [RFE] git submodule foreach where initialized

## tl;dr

One message between Dec 11, 2021 and Dec 11, 2021.

replies: 0people: 1as markdown or json

rsbecker@nexbridge.com· Dec 11, 2021, 18:32 UTC · lore
Hi All,

I have hit an edge condition that I think may need a command option. When cloning, we sometimes ignore a specific submodule (because we don't need it on the platform we are building in this case).

The git submodule foreach command reports an error: fatal: No url found for submodule path 'sub1' in .gitmodules

In our situation, this can be bypassed because we don't care about sub1. My thought is that some option like --init-only or --ignore-uninit might be useful to bypass this condition and allow the foreach to run on all valid submodules. Does that make sense?

Regards, Randall

← back to recent threads