clone: do not let --depth imply --shallow-submodules
authorJunio C Hamano <gitster@pobox.com>
Sun, 19 Jun 2016 20:51:56 +0000 (13:51 -0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 20 Jun 2016 18:35:28 +0000 (11:35 -0700)
In v2.9.0, we prematurely flipped the default to force cloning
submodules shallowly, when the superproject is getting cloned
shallowly. This is likely to fail when the upstream repositories
submodules are cloned from a repository that is not prepared to
serve histories that ends at a commit that is not at the tip of a
branch, and we know the world is not yet ready.

Use a safer default to clone the submodules fully, unless the user
tells us that she knows that the upstream repository of the
submodules are willing to cooperate with "--shallow-submodules"
option.

Noticed-by: Vadim Eisenberg <VADIME@il.ibm.com>
Helped-by: Jeff King <peff@peff.net>
Helped-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
No differences found