Skip to content

Commit 2c37f07

Browse files
committed
[update-checkout] Only use the default-branch-scheme when cloning.
We want to allow for people to use update-checkout to just update branches even in the case where they are not using a scheme (for instance if they have a side branch). This means though that one can still clone and get all of the appropriate repos/branches. The only unfortunate thing about this change is that when cloning, already cloned repositories that already are setup to a branch will have their branch changed. It would be good at some point to separate updating from cloning. It would make update-checkout much cleaner.
1 parent cf3fdff commit 2c37f07

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

utils/update-checkout

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -196,12 +196,12 @@ By default, updates your checkouts of Swift, SourceKit, LLDB, and SwiftPM.""")
196196
config = json.load(f)
197197
validate_config(config)
198198

199-
# If branch is None, default to using the default branch alias specified by
200-
# our configuration file.
201-
if scheme is None:
202-
scheme = config['default-branch-scheme']
203-
204199
if clone or clone_with_ssh:
200+
# If branch is None, default to using the default branch alias specified by
201+
# our configuration file.
202+
if scheme is None:
203+
scheme = config['default-branch-scheme']
204+
205205
obtain_additional_swift_sources(
206206
config, clone_with_ssh, scheme, skip_history,
207207
args.skip_repository_list)

0 commit comments

Comments
 (0)