worktree-bay 4.0.0 → 4.0.1
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.
- package/dist/commands/add.js +2 -0
- package/package.json +1 -1
package/dist/commands/add.js
CHANGED
|
@@ -35,6 +35,8 @@ export async function addCommand(cfg, feature, service, branch, base) {
|
|
|
35
35
|
}
|
|
36
36
|
catch (e) {
|
|
37
37
|
const m = String(e.message);
|
|
38
|
+
if (/not a valid branch name|cannot be used as a branch name/i.test(m)) // 分支名不合法(先于 base 判,二者都含 "not a valid")
|
|
39
|
+
throw new Error(t(`分支名「${br}」不合法:git 分支名不能以 / 开头或结尾、不能含 // 或 ..。换一个,如 fix/log(去掉前导斜杠)。`, `invalid branch name "${br}": git branch names can't start/end with "/" or contain "//" or "..". Use e.g. fix/log (no leading slash).`));
|
|
38
40
|
if (/invalid reference|unknown revision|ambiguous argument|not a valid|Not a valid object name/i.test(m))
|
|
39
41
|
throw new Error(t(`基分支「${resolvedBase}」无效(该仓可能没有 origin 或对应主分支)。给 add 显式传 base,例如:worktree-bay add ${feature} ${service} ${br} HEAD`, `invalid base ref "${resolvedBase}" (this repo may have no origin or main branch). Pass an explicit base to add, e.g.: worktree-bay add ${feature} ${service} ${br} HEAD`));
|
|
40
42
|
throw e;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "worktree-bay",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.1",
|
|
4
4
|
"description": "Per-feature git worktree + port slots for parallel multi-service development: auto deps, env wiring, frontend-to-backend, merge-aware reclaim, plus an MCP server for AI agents.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"git",
|