@pipod/cli 0.1.11 → 0.1.12
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.js +4 -10
- package/dist/cli.js.map +1 -1
- package/docs/workspace-seeding.md +16 -11
- package/man/pipod-config.5 +1 -1
- package/man/pipod.1 +8 -5
- package/man/pipod.1.md +7 -4
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -3426,11 +3426,6 @@ async function probeWorkspaceSeed(opts) {
|
|
|
3426
3426
|
const branchOut = git(["symbolic-ref", "--quiet", "--short", "HEAD"]);
|
|
3427
3427
|
const branch = branchOut.stdout.trim();
|
|
3428
3428
|
if (branchOut.status !== 0 || branch === "") return archive("detached HEAD");
|
|
3429
|
-
const status = git(["status", "--porcelain", "--untracked-files=all"]);
|
|
3430
|
-
if (status.status !== 0) return archive("cannot tell whether the working tree is clean");
|
|
3431
|
-
if (status.stdout.trim() !== "") {
|
|
3432
|
-
return archive("uncommitted changes would be lost by a clone");
|
|
3433
|
-
}
|
|
3434
3429
|
const upstream = git(["rev-parse", "--abbrev-ref", "@{u}"]);
|
|
3435
3430
|
if (upstream.status !== 0) return archive(`${branch} is not pushed`);
|
|
3436
3431
|
const ahead = git(["rev-list", "@{u}..HEAD"]);
|
|
@@ -3545,7 +3540,8 @@ function describeWorkspaceSeed(plan) {
|
|
|
3545
3540
|
return plan.reason;
|
|
3546
3541
|
case "clone": {
|
|
3547
3542
|
const base = `clone ${plan.url} at ${plan.branch} (${plan.commit.slice(0, 12)})`;
|
|
3548
|
-
|
|
3543
|
+
const authenticated = plan.access === "credential" ? `${base} with forwarded ${plan.host} credentials` : base;
|
|
3544
|
+
return `${authenticated} (local uncommitted changes are not copied)`;
|
|
3549
3545
|
}
|
|
3550
3546
|
case "archive":
|
|
3551
3547
|
return `archive ${plan.root}${plan.includeGit ? " with .git history" : ""} (${plan.reason})`;
|
|
@@ -5262,7 +5258,7 @@ async function cloneIntoPod(opts, plan) {
|
|
|
5262
5258
|
if (isMissingRoute(error2)) {
|
|
5263
5259
|
info("this server predates workspace cloning \u2014 sending an archive instead");
|
|
5264
5260
|
} else {
|
|
5265
|
-
warn(`clone failed: ${reason} \u2014 falling back to an archive of the local tree`);
|
|
5261
|
+
warn(`clone failed: ${reason} \u2014 falling back to an archive of the local working tree (including uncommitted changes)`);
|
|
5266
5262
|
}
|
|
5267
5263
|
return archiveIntoPod(
|
|
5268
5264
|
opts,
|
|
@@ -15664,9 +15660,7 @@ function announceWorkspaceSeed(plan) {
|
|
|
15664
15660
|
info(`workspace transport: this directory will be copied into the pod (${seed.reason})`);
|
|
15665
15661
|
return;
|
|
15666
15662
|
case "clone":
|
|
15667
|
-
info(
|
|
15668
|
-
`workspace seed: the pod will clone ${seed.url} at ${seed.branch} (${seed.commit.slice(0, 12)})` + (seed.access === "credential" ? ` with forwarded ${seed.host} credentials` : "")
|
|
15669
|
-
);
|
|
15663
|
+
info(`workspace seed: the pod will ${describeWorkspaceSeed(seed)}`);
|
|
15670
15664
|
break;
|
|
15671
15665
|
case "archive":
|
|
15672
15666
|
info(
|