]> git.99rst.org Git - git.git/commit
branch: improve advice when --recurse-submodules fails
authorPhilippe Blain <redacted>
Mon, 16 Jan 2023 17:41:48 +0000 (17:41 +0000)
committerJunio C Hamano <redacted>
Wed, 18 Jan 2023 23:13:21 +0000 (15:13 -0800)
commit97cf0c7de5dd49d9b518ebe694036159f6515422
treea31e74bf1e2acadbf9b852d810a2174351da1a27
parenta7caae2729742fc80147bca1c02ae848cb55921a
branch: improve advice when --recurse-submodules fails

'git branch --recurse-submodules start from-here' fails if any submodule
present in 'from-here' is not yet cloned (under
submodule.propagateBranches=true). We then give this advice:

   "You may try updating the submodules using 'git checkout from-here && git submodule update --init'"

If 'submodule.recurse' is set, 'git checkout from-here' will also fail since
it will try to recursively checkout the submodules.

Improve the advice by adding '--no-recurse-submodules' to the checkout
command.

Signed-off-by: Philippe Blain <redacted>
Reviewed-by: Glen Choo <redacted>
Signed-off-by: Junio C Hamano <redacted>
branch.c
git clone https://git.99rst.org/PROJECT