@moberg_hr/work-tree 2.0.7 → 2.0.9
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/{answer-AX2VHEXS.js → answer-QQAEJ5N3.js} +4 -4
- package/dist/{attach-WLJVKXOJ.js → attach-XG3Y7QA7.js} +6 -6
- package/dist/bin.js +2 -2
- package/dist/{block-NZJC7GVM.js → block-WW4BWDN7.js} +5 -5
- package/dist/{broadcast-JPVHPQ6Y.js → broadcast-LEOMDVSA.js} +2 -2
- package/dist/{catchup-RUNKM6ZH.js → catchup-UBHGEMED.js} +7 -7
- package/dist/{chunk-IOO2OAUC.js → chunk-3R4HBEIG.js} +6 -6
- package/dist/{chunk-KZQDONTU.js → chunk-45XJ4JGE.js} +12 -5
- package/dist/chunk-45XJ4JGE.js.map +1 -0
- package/dist/{chunk-5RRKVAIZ.js → chunk-4KZBZA5D.js} +3 -2
- package/dist/chunk-4KZBZA5D.js.map +1 -0
- package/dist/{chunk-QWIGFAKZ.js → chunk-4MXWNDH7.js} +6 -5
- package/dist/chunk-4MXWNDH7.js.map +1 -0
- package/dist/{chunk-CNFPZVNO.js → chunk-5PAPD6VT.js} +6 -2
- package/dist/chunk-5PAPD6VT.js.map +1 -0
- package/dist/{chunk-EK3WRCQX.js → chunk-6AULWNAN.js} +3 -3
- package/dist/{chunk-UI5MPBIH.js → chunk-73J2ZJA6.js} +3 -3
- package/dist/{chunk-ES3KY6YT.js → chunk-7IZW6GLY.js} +2 -2
- package/dist/chunk-B6V6SV2F.js +9 -0
- package/dist/{chunk-DH2PLKCW.js → chunk-BIL3S6XH.js} +4 -4
- package/dist/{chunk-7Z2USU3A.js → chunk-BZA7NKWU.js} +2 -2
- package/dist/{chunk-DUUH6FPH.js → chunk-G5PN5NIS.js} +28 -4
- package/dist/chunk-G5PN5NIS.js.map +1 -0
- package/dist/{chunk-J2ZJ2DIJ.js → chunk-GJDXEHII.js} +2 -2
- package/dist/{chunk-HB2I7GF7.js → chunk-H2NVIZ3M.js} +3 -3
- package/dist/{chunk-65DPISNE.js → chunk-HLXEMPEI.js} +2 -2
- package/dist/{chunk-VICXQQ5X.js → chunk-I5CDLVJY.js} +6 -6
- package/dist/{chunk-CK2QC2UF.js → chunk-IC5PFQCV.js} +2 -2
- package/dist/{chunk-6HDVRMCX.js → chunk-ICVR5M6W.js} +4 -4
- package/dist/{chunk-ED7E2WKK.js → chunk-JYWCNLZN.js} +2 -2
- package/dist/{chunk-LZHCTPBF.js → chunk-KLK6O54M.js} +3 -3
- package/dist/chunk-L6RUHCKB.js +78 -0
- package/dist/chunk-L6RUHCKB.js.map +1 -0
- package/dist/{chunk-67IZNVDI.js → chunk-LXM7QFBK.js} +2 -2
- package/dist/{chunk-YXTJVPOI.js → chunk-OP5ZIVXO.js} +42 -42
- package/dist/{chunk-HZEYGMYK.js → chunk-P2U6R35K.js} +3 -3
- package/dist/{chunk-LDCY457K.js → chunk-PDF3BZZH.js} +3 -3
- package/dist/{chunk-K3ESY6OJ.js → chunk-QKGZ65TC.js} +3 -3
- package/dist/{chunk-QDNCUUNQ.js → chunk-QP6LFMMK.js} +28 -20
- package/dist/chunk-QP6LFMMK.js.map +1 -0
- package/dist/{chunk-N23HFT4X.js → chunk-SDE3BZ6P.js} +244 -54
- package/dist/chunk-SDE3BZ6P.js.map +1 -0
- package/dist/{chunk-YCDULFF5.js → chunk-SIHAOB4F.js} +3 -3
- package/dist/{chunk-MODMK7WQ.js → chunk-ULQQ6SXT.js} +3 -3
- package/dist/{chunk-R7BXN427.js → chunk-UNLBHYA5.js} +2 -2
- package/dist/{chunk-M2QL43DS.js → chunk-UPR2F7QP.js} +4 -4
- package/dist/{chunk-QQJF4R6J.js → chunk-WB2BP2G5.js} +2 -2
- package/dist/{chunk-6GCF2XWP.js → chunk-WTR5BUGS.js} +20 -1
- package/dist/chunk-WTR5BUGS.js.map +1 -0
- package/dist/{chunk-WQMY4AJR.js → chunk-WUWED3LV.js} +2 -2
- package/dist/{cleanup-YVQOAMSK.js → cleanup-AEZKR7Q3.js} +16 -15
- package/dist/{cleanup-YVQOAMSK.js.map → cleanup-AEZKR7Q3.js.map} +1 -1
- package/dist/{cli-VSCHBZRS.js → cli-73A5TR5V.js} +3 -3
- package/dist/{config-4W5MMHLU.js → config-RF2S4YBA.js} +6 -6
- package/dist/{diff-IDF3K74H.js → diff-2PPFXZD6.js} +4 -4
- package/dist/{digest-AXSMYBYS.js → digest-5CRGAAK5.js} +4 -4
- package/dist/{fork-ZBEMNEPA.js → fork-W5ZF62UP.js} +15 -13
- package/dist/{fork-ZBEMNEPA.js.map → fork-W5ZF62UP.js.map} +1 -1
- package/dist/{hook-QMW5HHNP.js → hook-U37AFPKY.js} +4 -4
- package/dist/{hydrate-XMHHC5EG.js → hydrate-MAFHTY2W.js} +2 -2
- package/dist/{init-J2AB37DO.js → init-CJDDD4AS.js} +6 -6
- package/dist/{move-O7NEJZQV.js → move-6J35JMFB.js} +11 -8
- package/dist/move-6J35JMFB.js.map +1 -0
- package/dist/{note-C4RNIDRJ.js → note-TNC633NG.js} +4 -4
- package/dist/{overlaps-SKKGH6EG.js → overlaps-NZL5XFC4.js} +5 -5
- package/dist/{pin-TJBCJGPQ.js → pin-E53PGMGD.js} +4 -4
- package/dist/{pr-AC44DGJY.js → pr-CBLU6UJ2.js} +5 -5
- package/dist/{prune-NQOVBIFT.js → prune-FKNNOITA.js} +15 -14
- package/dist/{prune-NQOVBIFT.js.map → prune-FKNNOITA.js.map} +1 -1
- package/dist/{pty-host-MQSUN6EI.js → pty-host-36Y4XSPP.js} +14 -7
- package/dist/pty-host-36Y4XSPP.js.map +1 -0
- package/dist/{read-NU4WZ3J5.js → read-ESOOJSBO.js} +4 -4
- package/dist/{recent-ZW4WDGCK.js → recent-3WYFF36X.js} +2 -2
- package/dist/{remove-JESX7RCN.js → remove-2CQ4MRSI.js} +14 -13
- package/dist/{remove-JESX7RCN.js.map → remove-2CQ4MRSI.js.map} +1 -1
- package/dist/{resume-SLNE75JO.js → resume-NDE6NKKT.js} +2 -2
- package/dist/{run-MD77Z2BV.js → run-UW4BJCSC.js} +2 -2
- package/dist/{screen-RCUGD52V.js → screen-5BLTXIKS.js} +4 -4
- package/dist/{search-5GK5HL4Y.js → search-MK6R5VR6.js} +2 -2
- package/dist/{section-OAMRNSO7.js → section-B4BWRY7K.js} +4 -4
- package/dist/{send-TT6U64HQ.js → send-OT3OXHHW.js} +5 -5
- package/dist/{sessions-T6UXM2OX.js → sessions-6BBMLMPQ.js} +12 -10
- package/dist/{sessions-T6UXM2OX.js.map → sessions-6BBMLMPQ.js.map} +1 -1
- package/dist/{snooze-DBJJD6ZM.js → snooze-A2BVEYWD.js} +4 -4
- package/dist/{start-2KUDSMBM.js → start-LEYVJWZG.js} +4 -4
- package/dist/{status-S3NZTRG3.js → status-AO653RKW.js} +2 -2
- package/dist/{stop-KJHXWYZ2.js → stop-QYIRUR5Y.js} +4 -4
- package/dist/{sync-E4CU4IHG.js → sync-FE3AEVOP.js} +15 -14
- package/dist/{sync-E4CU4IHG.js.map → sync-FE3AEVOP.js.map} +1 -1
- package/dist/{time-MWABXPA6.js → time-4V56YERF.js} +5 -5
- package/dist/{tree-RAN6SQKW.js → tree-PA7BK7F6.js} +11 -10
- package/dist/{tree-RAN6SQKW.js.map → tree-PA7BK7F6.js.map} +1 -1
- package/dist/{update-5DM5V2E3.js → update-EISQJXEI.js} +7 -7
- package/dist/{wait-JZIJB6P6.js → wait-FW7RARBV.js} +5 -5
- package/dist/wd-bin.js +2 -2
- package/dist/web/assets/PtyView-Eh_9_oeq.js +90 -0
- package/dist/web/assets/PtyView-Eh_9_oeq.js.map +1 -0
- package/dist/web/assets/index-9lt7iidI.css +1 -0
- package/dist/web/assets/index-NvjFIXGV.js +118 -0
- package/dist/web/assets/index-NvjFIXGV.js.map +1 -0
- package/dist/web/index.html +2 -2
- package/dist/{web-EUI5U2H4.js → web-EORTIDIA.js} +88 -69
- package/dist/web-EORTIDIA.js.map +1 -0
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
- package/dist/chunk-5RRKVAIZ.js.map +0 -1
- package/dist/chunk-6GCF2XWP.js.map +0 -1
- package/dist/chunk-C4LRHXEB.js +0 -9
- package/dist/chunk-CNFPZVNO.js.map +0 -1
- package/dist/chunk-DUUH6FPH.js.map +0 -1
- package/dist/chunk-KZQDONTU.js.map +0 -1
- package/dist/chunk-N23HFT4X.js.map +0 -1
- package/dist/chunk-QDNCUUNQ.js.map +0 -1
- package/dist/chunk-QWIGFAKZ.js.map +0 -1
- package/dist/move-O7NEJZQV.js.map +0 -1
- package/dist/pty-host-MQSUN6EI.js.map +0 -1
- package/dist/web/assets/PtyView-Ci395OL2.js +0 -90
- package/dist/web/assets/PtyView-Ci395OL2.js.map +0 -1
- package/dist/web/assets/index-D-_oxT3O.css +0 -1
- package/dist/web/assets/index-DjdfILvB.js +0 -118
- package/dist/web/assets/index-DjdfILvB.js.map +0 -1
- package/dist/web-EUI5U2H4.js.map +0 -1
- /package/dist/{answer-AX2VHEXS.js.map → answer-QQAEJ5N3.js.map} +0 -0
- /package/dist/{attach-WLJVKXOJ.js.map → attach-XG3Y7QA7.js.map} +0 -0
- /package/dist/{block-NZJC7GVM.js.map → block-WW4BWDN7.js.map} +0 -0
- /package/dist/{broadcast-JPVHPQ6Y.js.map → broadcast-LEOMDVSA.js.map} +0 -0
- /package/dist/{catchup-RUNKM6ZH.js.map → catchup-UBHGEMED.js.map} +0 -0
- /package/dist/{chunk-IOO2OAUC.js.map → chunk-3R4HBEIG.js.map} +0 -0
- /package/dist/{chunk-EK3WRCQX.js.map → chunk-6AULWNAN.js.map} +0 -0
- /package/dist/{chunk-UI5MPBIH.js.map → chunk-73J2ZJA6.js.map} +0 -0
- /package/dist/{chunk-ES3KY6YT.js.map → chunk-7IZW6GLY.js.map} +0 -0
- /package/dist/{chunk-C4LRHXEB.js.map → chunk-B6V6SV2F.js.map} +0 -0
- /package/dist/{chunk-DH2PLKCW.js.map → chunk-BIL3S6XH.js.map} +0 -0
- /package/dist/{chunk-7Z2USU3A.js.map → chunk-BZA7NKWU.js.map} +0 -0
- /package/dist/{chunk-J2ZJ2DIJ.js.map → chunk-GJDXEHII.js.map} +0 -0
- /package/dist/{chunk-HB2I7GF7.js.map → chunk-H2NVIZ3M.js.map} +0 -0
- /package/dist/{chunk-65DPISNE.js.map → chunk-HLXEMPEI.js.map} +0 -0
- /package/dist/{chunk-VICXQQ5X.js.map → chunk-I5CDLVJY.js.map} +0 -0
- /package/dist/{chunk-CK2QC2UF.js.map → chunk-IC5PFQCV.js.map} +0 -0
- /package/dist/{chunk-6HDVRMCX.js.map → chunk-ICVR5M6W.js.map} +0 -0
- /package/dist/{chunk-ED7E2WKK.js.map → chunk-JYWCNLZN.js.map} +0 -0
- /package/dist/{chunk-LZHCTPBF.js.map → chunk-KLK6O54M.js.map} +0 -0
- /package/dist/{chunk-67IZNVDI.js.map → chunk-LXM7QFBK.js.map} +0 -0
- /package/dist/{chunk-YXTJVPOI.js.map → chunk-OP5ZIVXO.js.map} +0 -0
- /package/dist/{chunk-HZEYGMYK.js.map → chunk-P2U6R35K.js.map} +0 -0
- /package/dist/{chunk-LDCY457K.js.map → chunk-PDF3BZZH.js.map} +0 -0
- /package/dist/{chunk-K3ESY6OJ.js.map → chunk-QKGZ65TC.js.map} +0 -0
- /package/dist/{chunk-YCDULFF5.js.map → chunk-SIHAOB4F.js.map} +0 -0
- /package/dist/{chunk-MODMK7WQ.js.map → chunk-ULQQ6SXT.js.map} +0 -0
- /package/dist/{chunk-R7BXN427.js.map → chunk-UNLBHYA5.js.map} +0 -0
- /package/dist/{chunk-M2QL43DS.js.map → chunk-UPR2F7QP.js.map} +0 -0
- /package/dist/{chunk-QQJF4R6J.js.map → chunk-WB2BP2G5.js.map} +0 -0
- /package/dist/{chunk-WQMY4AJR.js.map → chunk-WUWED3LV.js.map} +0 -0
- /package/dist/{cli-VSCHBZRS.js.map → cli-73A5TR5V.js.map} +0 -0
- /package/dist/{config-4W5MMHLU.js.map → config-RF2S4YBA.js.map} +0 -0
- /package/dist/{diff-IDF3K74H.js.map → diff-2PPFXZD6.js.map} +0 -0
- /package/dist/{digest-AXSMYBYS.js.map → digest-5CRGAAK5.js.map} +0 -0
- /package/dist/{hook-QMW5HHNP.js.map → hook-U37AFPKY.js.map} +0 -0
- /package/dist/{hydrate-XMHHC5EG.js.map → hydrate-MAFHTY2W.js.map} +0 -0
- /package/dist/{init-J2AB37DO.js.map → init-CJDDD4AS.js.map} +0 -0
- /package/dist/{note-C4RNIDRJ.js.map → note-TNC633NG.js.map} +0 -0
- /package/dist/{overlaps-SKKGH6EG.js.map → overlaps-NZL5XFC4.js.map} +0 -0
- /package/dist/{pin-TJBCJGPQ.js.map → pin-E53PGMGD.js.map} +0 -0
- /package/dist/{pr-AC44DGJY.js.map → pr-CBLU6UJ2.js.map} +0 -0
- /package/dist/{read-NU4WZ3J5.js.map → read-ESOOJSBO.js.map} +0 -0
- /package/dist/{recent-ZW4WDGCK.js.map → recent-3WYFF36X.js.map} +0 -0
- /package/dist/{resume-SLNE75JO.js.map → resume-NDE6NKKT.js.map} +0 -0
- /package/dist/{run-MD77Z2BV.js.map → run-UW4BJCSC.js.map} +0 -0
- /package/dist/{screen-RCUGD52V.js.map → screen-5BLTXIKS.js.map} +0 -0
- /package/dist/{search-5GK5HL4Y.js.map → search-MK6R5VR6.js.map} +0 -0
- /package/dist/{section-OAMRNSO7.js.map → section-B4BWRY7K.js.map} +0 -0
- /package/dist/{send-TT6U64HQ.js.map → send-OT3OXHHW.js.map} +0 -0
- /package/dist/{snooze-DBJJD6ZM.js.map → snooze-A2BVEYWD.js.map} +0 -0
- /package/dist/{start-2KUDSMBM.js.map → start-LEYVJWZG.js.map} +0 -0
- /package/dist/{status-S3NZTRG3.js.map → status-AO653RKW.js.map} +0 -0
- /package/dist/{stop-KJHXWYZ2.js.map → stop-QYIRUR5Y.js.map} +0 -0
- /package/dist/{time-MWABXPA6.js.map → time-4V56YERF.js.map} +0 -0
- /package/dist/{update-5DM5V2E3.js.map → update-EISQJXEI.js.map} +0 -0
- /package/dist/{wait-JZIJB6P6.js.map → wait-FW7RARBV.js.map} +0 -0
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
isLeftover,
|
|
4
|
+
putLeftoverBack,
|
|
5
|
+
setLeftoverAside,
|
|
6
|
+
takeLeftover
|
|
7
|
+
} from "./chunk-L6RUHCKB.js";
|
|
2
8
|
import {
|
|
3
9
|
resolveProjectTarget
|
|
4
10
|
} from "./chunk-H5LKMR45.js";
|
|
@@ -14,6 +20,9 @@ import {
|
|
|
14
20
|
remoteBranchExists,
|
|
15
21
|
repoState
|
|
16
22
|
} from "./chunk-7NAXFBFI.js";
|
|
23
|
+
import {
|
|
24
|
+
isBuildOutputPath
|
|
25
|
+
} from "./chunk-5PAPD6VT.js";
|
|
17
26
|
import {
|
|
18
27
|
archiveDirFor,
|
|
19
28
|
archiveRoot,
|
|
@@ -24,11 +33,12 @@ import {
|
|
|
24
33
|
readArchive,
|
|
25
34
|
restoreArchivedTranscripts,
|
|
26
35
|
restoreUncommitted,
|
|
36
|
+
runGitAsync,
|
|
27
37
|
setSessionTitle,
|
|
28
38
|
upsertSession,
|
|
29
39
|
upsertSessionWithPort,
|
|
30
40
|
writeArchiveRecord
|
|
31
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-G5PN5NIS.js";
|
|
32
42
|
import {
|
|
33
43
|
sessionIdFor
|
|
34
44
|
} from "./chunk-WF57CF7A.js";
|
|
@@ -96,10 +106,116 @@ function toBaseSpec(base) {
|
|
|
96
106
|
}
|
|
97
107
|
|
|
98
108
|
// src/core/worktree/worktree.ts
|
|
99
|
-
import
|
|
109
|
+
import fs3 from "fs";
|
|
100
110
|
|
|
101
111
|
// src/core/archive/archive-restore.ts
|
|
112
|
+
import path2 from "path";
|
|
113
|
+
|
|
114
|
+
// src/core/archive/archive-ignored.ts
|
|
115
|
+
import fs from "fs";
|
|
102
116
|
import path from "path";
|
|
117
|
+
var MAX_IGNORED_FILE_BYTES = 5 * 1024 * 1024;
|
|
118
|
+
var MAX_IGNORED_TOTAL_BYTES = 50 * 1024 * 1024;
|
|
119
|
+
var MAX_IGNORED_FILES = 5e3;
|
|
120
|
+
var HEAVY = /* @__PURE__ */ new Set([
|
|
121
|
+
".venv",
|
|
122
|
+
"venv",
|
|
123
|
+
"packages",
|
|
124
|
+
".pnpm-store",
|
|
125
|
+
".yarn",
|
|
126
|
+
".cache",
|
|
127
|
+
".terraform",
|
|
128
|
+
".tox",
|
|
129
|
+
".mypy_cache",
|
|
130
|
+
".ruff_cache",
|
|
131
|
+
".dart_tool"
|
|
132
|
+
]);
|
|
133
|
+
var leftOut = (rel) => isBuildOutputPath(rel) || rel.split(/[\\/]/).some((seg) => HEAVY.has(seg));
|
|
134
|
+
async function ignoredFiles(worktree, max = MAX_IGNORED_FILES) {
|
|
135
|
+
const r = await runGitAsync(worktree, { args: ["ls-files", "--others", "--ignored", "--exclude-standard", "--directory", "-z"] });
|
|
136
|
+
if (r.status !== 0) return { files: [], more: false };
|
|
137
|
+
const files = [];
|
|
138
|
+
let more = false;
|
|
139
|
+
const walk = async (rel) => {
|
|
140
|
+
let entries2;
|
|
141
|
+
try {
|
|
142
|
+
entries2 = await fs.promises.readdir(path.join(worktree, rel), { withFileTypes: true });
|
|
143
|
+
} catch {
|
|
144
|
+
return;
|
|
145
|
+
}
|
|
146
|
+
for (const e of entries2) {
|
|
147
|
+
if (files.length >= max) {
|
|
148
|
+
more = true;
|
|
149
|
+
return;
|
|
150
|
+
}
|
|
151
|
+
const r2 = path.join(rel, e.name);
|
|
152
|
+
if (leftOut(r2)) continue;
|
|
153
|
+
if (e.isDirectory()) await walk(r2);
|
|
154
|
+
else if (e.isFile()) files.push(r2);
|
|
155
|
+
}
|
|
156
|
+
};
|
|
157
|
+
const entries = r.stdout.split("\0").filter(Boolean);
|
|
158
|
+
const dirs = entries.filter((e) => e.endsWith("/") && !leftOut(e.replace(/\/$/, "")));
|
|
159
|
+
const ignoredDirs = /* @__PURE__ */ new Set();
|
|
160
|
+
if (dirs.length) {
|
|
161
|
+
const check = await runGitAsync(worktree, { args: ["check-ignore", "--", ...dirs] });
|
|
162
|
+
for (const d of check.stdout.split(/\r?\n/).filter(Boolean)) ignoredDirs.add(d.replace(/\/$/, ""));
|
|
163
|
+
}
|
|
164
|
+
for (const entry of entries) {
|
|
165
|
+
if (files.length >= max) {
|
|
166
|
+
more = true;
|
|
167
|
+
break;
|
|
168
|
+
}
|
|
169
|
+
const rel = entry.replace(/\/$/, "");
|
|
170
|
+
if (leftOut(rel)) continue;
|
|
171
|
+
if (!entry.endsWith("/")) files.push(path.normalize(rel));
|
|
172
|
+
else if (ignoredDirs.has(rel)) await walk(path.normalize(rel));
|
|
173
|
+
}
|
|
174
|
+
return { files: [...new Set(files)], more };
|
|
175
|
+
}
|
|
176
|
+
async function saveIgnored(worktree, dest, caps = { file: MAX_IGNORED_FILE_BYTES, total: MAX_IGNORED_TOTAL_BYTES, files: MAX_IGNORED_FILES }) {
|
|
177
|
+
const saved = { files: 0, bytes: 0, skipped: 0 };
|
|
178
|
+
const listed = await ignoredFiles(worktree, caps.files);
|
|
179
|
+
if (listed.more) saved.partial = true;
|
|
180
|
+
const sized = [];
|
|
181
|
+
for (const rel of listed.files) {
|
|
182
|
+
try {
|
|
183
|
+
sized.push({ rel, size: (await fs.promises.stat(path.join(worktree, rel))).size });
|
|
184
|
+
} catch {
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
sized.sort((a, b) => a.size - b.size || a.rel.localeCompare(b.rel));
|
|
188
|
+
for (const { rel, size } of sized) {
|
|
189
|
+
if (size > caps.file || saved.bytes + size > caps.total) {
|
|
190
|
+
saved.skipped++;
|
|
191
|
+
continue;
|
|
192
|
+
}
|
|
193
|
+
try {
|
|
194
|
+
await fs.promises.mkdir(path.dirname(path.join(dest, rel)), { recursive: true });
|
|
195
|
+
await fs.promises.copyFile(path.join(worktree, rel), path.join(dest, rel));
|
|
196
|
+
saved.files++;
|
|
197
|
+
saved.bytes += size;
|
|
198
|
+
} catch {
|
|
199
|
+
saved.skipped++;
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
return saved;
|
|
203
|
+
}
|
|
204
|
+
function restoreIgnored(src, worktree) {
|
|
205
|
+
if (!fs.existsSync(src)) return 0;
|
|
206
|
+
let n = 0;
|
|
207
|
+
fs.cpSync(src, worktree, {
|
|
208
|
+
recursive: true,
|
|
209
|
+
force: true,
|
|
210
|
+
filter: (from) => {
|
|
211
|
+
if (fs.statSync(from).isFile()) n++;
|
|
212
|
+
return true;
|
|
213
|
+
}
|
|
214
|
+
});
|
|
215
|
+
return n;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
// src/core/archive/archive-restore.ts
|
|
103
219
|
async function restoreArchivedUncommitted(s, config, root = archiveRoot()) {
|
|
104
220
|
const id = sessionIdFor(s);
|
|
105
221
|
const rec = readArchive(id, root);
|
|
@@ -126,20 +242,45 @@ async function restoreArchivedUncommitted(s, config, root = archiveRoot()) {
|
|
|
126
242
|
if (changed) writeArchiveRecord(rec, root);
|
|
127
243
|
return out;
|
|
128
244
|
}
|
|
245
|
+
function restoreArchivedIgnored(s, config, root = archiveRoot()) {
|
|
246
|
+
const id = sessionIdFor(s);
|
|
247
|
+
const rec = readArchive(id, root);
|
|
248
|
+
if (!rec?.worktreeRemoved || !rec.ignored) return [];
|
|
249
|
+
const dir = archiveDirFor(id, root);
|
|
250
|
+
const done = [];
|
|
251
|
+
let changed = false;
|
|
252
|
+
for (const [alias, saved] of Object.entries(rec.ignored)) {
|
|
253
|
+
if (saved.restoredAt || saved.restoreError) continue;
|
|
254
|
+
const wt = worktreeFor(s, alias, config);
|
|
255
|
+
if (!wt) continue;
|
|
256
|
+
try {
|
|
257
|
+
const n = restoreIgnored(path2.join(dir, "ignored", alias), wt);
|
|
258
|
+
saved.restoredAt = (/* @__PURE__ */ new Date()).toISOString();
|
|
259
|
+
done.push(alias);
|
|
260
|
+
if (n) report("info", `${alias}: put back ${n} git-ignored file${n === 1 ? "" : "s"} (local settings, editor state) it had`);
|
|
261
|
+
} catch (err) {
|
|
262
|
+
saved.restoreError = err.message;
|
|
263
|
+
report("warn", `${alias}: its local settings from the archive weren't all put back: ${saved.restoreError}`);
|
|
264
|
+
}
|
|
265
|
+
changed = true;
|
|
266
|
+
}
|
|
267
|
+
if (changed) writeArchiveRecord(rec, root);
|
|
268
|
+
return done;
|
|
269
|
+
}
|
|
129
270
|
function worktreeFor(s, alias, config) {
|
|
130
271
|
if (!s.isGroup) return s.paths[0] ?? null;
|
|
131
272
|
const repo = config.repos[alias];
|
|
132
273
|
if (!repo) return null;
|
|
133
|
-
const name =
|
|
134
|
-
return s.paths.find((p) =>
|
|
274
|
+
const name = path2.basename(repo).toLowerCase();
|
|
275
|
+
return s.paths.find((p) => path2.basename(p).toLowerCase() === name) ?? null;
|
|
135
276
|
}
|
|
136
277
|
|
|
137
278
|
// src/core/worktree/worktree.ts
|
|
138
|
-
import
|
|
279
|
+
import path4 from "path";
|
|
139
280
|
|
|
140
281
|
// src/core/worktree/copy-files.ts
|
|
141
|
-
import
|
|
142
|
-
import
|
|
282
|
+
import fs2 from "fs";
|
|
283
|
+
import path3 from "path";
|
|
143
284
|
import { globSync } from "glob";
|
|
144
285
|
var EXCLUDED_DIRS = ["bin", "obj", "node_modules", ".git"];
|
|
145
286
|
function copyConfigFiles(repoPath, worktreePath, patterns) {
|
|
@@ -147,12 +288,12 @@ function copyConfigFiles(repoPath, worktreePath, patterns) {
|
|
|
147
288
|
const normalized = pattern.replace(/\\/g, "/");
|
|
148
289
|
if (normalized.startsWith(".claude/")) {
|
|
149
290
|
const relativePath = normalized;
|
|
150
|
-
const sourcePath =
|
|
151
|
-
if (
|
|
152
|
-
const destPath =
|
|
153
|
-
const destDir =
|
|
154
|
-
|
|
155
|
-
|
|
291
|
+
const sourcePath = path3.join(repoPath, relativePath);
|
|
292
|
+
if (fs2.existsSync(sourcePath)) {
|
|
293
|
+
const destPath = path3.join(worktreePath, relativePath);
|
|
294
|
+
const destDir = path3.dirname(destPath);
|
|
295
|
+
fs2.mkdirSync(destDir, { recursive: true });
|
|
296
|
+
fs2.copyFileSync(sourcePath, destPath);
|
|
156
297
|
report("info", ` Copied: ${relativePath}`);
|
|
157
298
|
}
|
|
158
299
|
continue;
|
|
@@ -168,11 +309,11 @@ function copyConfigFiles(repoPath, worktreePath, patterns) {
|
|
|
168
309
|
if (parts.some((p) => EXCLUDED_DIRS.includes(p))) {
|
|
169
310
|
continue;
|
|
170
311
|
}
|
|
171
|
-
const sourcePath =
|
|
172
|
-
const destPath =
|
|
173
|
-
const destDir =
|
|
174
|
-
|
|
175
|
-
|
|
312
|
+
const sourcePath = path3.join(repoPath, match);
|
|
313
|
+
const destPath = path3.join(worktreePath, match);
|
|
314
|
+
const destDir = path3.dirname(destPath);
|
|
315
|
+
fs2.mkdirSync(destDir, { recursive: true });
|
|
316
|
+
fs2.copyFileSync(sourcePath, destPath);
|
|
176
317
|
report("info", ` Copied: ${match}`);
|
|
177
318
|
}
|
|
178
319
|
}
|
|
@@ -226,9 +367,9 @@ function fastForwardBranch(repoPath, branchName) {
|
|
|
226
367
|
}
|
|
227
368
|
function samePath(a, b) {
|
|
228
369
|
const norm = (p) => {
|
|
229
|
-
let r =
|
|
370
|
+
let r = path4.resolve(p);
|
|
230
371
|
try {
|
|
231
|
-
r =
|
|
372
|
+
r = fs3.realpathSync.native(r);
|
|
232
373
|
} catch {
|
|
233
374
|
}
|
|
234
375
|
return process.platform === "win32" ? r.toLowerCase() : r;
|
|
@@ -237,7 +378,30 @@ function samePath(a, b) {
|
|
|
237
378
|
}
|
|
238
379
|
function createSingleWorktree(repoPath, worktreePath, branchName, config, baseBranch, pull = true, fetched = false) {
|
|
239
380
|
debug("createSingleWorktree", { repoPath, worktreePath, branchName, baseBranch });
|
|
240
|
-
|
|
381
|
+
let aside = null;
|
|
382
|
+
if (isLeftover(worktreePath)) {
|
|
383
|
+
try {
|
|
384
|
+
aside = setLeftoverAside(worktreePath);
|
|
385
|
+
report("warn", ` ${worktreePath} was left half-removed (no git in it): making it again, its files set aside in ${aside}`);
|
|
386
|
+
git(["worktree", "prune"], repoPath);
|
|
387
|
+
} catch (err) {
|
|
388
|
+
report("error", ` ${err.message}`);
|
|
389
|
+
return false;
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
const made = makeSingleWorktree(repoPath, worktreePath, branchName, config, baseBranch, pull, fetched);
|
|
393
|
+
if (!made && aside && !fs3.existsSync(worktreePath)) {
|
|
394
|
+
try {
|
|
395
|
+
fs3.renameSync(aside, worktreePath);
|
|
396
|
+
takeLeftover(worktreePath);
|
|
397
|
+
} catch {
|
|
398
|
+
report("warn", ` what was left of it is still at ${aside}`);
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
return made;
|
|
402
|
+
}
|
|
403
|
+
function makeSingleWorktree(repoPath, worktreePath, branchName, config, baseBranch, pull, fetched) {
|
|
404
|
+
if (fs3.existsSync(worktreePath)) {
|
|
241
405
|
if (isGitRepo(worktreePath)) {
|
|
242
406
|
const currentBranch = getCurrentBranch(worktreePath);
|
|
243
407
|
if (currentBranch === branchName) {
|
|
@@ -263,8 +427,8 @@ function createSingleWorktree(repoPath, worktreePath, branchName, config, baseBr
|
|
|
263
427
|
report("error", " Remove that worktree first, or use the existing one.");
|
|
264
428
|
return false;
|
|
265
429
|
}
|
|
266
|
-
const parentDir =
|
|
267
|
-
|
|
430
|
+
const parentDir = path4.dirname(worktreePath);
|
|
431
|
+
fs3.mkdirSync(parentDir, { recursive: true });
|
|
268
432
|
if (!fetched) git(["fetch", "--quiet"], repoPath);
|
|
269
433
|
const hasLocal = localBranchExists(branchName, repoPath);
|
|
270
434
|
const hasRemote = remoteBranchExists(branchName, repoPath);
|
|
@@ -342,7 +506,7 @@ function createSingleWorktree(repoPath, worktreePath, branchName, config, baseBr
|
|
|
342
506
|
return true;
|
|
343
507
|
}
|
|
344
508
|
function wouldRefuseRemoval(worktreePath, force) {
|
|
345
|
-
if (force || !
|
|
509
|
+
if (force || !fs3.existsSync(worktreePath)) return false;
|
|
346
510
|
const state = repoState(worktreePath);
|
|
347
511
|
if (state === "not-a-repo") return false;
|
|
348
512
|
if (state === "unknown") return true;
|
|
@@ -354,13 +518,13 @@ function isDeleteFailure(stderr) {
|
|
|
354
518
|
return /failed to delete/i.test(stderr);
|
|
355
519
|
}
|
|
356
520
|
function removeSingleWorktree(repoPath, worktreePath, branchName, force) {
|
|
357
|
-
if (!
|
|
521
|
+
if (!fs3.existsSync(worktreePath)) {
|
|
358
522
|
report("warn", ` Worktree does not exist at: ${worktreePath}`);
|
|
359
523
|
return true;
|
|
360
524
|
}
|
|
361
525
|
const state = repoState(worktreePath);
|
|
362
526
|
if (state === "not-a-repo") {
|
|
363
|
-
|
|
527
|
+
fs3.rmSync(worktreePath, { recursive: true, force: true });
|
|
364
528
|
git(["worktree", "prune"], repoPath);
|
|
365
529
|
report("info", ` Removed invalid worktree directory: ${worktreePath}`);
|
|
366
530
|
return true;
|
|
@@ -397,7 +561,7 @@ function removeSingleWorktree(repoPath, worktreePath, branchName, force) {
|
|
|
397
561
|
return true;
|
|
398
562
|
} else if (isDeleteFailure(result.stderr)) {
|
|
399
563
|
try {
|
|
400
|
-
|
|
564
|
+
fs3.rmSync(worktreePath, { recursive: true, force: true, maxRetries: 3, retryDelay: 200 });
|
|
401
565
|
} catch (err) {
|
|
402
566
|
report("error", ` Failed to remove worktree: ${worktreePath}`);
|
|
403
567
|
report("error", ` ${err.message}`);
|
|
@@ -408,7 +572,7 @@ function removeSingleWorktree(repoPath, worktreePath, branchName, force) {
|
|
|
408
572
|
report("success", ` Removed worktree: ${worktreePath} (finished the delete git could not: ${why})`);
|
|
409
573
|
return true;
|
|
410
574
|
} else if (force && state === "unknown") {
|
|
411
|
-
|
|
575
|
+
fs3.rmSync(worktreePath, { recursive: true, force: true });
|
|
412
576
|
git(["worktree", "prune"], repoPath);
|
|
413
577
|
report("success", ` Removed worktree folder git could not read: ${worktreePath}`);
|
|
414
578
|
return true;
|
|
@@ -444,10 +608,34 @@ async function setupWorktree(targetName, branchName, config, base, jiraKey, opts
|
|
|
444
608
|
await restoreArchivedUncommitted(session, config).catch(
|
|
445
609
|
(err) => report("warn", `couldn't put back its uncommitted changes: ${err.message}`)
|
|
446
610
|
);
|
|
611
|
+
if (session) bestEffort("put back its local settings", () => restoreArchivedIgnored(session, config));
|
|
612
|
+
const tips = session ? readArchive(sessionIdFor(session))?.tips ?? {} : {};
|
|
613
|
+
for (const p of result.paths) {
|
|
614
|
+
const alias = target.isGroup ? target.repoAliases.find((a) => path4.basename(config.repos[a] ?? "").toLowerCase() === path4.basename(p).toLowerCase()) : targetName;
|
|
615
|
+
putBackLeftover(p, alias ? tips[alias] : void 0);
|
|
616
|
+
}
|
|
447
617
|
if (opts.name?.trim()) await setSessionTitle(sessionTarget, branchName, opts.name);
|
|
448
618
|
}
|
|
449
619
|
return result;
|
|
450
620
|
}
|
|
621
|
+
function putBackLeftover(worktree, tip) {
|
|
622
|
+
const aside = takeLeftover(worktree);
|
|
623
|
+
if (!aside) return;
|
|
624
|
+
const head = git(["rev-parse", "HEAD"], worktree).stdout;
|
|
625
|
+
const clean = git(["status", "--porcelain"], worktree).stdout === "";
|
|
626
|
+
const r = putLeftoverBack(aside, worktree, { overwrite: clean && (!tip || tip === head) });
|
|
627
|
+
if (r.failed.length)
|
|
628
|
+
report(
|
|
629
|
+
"warn",
|
|
630
|
+
`put back ${r.copied} file(s) left in the old folder; ${r.failed.length} couldn't be copied \u2014 they're still in ${aside}`
|
|
631
|
+
);
|
|
632
|
+
else if (r.copied)
|
|
633
|
+
report(
|
|
634
|
+
"info",
|
|
635
|
+
`put back ${r.copied} file(s) left in the old folder${r.removed ? "" : ` (it's still at ${aside}: remove it when done)`}`
|
|
636
|
+
);
|
|
637
|
+
else if (!r.removed) report("info", `nothing to put back from the old folder (still at ${aside}: remove it when done)`);
|
|
638
|
+
}
|
|
451
639
|
function recreateArchivedBranches(sessionTarget, branch, aliases, config) {
|
|
452
640
|
const session = findSession(loadHistory(), sessionTarget, branch);
|
|
453
641
|
if (!session) return [];
|
|
@@ -472,7 +660,7 @@ function archivedHeads(sessionTarget, branch) {
|
|
|
472
660
|
return rec?.worktreeRemoved && rec.heads && Object.keys(rec.heads).length ? rec.heads : void 0;
|
|
473
661
|
}
|
|
474
662
|
async function setupGroupWorktree(groupName, repoAliases, branchName, workTreeDirName, config, spec, jiraKey, opts = {}) {
|
|
475
|
-
const groupWorktreePath =
|
|
663
|
+
const groupWorktreePath = path4.join(config.worktreesRoot, groupName, workTreeDirName);
|
|
476
664
|
if (!isEmptyBaseSpec(spec)) {
|
|
477
665
|
const unknownAliases = baseSpecOverrideAliases(spec).filter((a) => !repoAliases.includes(a));
|
|
478
666
|
if (unknownAliases.length > 0) {
|
|
@@ -507,10 +695,10 @@ async function setupGroupWorktree(groupName, repoAliases, branchName, workTreeDi
|
|
|
507
695
|
report("step", `Creating group worktree: ${groupName}/${branchName}`);
|
|
508
696
|
report("detail", `Directory: ${groupWorktreePath}`);
|
|
509
697
|
report("info", "");
|
|
510
|
-
|
|
698
|
+
fs3.mkdirSync(groupWorktreePath, { recursive: true });
|
|
511
699
|
const createdWorktrees = [];
|
|
512
700
|
const baseBranches = {};
|
|
513
|
-
const toCreate = repoAliases.filter((alias) => !
|
|
701
|
+
const toCreate = repoAliases.filter((alias) => !fs3.existsSync(path4.join(groupWorktreePath, path4.basename(config.repos[alias]))));
|
|
514
702
|
const fetched = /* @__PURE__ */ new Set();
|
|
515
703
|
if (toCreate.length > 1) {
|
|
516
704
|
report("info", `Fetching ${toCreate.length} repos\u2026`);
|
|
@@ -525,8 +713,8 @@ async function setupGroupWorktree(groupName, repoAliases, branchName, workTreeDi
|
|
|
525
713
|
}
|
|
526
714
|
for (const alias of repoAliases) {
|
|
527
715
|
const repoPath = config.repos[alias];
|
|
528
|
-
const repoName =
|
|
529
|
-
const subWorktreePath =
|
|
716
|
+
const repoName = path4.basename(repoPath);
|
|
717
|
+
const subWorktreePath = path4.join(groupWorktreePath, repoName);
|
|
530
718
|
const repoBase = baseForAlias(spec, alias);
|
|
531
719
|
report("step", `[${alias}] (${repoName}):`);
|
|
532
720
|
const success = createSingleWorktree(
|
|
@@ -548,8 +736,8 @@ async function setupGroupWorktree(groupName, repoAliases, branchName, workTreeDi
|
|
|
548
736
|
removeSingleWorktree(wt.repoPath, wt.worktreePath, branchName, true);
|
|
549
737
|
}
|
|
550
738
|
try {
|
|
551
|
-
if (
|
|
552
|
-
|
|
739
|
+
if (fs3.readdirSync(groupWorktreePath).length === 0) {
|
|
740
|
+
fs3.rmSync(groupWorktreePath, { recursive: true, force: true });
|
|
553
741
|
}
|
|
554
742
|
} catch {
|
|
555
743
|
}
|
|
@@ -558,11 +746,11 @@ async function setupGroupWorktree(groupName, repoAliases, branchName, workTreeDi
|
|
|
558
746
|
}
|
|
559
747
|
}
|
|
560
748
|
const configDir = getConfigDir();
|
|
561
|
-
const claudeMdSrc =
|
|
749
|
+
const claudeMdSrc = path4.join(configDir, `${groupName}.claude.md`);
|
|
562
750
|
const instructionsFile = agentFor(config, findSession(loadHistory(), groupName, branchName)).instructionsFile;
|
|
563
|
-
const claudeMdDest =
|
|
564
|
-
if (
|
|
565
|
-
|
|
751
|
+
const claudeMdDest = path4.join(groupWorktreePath, instructionsFile);
|
|
752
|
+
if (fs3.existsSync(claudeMdSrc)) {
|
|
753
|
+
fs3.copyFileSync(claudeMdSrc, claudeMdDest);
|
|
566
754
|
report("info", "");
|
|
567
755
|
report("success", `Copied the group's ${instructionsFile} to the worktree root`);
|
|
568
756
|
} else {
|
|
@@ -581,20 +769,20 @@ async function setupGroupWorktree(groupName, repoAliases, branchName, workTreeDi
|
|
|
581
769
|
}
|
|
582
770
|
async function setupSingleWorktree(targetName, branchName, workTreeDirName, config, spec, jiraKey, opts = {}) {
|
|
583
771
|
const repoPath = config.repos[targetName];
|
|
584
|
-
const repoName =
|
|
585
|
-
let workTreePath =
|
|
772
|
+
const repoName = path4.basename(repoPath);
|
|
773
|
+
let workTreePath = path4.join(config.worktreesRoot, repoName, workTreeDirName);
|
|
586
774
|
const unknownAliases = baseSpecOverrideAliases(spec).filter((a) => a !== targetName);
|
|
587
775
|
if (unknownAliases.length > 0) {
|
|
588
776
|
report("error", `--base names repo(s) other than '${targetName}': ${unknownAliases.join(", ")}`);
|
|
589
777
|
return null;
|
|
590
778
|
}
|
|
591
779
|
const baseBranch = baseForAlias(spec, targetName);
|
|
592
|
-
if (!
|
|
780
|
+
if (!fs3.existsSync(repoPath)) {
|
|
593
781
|
report("error", `Repository path does not exist: ${repoPath}`);
|
|
594
782
|
return null;
|
|
595
783
|
}
|
|
596
784
|
const worktrees = parseWorktreeList(repoPath);
|
|
597
|
-
const existing = worktrees.find((wt) => wt.branch === branchName &&
|
|
785
|
+
const existing = worktrees.find((wt) => wt.branch === branchName && path4.resolve(wt.path) !== path4.resolve(repoPath));
|
|
598
786
|
if (existing) {
|
|
599
787
|
if (baseBranch) {
|
|
600
788
|
report("error", `Cannot use --base: worktree for '${branchName}' already exists at ${existing.path}`);
|
|
@@ -629,9 +817,9 @@ async function setupSingleWorktree(targetName, branchName, workTreeDirName, conf
|
|
|
629
817
|
return { launchDir: workTreePath, paths: [workTreePath], isGroup: false, port };
|
|
630
818
|
}
|
|
631
819
|
var normalizeWorktreePath = (p) => {
|
|
632
|
-
let full =
|
|
820
|
+
let full = path4.resolve(p);
|
|
633
821
|
try {
|
|
634
|
-
full =
|
|
822
|
+
full = fs3.realpathSync.native(full);
|
|
635
823
|
} catch {
|
|
636
824
|
}
|
|
637
825
|
return full.replace(/\\/g, "/").replace(/\/$/, "").toLowerCase();
|
|
@@ -640,26 +828,26 @@ function teardownWorktree(target, isGroup, branch, config, force = true, paths)
|
|
|
640
828
|
const workTreeDirName = branch.replace(/\//g, "-");
|
|
641
829
|
if (isGroup && config.groups[target]) {
|
|
642
830
|
const aliases = config.groups[target];
|
|
643
|
-
const groupWorktreePath =
|
|
831
|
+
const groupWorktreePath = path4.join(config.worktreesRoot, target, workTreeDirName);
|
|
644
832
|
let allRemoved = true;
|
|
645
833
|
for (const alias of aliases) {
|
|
646
834
|
const repoPath = config.repos[alias];
|
|
647
835
|
if (!repoPath) continue;
|
|
648
|
-
const repoName =
|
|
649
|
-
const subWorktreePath =
|
|
836
|
+
const repoName = path4.basename(repoPath);
|
|
837
|
+
const subWorktreePath = path4.join(groupWorktreePath, repoName);
|
|
650
838
|
report("step", `[${alias}] (${repoName}):`);
|
|
651
839
|
if (!removeSingleWorktree(repoPath, subWorktreePath, branch, force)) {
|
|
652
840
|
allRemoved = false;
|
|
653
841
|
}
|
|
654
842
|
}
|
|
655
|
-
const claudeMd =
|
|
843
|
+
const claudeMd = path4.join(groupWorktreePath, agentFor(config, findSession(loadHistory(), target, branch)).instructionsFile);
|
|
656
844
|
try {
|
|
657
|
-
if (
|
|
845
|
+
if (fs3.existsSync(claudeMd)) fs3.unlinkSync(claudeMd);
|
|
658
846
|
} catch {
|
|
659
847
|
}
|
|
660
848
|
try {
|
|
661
|
-
if (
|
|
662
|
-
|
|
849
|
+
if (fs3.existsSync(groupWorktreePath) && fs3.readdirSync(groupWorktreePath).length === 0) {
|
|
850
|
+
fs3.rmSync(groupWorktreePath, { recursive: true, force: true });
|
|
663
851
|
report("success", `Cleaned up group directory: ${groupWorktreePath}`);
|
|
664
852
|
}
|
|
665
853
|
} catch {
|
|
@@ -685,7 +873,7 @@ async function openBaseCheckout(targetName, config, opts = {}) {
|
|
|
685
873
|
if (target.isGroup) return { ok: false, error: `${targetName} is a group: give it a branch (a group has no one checkout to open)` };
|
|
686
874
|
const repoPath = config.repos[targetName];
|
|
687
875
|
if (!repoPath) return { ok: false, error: `Repository path not configured for: ${targetName}` };
|
|
688
|
-
if (!
|
|
876
|
+
if (!fs3.existsSync(repoPath)) return { ok: false, error: `Repository path does not exist: ${repoPath}` };
|
|
689
877
|
const branch = getCurrentBranch(repoPath) ?? "(detached)";
|
|
690
878
|
if (opts.pull !== false && branch && branch !== "(detached)") pullLatestForBranch(repoPath, branch);
|
|
691
879
|
await upsertSession(targetName, false, branch, [repoPath], opts.jiraKey);
|
|
@@ -695,6 +883,8 @@ async function openBaseCheckout(targetName, config, opts = {}) {
|
|
|
695
883
|
}
|
|
696
884
|
|
|
697
885
|
export {
|
|
886
|
+
saveIgnored,
|
|
887
|
+
worktreeFor,
|
|
698
888
|
BaseSpecError,
|
|
699
889
|
parseBaseSpec,
|
|
700
890
|
isEmptyBaseSpec,
|
|
@@ -704,4 +894,4 @@ export {
|
|
|
704
894
|
teardownWorktree,
|
|
705
895
|
openBaseCheckout
|
|
706
896
|
};
|
|
707
|
-
//# sourceMappingURL=chunk-
|
|
897
|
+
//# sourceMappingURL=chunk-SDE3BZ6P.js.map
|