mandrel 2.44.0 → 2.45.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -49,6 +49,19 @@ export function listLocalBranches(cwd) {
|
|
|
49
49
|
* Pure: strip the `<remote>/` prefix off a remote-ref listing and drop the
|
|
50
50
|
* symbolic `HEAD` entry.
|
|
51
51
|
*
|
|
52
|
+
* `HEAD` arrives under two spellings. `%(refname:lstrip=3)` renders
|
|
53
|
+
* `refs/remotes/origin/HEAD` as the literal `HEAD`, but
|
|
54
|
+
* `%(refname:short)` — what both callers ask for — shortens it to the bare
|
|
55
|
+
* remote name `origin`, because git keeps the remote segment only when the
|
|
56
|
+
* result would otherwise be ambiguous. Missing that second spelling leaked
|
|
57
|
+
* a phantom `origin` candidate into the remote-only sweep, which the reap
|
|
58
|
+
* phase then reported as `already gone`.
|
|
59
|
+
*
|
|
60
|
+
* Both spellings are rejected **before** the prefix strip, because the
|
|
61
|
+
* strip is what makes them ambiguous: a real branch named `origin` lists
|
|
62
|
+
* as `origin/origin` and strips to `origin` too. Discriminating on the raw
|
|
63
|
+
* line keeps that branch reapable while still dropping the symbolic ref.
|
|
64
|
+
*
|
|
52
65
|
* Shared by {@link listRemoteBranches} and {@link listRemoteMergedBranches}
|
|
53
66
|
* so both enumerations speak the same short-name vocabulary the planner's
|
|
54
67
|
* remote-only walk keys on — a divergence there would make the ancestry
|
|
@@ -64,8 +77,9 @@ function shortRemoteNames(stdout, remoteName) {
|
|
|
64
77
|
.split('\n')
|
|
65
78
|
.map((l) => l.trim())
|
|
66
79
|
.filter(Boolean)
|
|
80
|
+
.filter((l) => l !== 'HEAD' && l !== remoteName)
|
|
67
81
|
.map((l) => (l.startsWith(prefix) ? l.slice(prefix.length) : l))
|
|
68
|
-
.filter(
|
|
82
|
+
.filter(Boolean);
|
|
69
83
|
}
|
|
70
84
|
|
|
71
85
|
/* node:coverage ignore next */
|
package/docs/CHANGELOG.md
CHANGED
|
@@ -15,6 +15,13 @@ All notable changes to this project will be documented in this file.
|
|
|
15
15
|
-->
|
|
16
16
|
<!-- markdownlint-disable-file MD004 MD012 MD037 -->
|
|
17
17
|
|
|
18
|
+
## [2.45.0](https://github.com/dsj1984/mandrel/compare/mandrel-v2.44.0...mandrel-v2.45.0) (2026-09-07)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
### Fixed
|
|
22
|
+
|
|
23
|
+
* **git-cleanup:** drop the symbolic HEAD ref under its short spelling ([#5197](https://github.com/dsj1984/mandrel/issues/5197)) ([98802f6](https://github.com/dsj1984/mandrel/commit/98802f6ee49b699560ab7362815e054751f3024b))
|
|
24
|
+
|
|
18
25
|
## [2.44.0](https://github.com/dsj1984/mandrel/compare/mandrel-v2.43.0...mandrel-v2.44.0) (2026-09-07)
|
|
19
26
|
|
|
20
27
|
|
package/package.json
CHANGED