Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions git-jaspr/src/test/kotlin/sims/michael/gitjaspr/GitJasprTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3419,10 +3419,18 @@ interface GitJasprTest {
}
)

remoteGit.deleteBranches(
listOf(buildRemoteRef("c"), buildRemoteRef("c_01")),
force = true,
)
// This could be cleaner. We need the remote branches gone so we can verify that
// getOrphanedBranches does a fetch w/prune before returning results. The mechanism to
// remove the remote branches depends on whether we're using a fake remote.
val remoteBranchesToRemove = listOf(buildRemoteRef("c"), buildRemoteRef("c_01"))
if (useFakeRemote) {
remoteGit.deleteBranches(remoteBranchesToRemove, force = true)
} else {
localGit.push(
remoteBranchesToRemove.map { name -> RefSpec(FORCE_PUSH_PREFIX, name) },
remoteName,
)
}

assertEquals(
listOf(buildRemoteRef("b"), buildRemoteRef("b_01")),
Expand Down
Loading