Skip to content

Commit b8282ef

Browse files
Cleanup: Reduce Redundant Comment
1 parent bad92f0 commit b8282ef

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
## (upcoming release >= 1.7.3)
44

55
* Fix: Restore script showed success when git checkout failed
6+
* Refactor: Restore script
67

78
## 1.7.2: 2026-03-02
89

scripts/restore/Restore-Dependencies.ps1

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -406,10 +406,11 @@ function CloneRepository($projectFilesGitInfo, $dependedProjects, $CloneDir, $Cl
406406
$CheckOutTarget = $($dependedProject.Branch) # If the CloneModeHash is false (default), use the Branch
407407
}
408408

409+
# For git-version >=2.23, use the 'switch' command for branch-restore
409410
if ((& git --version) -ge 'git version 2.23' -and $CloneModeHash -eq $false ) {
410-
$CheckOutMethod = "switch" # If the Git version is 2.23 or higher, use the 'switch' command
411+
$CheckOutMethod = "switch"
411412
} else {
412-
$CheckOutMethod = "checkout" # If the Git version is 2.23 or higher, use the 'switch' command
413+
$CheckOutMethod = "checkout"
413414
}
414415

415416
# Let's do the git checkout

0 commit comments

Comments
 (0)