On Tue, Aug 15, 2017 at 4:23 PM, Junio C Hamano <gitster@xxxxxxxxx> wrote: > Stefan Beller <sbeller@xxxxxxxxxx> writes: > >> "git push --recurse-submodules=on-demand" adds each submodule as an >> alternate with add_submodule_odb before checking whether the >> submodule has anything to push and pushing it if so. >> >> However, it never accesses any objects from the submodule. >> ... >> Use is_submodule_populated_gently instead, which is simpler and >> cheaper. >> >> Signed-off-by: Stefan Beller <sbeller@xxxxxxxxxx> >> --- >> >> Originally I intended to send this out as part of a larger series, >> but the series is getting too large series, sending all things in smaller >> units! > > This vaguely reminds me that you sent something imilar perhaps for a > different codepath. https://public-inbox.org/git/xmqqh8xzq6td.fsf@xxxxxxxxxxxxxxxxxxxxxxxxxxx/ > Is "is it populated" a good thing to check here, though? IIRC, > add-submodule-odb allows you to add the object database of an > inactivated submodule, so this seems to change the behaviour. I do > not know if the behaviour change is a good thing (i.e. bugfix) or > not (i.e. regression) offhand, though. Good point, we should be able to push non-populated, even inactive(?) submodules. For that we strictly need add_submodule_odb here (or the repo object of the submodule, eventually). So let's retract this patch for now. Thanks.