From f792266edb30a6aa51e041da8803a92d63750adc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Antonio=20Garc=C3=ADa?= <80903717+juanangp@users.noreply.github.com> Date: Tue, 13 Dec 2022 17:42:55 +0100 Subject: [PATCH] Adding --recursive to pull-submodules --- pull-submodules.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pull-submodules.py b/pull-submodules.py index 6c8ec6792..72004f906 100644 --- a/pull-submodules.py +++ b/pull-submodules.py @@ -193,7 +193,7 @@ def main(): # if 'force', override the changes with git reset if force: print("Forcing reset: ", end="") - p = subprocess.run(f"git submodule foreach 'git reset --hard'", # + p = subprocess.run(f"git submodule foreach --recursive 'git reset --hard'", # shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) if debug: print(p.stdout.decode("utf-8")) @@ -210,7 +210,7 @@ def main(): # if latest, pull the latest commit instead of the one recorded in the main repo if latest: print("Pulling submodules: ", end="") - p = subprocess.run(f"git submodule foreach 'git fetch; if [ -z \"$(git ls-remote --heads origin {frameworkBranchName})\" ]; then git checkout master; else git checkout {frameworkBranchName};fi;git pull'", # + p = subprocess.run(f"git submodule foreach --recursive 'git fetch; if [ -z \"$(git ls-remote --heads origin {frameworkBranchName})\" ]; then git checkout master; else git checkout {frameworkBranchName};fi;git pull'", # shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) if debug: print(p.stdout.decode("utf-8")) @@ -224,7 +224,7 @@ def main(): else: print("[\033[92m OK \x1b[0m]") # get commit id - p = subprocess.run(f"git submodule foreach 'git rev-parse HEAD'", # + p = subprocess.run(f"git submodule foreach --recursive 'git rev-parse HEAD'", # shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) print(p.stdout.decode("utf-8"))