Skip to content

Migrate Restore-Changes: git stash pop with ShouldProcess #59

Description

@shmuelie

Part of #52. Depends on the shared git-invocation helper sub-issue.

Goal

Add a command to restore stashed changes (git stash pop) — ObjectiveGit's
Restore-Changes — modernized.

Modernize (do not port as-is)

  • ObjectiveGit runs git ... stash pop via Invoke-Expression. Use the shared
    helper with a git argument array.
  • Add [CmdletBinding(SupportsShouldProcess)]; honor -WhatIf/-Confirm (pop
    changes working-tree/index state and can conflict).
  • Cross-platform repository path handling; drop the magic exit-code / bug branch.
  • Consider a parameter to target a specific stash entry (optional enhancement
    beyond the original, which always popped the top).

Acceptance criteria

  • Exported from both the .psm1 and .psd1 export lists.
  • Comment-based help; SupportsShouldProcess honored.
  • Final command name uses an approved verb and fits the module surface (pairs
    naturally with the Backup-Changes replacement).
  • README command table + [Unreleased] CHANGELOG updated.
  • Deterministic Pester tests.
  • 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