Skip to content

Migrate Remove-Branch: delete local/remote branch with high-impact ShouldProcess #57

Description

@shmuelie

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    blockedCannot proceed until another issue or dependency is resolvedenhancementNew feature or requestmodule:gitChanges to Shmuelie.Gittheme:migrationMigration or modernization of an existing implementation

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions