Part of #52. Depends on the shared git-invocation helper sub-issue.
Goal
Add a command to delete a local or remote branch (ObjectiveGit's
Remove-Branch), with -Force and -Remote — modernized.
Modernize (do not port as-is)
- ObjectiveGit builds the command string and runs it via
Invoke-Expression.
Use the shared helper with a git argument array.
- This is destructive: add
[CmdletBinding(SupportsShouldProcess, ConfirmImpact='High')] and honor -WhatIf/-Confirm.
- Cross-platform repository path handling.
- Drop the magic exit-code / "Bug with ObjectiveGit" branch (helper handles it).
Acceptance criteria
- Exported from both the
.psm1 and .psd1 export lists.
- Comment-based help; high-impact
SupportsShouldProcess honored.
- Final command name uses an approved verb and fits the module surface.
- README command table +
[Unreleased] CHANGELOG updated.
- Deterministic Pester tests (e.g.
$TestDrive repo with a throwaway branch;
assert -WhatIf does not delete).
build/Test-Modules.ps1 and build/Invoke-Tests.ps1 pass.
Part of #52. Depends on the shared git-invocation helper sub-issue.
Goal
Add a command to delete a local or remote branch (ObjectiveGit's
Remove-Branch), with-Forceand-Remote— modernized.Modernize (do not port as-is)
Invoke-Expression.Use the shared helper with a git argument array.
[CmdletBinding(SupportsShouldProcess, ConfirmImpact='High')]and honor-WhatIf/-Confirm.Acceptance criteria
.psm1and.psd1export lists.SupportsShouldProcesshonored.[Unreleased]CHANGELOG updated.$TestDriverepo with a throwaway branch;assert
-WhatIfdoes not delete).build/Test-Modules.ps1andbuild/Invoke-Tests.ps1pass.