@ogpoyraz/wtx 0.9.4 → 0.9.6
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/cli.mjs +23 -9
- package/package.json +1 -1
package/dist/cli.mjs
CHANGED
|
@@ -25519,6 +25519,14 @@ async function fetchWorktreeData(opts, scope) {
|
|
|
25519
25519
|
let hasMain = false;
|
|
25520
25520
|
try {
|
|
25521
25521
|
mainBranch = await resolveMainBranch(repo, config2);
|
|
25522
|
+
if (!opts.dryRun) {
|
|
25523
|
+
try {
|
|
25524
|
+
await gitExec(["-C", repo.mainPath, "pull", "--ff-only"], { dryRun: opts.dryRun });
|
|
25525
|
+
} catch (err) {
|
|
25526
|
+
warnings.push({ repoName: repo.name, message: `Failed to pull main for ${repo.name}: ${errorMessage3(err).split(`
|
|
25527
|
+
`)[0]}` });
|
|
25528
|
+
}
|
|
25529
|
+
}
|
|
25522
25530
|
const wts = await getWorktreeList(repo.mainPath);
|
|
25523
25531
|
let stackMetadata = { version: 1, branches: {} };
|
|
25524
25532
|
try {
|
|
@@ -28216,7 +28224,7 @@ var init_HelpOverlay = __esm(() => {
|
|
|
28216
28224
|
["T (shift+t)", "Cycle theme presets"],
|
|
28217
28225
|
["c", "Open configuration"],
|
|
28218
28226
|
["e", "View data warnings (when count > 0)"],
|
|
28219
|
-
["r", "Refresh data"],
|
|
28227
|
+
["r", "Refresh data (pull main)"],
|
|
28220
28228
|
["H", "Action history"],
|
|
28221
28229
|
["?", "Toggle help"],
|
|
28222
28230
|
["mouse drag", "Select text — copied to clipboard automatically"],
|
|
@@ -34492,15 +34500,21 @@ function registerPullBranchCommand(program2) {
|
|
|
34492
34500
|
continue;
|
|
34493
34501
|
}
|
|
34494
34502
|
}
|
|
34495
|
-
const
|
|
34496
|
-
|
|
34497
|
-
|
|
34498
|
-
|
|
34499
|
-
|
|
34500
|
-
|
|
34501
|
-
|
|
34503
|
+
const mainBranch = await resolveMainBranch(repo, config2);
|
|
34504
|
+
let wtPath;
|
|
34505
|
+
if (branchToPull === mainBranch) {
|
|
34506
|
+
wtPath = repo.mainPath;
|
|
34507
|
+
} else {
|
|
34508
|
+
const candidatePath = getWorktreePath(repo, branchToPull);
|
|
34509
|
+
const list = await getWorktreeList(repo.mainPath);
|
|
34510
|
+
const target = findWorktreeForBranch(list, branchToPull, repo.mainPath, candidatePath);
|
|
34511
|
+
if (!target) {
|
|
34512
|
+
stepError(`No worktree found for branch '${branchToPull}'`, candidatePath);
|
|
34513
|
+
failCount++;
|
|
34514
|
+
continue;
|
|
34515
|
+
}
|
|
34516
|
+
wtPath = target.path;
|
|
34502
34517
|
}
|
|
34503
|
-
const wtPath = target.path;
|
|
34504
34518
|
try {
|
|
34505
34519
|
stepProgress(`Pulling ${branchToPull}...`);
|
|
34506
34520
|
await gitExec(["-C", wtPath, "pull", "--ff-only"], opts);
|