episoda 0.2.38 → 0.2.39
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/daemon/daemon-process.js +41 -3
- package/dist/daemon/daemon-process.js.map +1 -1
- package/dist/index.js +40 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1870,6 +1870,11 @@ var require_git_executor = __commonJS({
|
|
|
1870
1870
|
{ timeout: options?.timeout || 12e4 }
|
|
1871
1871
|
// 2 minutes for clone
|
|
1872
1872
|
);
|
|
1873
|
+
try {
|
|
1874
|
+
await execAsync2(`git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*"`, { cwd: command.path, timeout: 5e3 });
|
|
1875
|
+
} catch (configError) {
|
|
1876
|
+
console.error("[git-executor] EP1014: Failed to configure fetch refspec:", configError);
|
|
1877
|
+
}
|
|
1873
1878
|
return {
|
|
1874
1879
|
success: true,
|
|
1875
1880
|
output: `Cloned bare repository to ${command.path}`,
|
|
@@ -2721,7 +2726,7 @@ var require_package = __commonJS({
|
|
|
2721
2726
|
"package.json"(exports2, module2) {
|
|
2722
2727
|
module2.exports = {
|
|
2723
2728
|
name: "episoda",
|
|
2724
|
-
version: "0.2.
|
|
2729
|
+
version: "0.2.39",
|
|
2725
2730
|
description: "CLI tool for Episoda local development workflow orchestration",
|
|
2726
2731
|
main: "dist/index.js",
|
|
2727
2732
|
types: "dist/index.d.ts",
|
|
@@ -5679,11 +5684,43 @@ var WorktreeManager = class _WorktreeManager {
|
|
|
5679
5684
|
}
|
|
5680
5685
|
try {
|
|
5681
5686
|
const config = this.readConfig();
|
|
5682
|
-
|
|
5687
|
+
if (config === null) {
|
|
5688
|
+
return false;
|
|
5689
|
+
}
|
|
5690
|
+
await this.ensureFetchRefspecConfigured();
|
|
5691
|
+
return true;
|
|
5683
5692
|
} catch {
|
|
5684
5693
|
return false;
|
|
5685
5694
|
}
|
|
5686
5695
|
}
|
|
5696
|
+
/**
|
|
5697
|
+
* EP1014: Ensure fetch refspec is configured in bare repo
|
|
5698
|
+
* Older bare repos may be missing this configuration, causing stale worktrees
|
|
5699
|
+
*/
|
|
5700
|
+
async ensureFetchRefspecConfigured() {
|
|
5701
|
+
try {
|
|
5702
|
+
const { execSync: execSync7 } = require("child_process");
|
|
5703
|
+
let fetchRefspec = null;
|
|
5704
|
+
try {
|
|
5705
|
+
fetchRefspec = execSync7("git config --get remote.origin.fetch", {
|
|
5706
|
+
cwd: this.bareRepoPath,
|
|
5707
|
+
encoding: "utf-8",
|
|
5708
|
+
timeout: 5e3
|
|
5709
|
+
}).trim();
|
|
5710
|
+
} catch {
|
|
5711
|
+
}
|
|
5712
|
+
if (!fetchRefspec) {
|
|
5713
|
+
console.log("[WorktreeManager] EP1014: Configuring missing fetch refspec for bare repo");
|
|
5714
|
+
execSync7('git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*"', {
|
|
5715
|
+
cwd: this.bareRepoPath,
|
|
5716
|
+
timeout: 5e3
|
|
5717
|
+
});
|
|
5718
|
+
console.log("[WorktreeManager] EP1014: Fetch refspec configured successfully");
|
|
5719
|
+
}
|
|
5720
|
+
} catch (error) {
|
|
5721
|
+
console.warn("[WorktreeManager] EP1014: Failed to configure fetch refspec:", error);
|
|
5722
|
+
}
|
|
5723
|
+
}
|
|
5687
5724
|
/**
|
|
5688
5725
|
* Create a new worktree project from scratch
|
|
5689
5726
|
*/
|
|
@@ -5740,7 +5777,8 @@ var WorktreeManager = class _WorktreeManager {
|
|
|
5740
5777
|
}
|
|
5741
5778
|
const fetchResult = await this.gitExecutor.execute({
|
|
5742
5779
|
action: "fetch",
|
|
5743
|
-
remote: "origin"
|
|
5780
|
+
remote: "origin",
|
|
5781
|
+
branch: "+refs/heads/main:refs/remotes/origin/main"
|
|
5744
5782
|
}, { cwd: this.bareRepoPath });
|
|
5745
5783
|
if (!fetchResult.success && createBranch) {
|
|
5746
5784
|
console.error("[worktree-manager] Failed to fetch from origin:", fetchResult.output);
|