Skip to content

Commit 0dea69f

Browse files
committed
Minor fixes during peer review
1 parent d67d53b commit 0dea69f

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

git-release.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ if (-not $force) {
3939
Assert-Diagnostics $diagnostics
4040
}
4141

42-
# $toRemove = (git show-upstream $source -recurse) without ($target, git show-upstream $target -recurse)
42+
# $toRemove = (git show-upstream $source -recurse) without ($target, git show-upstream $target -recurse, $preserve)
4343
$sourceUpstream = Invoke-LocalAction @commonParams @{
4444
type = 'get-upstream'
4545
parameters = @{ target = $source; recurse = $true }
@@ -52,8 +52,8 @@ $targetUpstream = Invoke-LocalAction @commonParams @{
5252
}
5353
Assert-Diagnostics $diagnostics
5454

55-
$keep = @($target) + $targetUpstream
56-
[string[]]$toRemove = (@($source) + $sourceUpstream) | Where-Object { $_ -notin $keep -and $_ -notin $preserve }
55+
[string[]]$keep = @($target) + $targetUpstream + $preserve
56+
[string[]]$toRemove = (@($source) + $sourceUpstream) | Where-Object { $_ -notin $keep }
5757

5858
# Assert all branches removed are up-to-date, unless $force is set
5959
if (-not $force) {

git-release.tests.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ Describe 'git-release' {
8282
$fw.assertDiagnosticOutput | Should -Contain 'ERR: The branch feature/FOO-123 has changes that are not in rc/2022-07-14'
8383
}
8484

85-
It 'allows forced removal even if an intermediate branches were not fully released' {
85+
It 'allows forced removal even if a intermediate branches were not fully released' {
8686
Initialize-AllUpstreamBranches @{
8787
'rc/2022-07-14' = @("feature/FOO-123","feature/XYZ-1-services")
8888
'feature/FOO-123' = @('main')

0 commit comments

Comments
 (0)