lalph 0.3.125 → 0.3.127

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 CHANGED
@@ -242228,9 +242228,12 @@ const addOrUpdateProject = fnUntraced(function* (existing, fromPlanMode = false)
242228
242228
  //#endregion
242229
242229
  //#region src/shared/git.ts
242230
242230
  const parseBranch = (ref) => {
242231
- const parts = ref.split("/");
242232
- const remote = parts.length > 1 ? parts[0] : "origin";
242233
- const branch = parts.length > 1 ? parts.slice(1).join("/") : parts[0];
242231
+ if (!ref.startsWith("origin/") && !ref.startsWith("upstream/")) return {
242232
+ remote: "origin",
242233
+ branch: ref,
242234
+ branchWithRemote: `origin/${ref}`
242235
+ };
242236
+ const [remote, branch] = ref.split("/", 2);
242234
242237
  return {
242235
242238
  remote,
242236
242239
  branch,
@@ -242319,6 +242322,7 @@ const setupWorktree = fnUntraced(function* (options) {
242319
242322
  const worktreeSetupPath = pathService.join(options.directory, "scripts", "worktree-setup.sh");
242320
242323
  yield* seedSetupScript(cwdSetupPath);
242321
242324
  const setupPath = (yield* fs.exists(worktreeSetupPath)) ? worktreeSetupPath : cwdSetupPath;
242325
+ yield* fs.chmod(setupPath, 493);
242322
242326
  yield* make$45({
242323
242327
  cwd: options.directory,
242324
242328
  shell: process.env.SHELL ?? true,
@@ -243738,7 +243742,7 @@ const commandEdit = make$60("edit").pipe(withDescription("Open the selected proj
243738
243742
  const commandSource = make$60("source").pipe(withDescription("Select the issue source to use (e.g. GitHub Issues or Linear). This applies to all projects."), withHandler(() => selectIssueSource), provide(Settings.layer));
243739
243743
  //#endregion
243740
243744
  //#region package.json
243741
- var version = "0.3.125";
243745
+ var version = "0.3.127";
243742
243746
  //#endregion
243743
243747
  //#region src/Tracing.ts
243744
243748
  const TracingLayer = unwrap$3(gen(function* () {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "lalph",
3
3
  "type": "module",
4
- "version": "0.3.125",
4
+ "version": "0.3.127",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
package/src/Worktree.ts CHANGED
@@ -163,6 +163,8 @@ const setupWorktree = Effect.fnUntraced(function* (options: {
163
163
  ? worktreeSetupPath
164
164
  : cwdSetupPath
165
165
 
166
+ yield* fs.chmod(setupPath, 0o755)
167
+
166
168
  yield* ChildProcess.make({
167
169
  cwd: options.directory,
168
170
  shell: process.env.SHELL ?? true,
package/src/shared/git.ts CHANGED
@@ -5,9 +5,10 @@ export const parseBranch = (
5
5
  readonly branch: string
6
6
  readonly branchWithRemote: string
7
7
  } => {
8
- const parts = ref.split("/")
9
- const remote = parts.length > 1 ? parts[0]! : "origin"
10
- const branch = parts.length > 1 ? parts.slice(1).join("/") : parts[0]!
8
+ if (!ref.startsWith("origin/") && !ref.startsWith("upstream/")) {
9
+ return { remote: "origin", branch: ref, branchWithRemote: `origin/${ref}` }
10
+ }
11
+ const [remote, branch] = ref.split("/", 2) as [string, string]
11
12
  const branchWithRemote = `${remote}/${branch}`
12
13
  return { remote, branch, branchWithRemote } as const
13
14
  }