From 882eaf4b29def08dcba880713bb6c448bb20c07f Mon Sep 17 00:00:00 2001
From: Markus Fleschutz <markus@fleschutz.de>
Date: Thu, 17 Jun 2021 08:10:44 +0200
Subject: [PATCH] Improve pull-repos.ps1 and switch-branch.ps1

---
 Scripts/pull-repos.ps1    | 2 +-
 Scripts/switch-branch.ps1 | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/Scripts/pull-repos.ps1 b/Scripts/pull-repos.ps1
index 0d02013e..0814a640 100755
--- a/Scripts/pull-repos.ps1
+++ b/Scripts/pull-repos.ps1
@@ -24,7 +24,7 @@ try {
 	foreach ($Folder in $Folders) {
 		$FolderName = (get-item "$Folder").Name
 		$Step++
-		"🢃 Pulling 📂$FolderName (step $Step/$FolderCount) ..."
+		"🢃 Pulling #$Step: 📂$FolderName ..."
 
 		& git -C "$Folder" pull --recurse-submodules --jobs=4
 		if ($lastExitCode -ne "0") { write-warning "'git pull' on 📂$FolderName failed" }
diff --git a/Scripts/switch-branch.ps1 b/Scripts/switch-branch.ps1
index c17fd639..52433bd7 100755
--- a/Scripts/switch-branch.ps1
+++ b/Scripts/switch-branch.ps1
@@ -24,10 +24,10 @@ try {
 	& git fetch --all --recurse-submodules --jobs=4
 	if ($lastExitCode -ne "0") { throw "'git fetch -all --recurse-submodules' failed" }
 
-	& git switch "$BranchName"
+	& git checkout --recurse-submodules "$BranchName"
 	if ($lastExitCode -ne "0") { throw "'git switch $BranchName' failed" }
 
-	& git pull  
+	& git pull --recurse-submodules
 	if ($lastExitCode -ne "0") { throw "'git pull' failed" }
 
 	& git submodule update --init --recursive