jj-octo 0.2.2 → 0.2.4

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.
Files changed (2) hide show
  1. package/dist/jj-octo.js +14 -2
  2. package/package.json +1 -1
package/dist/jj-octo.js CHANGED
@@ -18112,7 +18112,7 @@ var layer14 = /* @__PURE__ */ layerMergedContext(/* @__PURE__ */ succeed6(fetch)
18112
18112
  // package.json
18113
18113
  var package_default = {
18114
18114
  name: "jj-octo",
18115
- version: "0.2.2",
18115
+ version: "0.2.4",
18116
18116
  description: "A jj subcommand for working with GitHub that supports stacking",
18117
18117
  license: "MIT",
18118
18118
  repository: {
@@ -18382,6 +18382,18 @@ var colocate = gen2(function* () {
18382
18382
  const root = yield* resolve(yield* git.read(["rev-parse", "--show-toplevel"]));
18383
18383
  const jjRoot = yield* jj.read(["root"]).pipe(flatMap4(resolve), orElseSucceed2(() => ""));
18384
18384
  if (jjRoot !== root) {
18385
+ const [gitDirectory, commonDirectory] = (yield* git.read([
18386
+ "rev-parse",
18387
+ "--path-format=absolute",
18388
+ "--git-dir",
18389
+ "--git-common-dir"
18390
+ ])).split(`
18391
+ `);
18392
+ if (gitDirectory !== commonDirectory) {
18393
+ yield* new GitFailed({
18394
+ message: "this is a git worktree, where jj would make a second repository; run `jj workspace add` in the main checkout instead"
18395
+ });
18396
+ }
18385
18397
  yield* jj.run(["git", "init", "--colocate", root]);
18386
18398
  }
18387
18399
  });
@@ -18392,7 +18404,7 @@ var copyIdentity = gen2(function* () {
18392
18404
  const own = (yield* jj.read(["config", "get", key])).trim();
18393
18405
  const value = (yield* git.read(["config", key]).pipe(orElseSucceed2(() => ""))).trim();
18394
18406
  if (own === "" && value !== "") {
18395
- yield* jj.run(["config", "set", "--repo", key, value]);
18407
+ yield* jj.run(["config", "set", "--repo", key, JSON.stringify(value)]);
18396
18408
  }
18397
18409
  }
18398
18410
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jj-octo",
3
- "version": "0.2.2",
3
+ "version": "0.2.4",
4
4
  "description": "A jj subcommand for working with GitHub that supports stacking",
5
5
  "license": "MIT",
6
6
  "repository": {