project.py: pass --recurse-submodules={value}

If submodules is False, explicitly pass '=no'.  Uninitialized submodules
may cause the default option to fail.

Change-Id: Ia00bcba5b69c4b65195f4c469c686a3ef9a4a3ad
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/330159
Reviewed-by: Xin Li <delphij@google.com>
Tested-by: LaMont Jones <lamontjones@google.com>
This commit is contained in:
LaMont Jones 2022-02-10 17:34:36 +00:00
parent 8e91248655
commit adaa1d8734

View File

@ -2142,8 +2142,7 @@ class Project(object):
if prune:
cmd.append('--prune')
if submodules:
cmd.append('--recurse-submodules=on-demand')
cmd.append(f'--recurse-submodules={"on-demand" if submodules else "no"}')
spec = []
if not current_branch_only: