episoda 0.2.32 → 0.2.33

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.
@@ -1635,6 +1635,9 @@ var require_git_executor = __commonJS({
1635
1635
  const args = ["worktree", "add"];
1636
1636
  if (command.create) {
1637
1637
  args.push("-b", command.branch, command.path);
1638
+ if (command.startPoint) {
1639
+ args.push(command.startPoint);
1640
+ }
1638
1641
  } else {
1639
1642
  args.push(command.path, command.branch);
1640
1643
  }
@@ -2696,7 +2699,7 @@ var require_package = __commonJS({
2696
2699
  "package.json"(exports2, module2) {
2697
2700
  module2.exports = {
2698
2701
  name: "episoda",
2699
- version: "0.2.31",
2702
+ version: "0.2.32",
2700
2703
  description: "CLI tool for Episoda local development workflow orchestration",
2701
2704
  main: "dist/index.js",
2702
2705
  types: "dist/index.d.ts",
@@ -5533,14 +5536,19 @@ var WorktreeManager = class _WorktreeManager {
5533
5536
  action: "fetch",
5534
5537
  remote: "origin"
5535
5538
  }, { cwd: this.bareRepoPath });
5536
- if (!fetchResult.success) {
5537
- console.warn("[worktree-manager] Failed to fetch from origin:", fetchResult.output);
5539
+ if (!fetchResult.success && createBranch) {
5540
+ console.error("[worktree-manager] Failed to fetch from origin:", fetchResult.output);
5541
+ return {
5542
+ success: false,
5543
+ error: "Failed to fetch latest refs from origin. Cannot create worktree with stale refs."
5544
+ };
5538
5545
  }
5539
5546
  const result = await this.gitExecutor.execute({
5540
5547
  action: "worktree_add",
5541
5548
  path: worktreePath,
5542
5549
  branch: branchName,
5543
- create: createBranch
5550
+ create: createBranch,
5551
+ startPoint: createBranch ? "origin/main" : void 0
5544
5552
  }, { cwd: this.bareRepoPath });
5545
5553
  if (!result.success) {
5546
5554
  return {