Skip to content

Commit 16080f0

Browse files
committed
Release v0.1.7: branch visibility helpers and inspection
1 parent 55afeb4 commit 16080f0

6 files changed

Lines changed: 1256 additions & 4 deletions

CHANGELOG.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,56 @@ All notable changes to this project are documented in this file.
44

55
The format is based on Keep a Changelog and the project uses Semantic Versioning.
66

7+
## [0.1.7] - 2026-04-20
8+
9+
### Added
10+
11+
- Enhanced not-merged branch inspection:
12+
- `Get-BranchesNotMergedToDevelopDetails` with author, unique-commit count, insertion/deletion stats, changed-file count, and truncated changed-file preview.
13+
- `gbnmdi` interactive browser (arrow-key navigation + Enter selection) with detail views:
14+
- `Commits` (default)
15+
- `Changes` (diff stat + name-status)
16+
- `Patch` (full patch output)
17+
- Extended `gbnmd` and `gbnmdr` with:
18+
- `-Detailed`
19+
- `-Interactive`
20+
- `-View Commits|Changes|Patch`
21+
- optional date filters: `-Since`, `-LastDays`
22+
- Integration test coverage for detailed not-merged branch output and branch-stability checks (current branch remains unchanged).
23+
24+
### Changed
25+
26+
- Not-merged branch data collection now keeps stable ref metadata (`Ref`, `BaseRef`) to support richer visual inspection without branch switching.
27+
- README expanded with interactive usage and enriched table examples for `gbnmd`/`gbnmdr`/`gbnmdi`.
28+
29+
### Fixed
30+
31+
- Windows PowerShell 5.1 import compatibility for BOM-less module sources:
32+
- mojibake detection now uses ASCII-only Unicode escape sequences in regex literals;
33+
- the module source remains ASCII-only to avoid ANSI parsing regressions.
34+
- `PSScriptAnalyzer` warning cleanup for `Convert-FromGitMojibake` by replacing an empty catch block with verbose diagnostic output.
35+
36+
## [0.1.6] - 2026-03-13
37+
38+
### Added
39+
40+
- Branch visibility helpers:
41+
- `Get-BranchesNotMergedToDevelop` with `-Since`, `-LastDays`, `-BaseBranch`, and `-RemoteOnly` parameters.
42+
- compatibility wrapper `Get-BranchesNotMergedToDevelopSinceDate`.
43+
- shortcut alias `gbnms` for `Get-BranchesNotMergedToDevelop`.
44+
- New branch aliases:
45+
- `gbnmd` -> `git branch --no-merged <base> --sort=-committerdate` (default base: `develop`)
46+
- `gbnmdr` -> same command with `-r`
47+
- `gbsc` -> `git branch --show-current`
48+
- Integration tests for:
49+
- `gbsc` current-branch output;
50+
- `gbnmd`/`gbnmdr` filtering and ordering;
51+
- date-based filtering (`Since`/`LastDays`) and remote-only behavior for `Get-BranchesNotMergedToDevelop`.
52+
53+
### Changed
54+
55+
- README documentation expanded with a dedicated section for not-merged branch helpers and usage examples.
56+
757
## [0.1.5] - 2026-03-04
858

959
### Changed

README.md

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,11 +105,82 @@ Branch completion (Tab) works for:
105105
- `gwt add <path> <TAB>`
106106
- `gwt add <path> -f <TAB>`
107107

