@ridit/forge 0.2.8 → 0.3.0
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/README.md +1 -1
- package/dist/index.mjs +3 -1
- package/package.json +1 -1
- package/src/utils/branch.ts +3 -1
package/README.md
CHANGED
package/dist/index.mjs
CHANGED
|
@@ -44210,7 +44210,9 @@ function createBranch(repo_path, branch_name) {
|
|
|
44210
44210
|
const branch = currentBranch.branch;
|
|
44211
44211
|
const commitsFolder = path7.join(repo_path, ".forge", "branches", branch.name, "commits");
|
|
44212
44212
|
const newBranchCommitsFolder = path7.join(repo_path, ".forge", "branches", branch_name, "commits");
|
|
44213
|
-
|
|
44213
|
+
try {
|
|
44214
|
+
fs9.cpSync(commitsFolder, newBranchCommitsFolder, { recursive: true });
|
|
44215
|
+
} catch {}
|
|
44214
44216
|
fs9.writeFileSync(branchDataFile, JSON.stringify({
|
|
44215
44217
|
name: branch_name,
|
|
44216
44218
|
latestCommitId: branch.latestCommitId
|
package/package.json
CHANGED
package/src/utils/branch.ts
CHANGED
|
@@ -68,7 +68,9 @@ export function createBranch(
|
|
|
68
68
|
"commits",
|
|
69
69
|
);
|
|
70
70
|
|
|
71
|
-
|
|
71
|
+
try {
|
|
72
|
+
fs.cpSync(commitsFolder, newBranchCommitsFolder, { recursive: true });
|
|
73
|
+
} catch {}
|
|
72
74
|
|
|
73
75
|
fs.writeFileSync(
|
|
74
76
|
branchDataFile!,
|