You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Part of #52. Depends on the shared git-invocation helper sub-issue.
Goal
Add a Get-Branch command to Shmuelie.Git that lists local and remote
branches with tracking info, emitting a typed object — modernizing
ObjectiveGit's Get-Branch.
Return a typed object (like Get-Worktrees / Get-GitStatusSummary), not an
ad-hoc PSCustomObject shape.
Cross-platform repository path handling (no '.\' string default; use Join-Path/[System.IO.Path]).
Suggested shape
Per-branch: name, whether current, commit hash, upstream/tracks, ahead/behind,
symbolic target (for HEAD -> ...), local vs remote, last commit subject.
Acceptance criteria
Exported from both the .psm1Export-ModuleMember list and the .psd1 FunctionsToExport list.
Comment-based help.
Uses the shared git-invocation helper; no Invoke-Expression.
Part of #52. Depends on the shared git-invocation helper sub-issue.
Goal
Add a
Get-Branchcommand toShmuelie.Gitthat lists local and remotebranches with tracking info, emitting a typed object — modernizing
ObjectiveGit's
Get-Branch.Modernize (do not port as-is)
git branch --no-color -vv --no-abbrev(and-r) with astack of fragile regexes. Replace with a machine-readable format:
git for-each-ref --format=...(or--porcelain-style), consistent with thehardening in Harden git output parsing: porcelain rename/quotePath (tab completion) and locale-dependent fetch classification #33 (handle
quotePath/rename/unusual ref names).Get-Worktrees/Get-GitStatusSummary), not anad-hoc
PSCustomObjectshape.'.\'string default; useJoin-Path/[System.IO.Path]).Suggested shape
Per-branch: name, whether current, commit hash, upstream/tracks, ahead/behind,
symbolic target (for
HEAD -> ...), local vs remote, last commit subject.Acceptance criteria
.psm1Export-ModuleMemberlist and the.psd1FunctionsToExportlist.Invoke-Expression.modules/Shmuelie.Git/CHANGELOG.md[Unreleased]updated.
$TestDrivetemp repoonly where needed).
build/Test-Modules.ps1andbuild/Invoke-Tests.ps1pass.