108+
## Not merged branch helpers
109+
110+
Quick branch visibility shortcuts:
111+
112+
- `gbnmd [base-branch]` -> `git branch --no-merged <base-branch> --sort=-committerdate` (default base: `develop`)
113+
- `gbnmdr [base-branch]` -> same command with `-r` (remote branches only)
114+
- `gbnmdi [base-branch]` -> interactive branch browser (arrow keys + Enter)
115+
- `gbsc` -> `git branch --show-current`
116+
117+
Date-filtered helper:
118+
119+
```powershell
120+
Get-BranchesNotMergedToDevelop `
121+
[-Since <datetime>] `
122+
[-LastDays <int>] `
123+
[-BaseBranch <string>] `
124+
[-RemoteOnly]
125+
```
126+
127+
Detailed metadata helper:
128+
129+
```powershell
130+
Get-BranchesNotMergedToDevelopDetails `
131+
[-Since <datetime>] `
132+
[-LastDays <int>] `
133+
[-BaseBranch <string>] `
134+
[-RemoteOnly] `
135+
[-MaxFiles <int>]
136+
```
137+
138+
Notes:
139+
- if `-Since` is omitted and `-LastDays` is `0`, filtering starts from today (`(Get-Date).Date`);
140+
- if `-Since` is omitted and `-LastDays` is greater than `0`, filtering starts from `today - LastDays`;
141+
- no checkout/switch is performed; everything is computed from refs and diffs;
142+
- detailed output fields: `Date`, `Branch`, `Author`, `Commits`, `Insertions`, `Deletions`, `Files`, `FilesPreview`.
143+
144+
Examples:
145+
146+
```powershell
147+
# Since today
148+
Get-BranchesNotMergedToDevelop
149+
150+
# Since specific date/time
151+
Get-BranchesNotMergedToDevelop -Since '2026-03-12'
152+
Get-BranchesNotMergedToDevelop -Since '2026-03-12 15:30'
153+
154+
# Last 3 days
155+
Get-BranchesNotMergedToDevelop -LastDays 3
156+
157+
# Remote only
158+
Get-BranchesNotMergedToDevelop -Since '2026-03-12' -RemoteOnly
159+
160+
# Shortcut alias
161+
gbnms -LastDays 7 | Sort-Object Date -Descending
162+
163+
# Detailed table with author/commit/stats and truncated file list
164+
gbnmd -Detailed -Since '2026-03-12' -MaxFiles 5 |
165+
Format-Table -AutoSize
166+
167+
# Interactive mode (arrows + Enter)
168+
# View modes: Commits (default), Changes, Patch
169+
gbnmd -Interactive -View Commits
170+
gbnmdr -Interactive -View Changes
171+
gbnmdi -View Patch
172+
```
173+
108174
## Aliases
109175

110176
| Alias | Command | Source |
111177
| :---- | :------ | :----- |
112178
| gapt | git apply --3way @args | extra |
179+
| gbnmd | Show local branches not merged into `<base-branch>` (default `develop`); supports `-Detailed` and `-Interactive`. | extra |
180+
| gbnmdr | Show remote branches (`-r`) not merged into `<base-branch>` (default `develop`); supports `-Detailed` and `-Interactive`. | extra |
181+
| gbnmdi | Interactive branch browser for not-merged branches (`-View Commits|Changes|Patch`, `-RemoteOnly` supported). | extra |
182+
| gbnms | Alias -> Get-BranchesNotMergedToDevelop | extra |
183+
| gbsc | git branch --show-current @args | extra |
113184
| gccd | param([Parameter(ValueFromRemainingArguments=$true)][string[]]$rest) <br> git clone --recurse-submodules @rest <br> $last = if ($rest.Count) { $rest[-1] } else { '' } <br> if ($last -match '\.git$') { $last = $last -replace '\.git$','' } <br> if ($last) { <br> $dirName = Split-Path $last -Leaf <br> if (Test-Path $dirName) { <br> Set-Location $dirName <br> } <br> } | extra |
114185
| gcor | git checkout --recurse-submodules @args | extra |
115186
| gdct | git describe --tags (git rev-list --tags --max-count=1) | extra |

git-aliases-extra.psd1

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
@{
22
RootModule = 'git-aliases-extra.psm1'
3-
ModuleVersion = '0.1.5'
3+
ModuleVersion = '0.1.7'
44
GUID = 'a5c2859e-7dce-4853-9db5-8cb7927dbdda'
55
Author = 'PhysShell'
66
CompanyName = ''
@@ -45,9 +45,16 @@
4545
'gfp',
4646
'gsw',
4747
'gswc',
48+
'Get-BranchesNotMergedToDevelop',
49+
'Get-BranchesNotMergedToDevelopSinceDate',
50+
'Get-BranchesNotMergedToDevelopDetails',
51+
'gbnmd',
52+
'gbnmdr',
53+
'gbnmdi',
54+
'gbsc',
4855
'Register-GitAliasCompletion'
4956
)
50-
AliasesToExport = @('gum', 'gur', 'gh')
57+
AliasesToExport = @('gum', 'gur', 'gh', 'gbnms')
5158
CmdletsToExport = @()
5259
VariablesToExport = '*'
5360
RequiredModules = @(

0 commit comments

Comments
 (0)