Skip to content

Commit 829ff3d

Browse files
committed
[gardening] cd into SWIFT_SOURCE_ROOT once for all directories, instead of for each directory.
NFC.
1 parent 9a6e4f6 commit 829ff3d

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

utils/update-checkout

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,14 @@ def update_working_copy(repo_path, branch):
5858

5959
def obtain_additional_swift_sources(
6060
config, with_ssh, branch, skip_history, skip_repositories):
61-
for dir_name, repo_info in config['repositories'].items():
62-
repo = repo_info['name']
63-
if dir_name in skip_repositories:
64-
print("--- Skipping '" + dir_name + "' ---")
65-
continue
66-
with shell.pushd(SWIFT_SOURCE_ROOT, dry_run=False,
67-
echo=False):
61+
with shell.pushd(SWIFT_SOURCE_ROOT, dry_run=False,
62+
echo=False):
63+
for dir_name, repo_info in config['repositories'].items():
64+
repo = repo_info['name']
65+
if dir_name in skip_repositories:
66+
print("--- Skipping '" + dir_name + "' ---")
67+
continue
68+
6869
if not os.path.isdir(os.path.join(dir_name, ".git")):
6970
print("--- Cloning '" + dir_name + "' ---")
7071

0 commit comments

Comments
 (0)