type-git 0.3.0-alpha.1 → 0.3.0-alpha.2
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/adapters/bun/index.d.cts +1 -1
- package/dist/adapters/bun/index.d.ts +1 -1
- package/dist/adapters/deno/index.d.cts +1 -1
- package/dist/adapters/deno/index.d.ts +1 -1
- package/dist/adapters/node/index.cjs +110 -38
- package/dist/adapters/node/index.cjs.map +1 -1
- package/dist/adapters/node/index.d.cts +20 -3
- package/dist/adapters/node/index.d.ts +20 -3
- package/dist/adapters/node/index.js +110 -38
- package/dist/adapters/node/index.js.map +1 -1
- package/dist/{adapters-Bpuvmw9y.d.cts → adapters-sSzx9O1u.d.cts} +58 -8
- package/dist/{adapters-Bpuvmw9y.d.ts → adapters-sSzx9O1u.d.ts} +58 -8
- package/dist/index.cjs +110 -38
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +110 -38
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { Z as AddOpts, bC as BareRepo, a0 as BranchCreateOpts, a1 as BranchDeleteOpts, _ as BranchInfo, bh as BranchOperations, $ as BranchOpts, a2 as CheckoutBranchOpts, a4 as CheckoutOpts, a3 as CheckoutPathOpts, am as CherryPickOpts, an as CleanOpts, v as CliRunner, w as CliRunnerOptions, x as CloneOpts, U as Commit, a5 as CommitOpts, a6 as CommitResult, bt as ConfigEntry, bu as ConfigGetOpts, by as ConfigKey, bw as ConfigListOpts, bz as ConfigOperations, bx as ConfigSchema, bv as ConfigSetOpts, C as CreateGitOptions, a8 as DiffEntry, a7 as DiffOpts, a9 as DiffResult, W as FetchOpts, X as ForceWithLeaseOpts, G as GIT_LOG_FORMAT, H as Git, b as GitProgressInfo, E as GlobalConfigListOpts, F as GlobalConfigOperations, A as GlobalLfsInstallOpts, D as GlobalLfsOperations, B as GlobalLfsUninstallOpts, I as InitOpts, L as LEGACY_GIT_VERSION, a_ as LfsCheckoutOpts, b2 as LfsEnvInfo, bg as LfsExtraOperations, aP as LfsFetchOpts, aS as LfsFileEntry, aW as LfsLockEntry, aX as LfsLockOpts, aZ as LfsLocksOpts, aT as LfsLsFilesOpts, b1 as LfsMigrateExportOpts, b0 as LfsMigrateImportOpts, a$ as LfsMigrateInfoOpts, bf as LfsOperations, b5 as LfsPreDownloadOpts, b6 as LfsPreDownloadResult, b3 as LfsPreUploadOpts, b4 as LfsPreUploadResult, e as LfsProgressInfo, aO as LfsPruneOpts, aL as LfsPullOpts, aM as LfsPushOpts, aK as LfsStatus, aN as LfsStatusOpts, aU as LfsTrackEntry, aV as LfsTrackOpts, aY as LfsUnlockOpts, V as LogOpts, y as LsRemoteOpts, f as LsRemoteRef, z as LsRemoteResult, N as LsTreeEntry, g as LsTreeObjectType, O as LsTreeOpts, M as MIN_GIT_VERSION, aa as MergeOpts, ab as MergeResult, ao as MvOpts, NodeExecAdapter, NodeFsAdapter, P as ParsedCommit, h as ParsedLsTreeEntry, i as ParsedWorktree, j as PorcelainV2Entry, ac as PullOpts, Y as PushOpts, ap as RebaseOpts, bl as RemoteAddOpts, bk as RemoteInfo, bs as RemoteOperations, bo as RemotePruneOpts, bq as RemoteSetBranchesOpts, bm as RemoteSetHeadOpts, bn as RemoteShowOpts, bp as RemoteUpdateOpts, br as RemoteUrlOpts, R as RepoBase, aQ as RepoLfsInstallOpts, aR as RepoLfsUninstallOpts, J as RepoLsRemoteOpts, K as RepoLsRemoteResult, ad as ResetOpts, aq as RestoreOpts, au as RevParseBooleanQuery, av as RevParseListOpts, aw as RevParseListQuery, ay as RevParseOtherQuery, az as RevParsePathFormat, aA as RevParsePathOpts, at as RevParsePathQuery, ax as RevParseRefOpts, ar as RevertOpts, ae as RmOpts, as as ShowOpts, ah as StashApplyOpts, af as StashEntry, bi as StashOperations, ag as StashPushOpts, S as StatusEntry, T as StatusOpts, Q as StatusPorcelain, aC as SubmoduleAddOpts, aD as SubmoduleDeinitOpts, aG as SubmoduleForeachOpts, aJ as SubmoduleInfo, bA as SubmoduleOperations, aB as SubmoduleOpts, aI as SubmoduleSetBranchOpts, aE as SubmoduleStatusOpts, aF as SubmoduleSummaryOpts, aH as SubmoduleSyncOpts, ai as SwitchOpts, al as TagCreateOpts, aj as TagInfo, ak as TagListOpts, bj as TagOperations, TypeGit, TypeGitOptions, b7 as Worktree, b8 as WorktreeAddOpts, bd as WorktreeLockOpts, bb as WorktreeMoveOpts, be as WorktreeOperations, ba as WorktreePruneOpts, b9 as WorktreeRemoveOpts, bc as WorktreeRepairOpts, bB as WorktreeRepo, c as createGit, a as createGitSync, createNodeAdapters, d as detectErrorCategory, p as parseGitLog, k as parseGitProgress, l as parseJson, m as parseKeyValue, n as parseLfsProgress, o as parseLines, q as parseLsRemote, r as parseLsTree, s as parsePorcelainV2, t as parseRecords, u as parseWorktreeList } from './adapters/node/index.cjs';
|
|
2
|
-
export { l as AdapterFactory, A as AuditConfig,
|
|
2
|
+
export { l as AdapterFactory, A as AuditConfig, H as AuditEvent, B as AuditEventEnd, z as AuditEventStart, C as Capabilities, v as CommandSpec, x as Credential, y as CredentialConfig, w as CredentialRequest, D as DEFAULT_ENV_ALLOWLIST, m as EnvAllowlistAdjustment, i as EnvInheritance, n as EnvInheritancePredicate, E as ExecAdapter, e as ExecOpts, j as ExecutionContext, F as FsAdapter, t as GitArgumentError, k as GitError, G as GitErrorCategory, s as GitErrorKind, h as GitOpenOptions, g as GitProgress, L as LfsMode, q as LfsProgress, N as NonEmptyString, O as OutputContract, f as RawResult, u as Runtime, R as RuntimeAdapters, c as SpawnHandle, S as SpawnOptions, b as SpawnResult, a as StreamHandler, d as TailHandle, T as TailOptions, I as TraceEvent, p as isNonEmpty, o as nonEmpty, r as resolveInheritedEnv } from './adapters-sSzx9O1u.cjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { Z as AddOpts, bC as BareRepo, a0 as BranchCreateOpts, a1 as BranchDeleteOpts, _ as BranchInfo, bh as BranchOperations, $ as BranchOpts, a2 as CheckoutBranchOpts, a4 as CheckoutOpts, a3 as CheckoutPathOpts, am as CherryPickOpts, an as CleanOpts, v as CliRunner, w as CliRunnerOptions, x as CloneOpts, U as Commit, a5 as CommitOpts, a6 as CommitResult, bt as ConfigEntry, bu as ConfigGetOpts, by as ConfigKey, bw as ConfigListOpts, bz as ConfigOperations, bx as ConfigSchema, bv as ConfigSetOpts, C as CreateGitOptions, a8 as DiffEntry, a7 as DiffOpts, a9 as DiffResult, W as FetchOpts, X as ForceWithLeaseOpts, G as GIT_LOG_FORMAT, H as Git, b as GitProgressInfo, E as GlobalConfigListOpts, F as GlobalConfigOperations, A as GlobalLfsInstallOpts, D as GlobalLfsOperations, B as GlobalLfsUninstallOpts, I as InitOpts, L as LEGACY_GIT_VERSION, a_ as LfsCheckoutOpts, b2 as LfsEnvInfo, bg as LfsExtraOperations, aP as LfsFetchOpts, aS as LfsFileEntry, aW as LfsLockEntry, aX as LfsLockOpts, aZ as LfsLocksOpts, aT as LfsLsFilesOpts, b1 as LfsMigrateExportOpts, b0 as LfsMigrateImportOpts, a$ as LfsMigrateInfoOpts, bf as LfsOperations, b5 as LfsPreDownloadOpts, b6 as LfsPreDownloadResult, b3 as LfsPreUploadOpts, b4 as LfsPreUploadResult, e as LfsProgressInfo, aO as LfsPruneOpts, aL as LfsPullOpts, aM as LfsPushOpts, aK as LfsStatus, aN as LfsStatusOpts, aU as LfsTrackEntry, aV as LfsTrackOpts, aY as LfsUnlockOpts, V as LogOpts, y as LsRemoteOpts, f as LsRemoteRef, z as LsRemoteResult, N as LsTreeEntry, g as LsTreeObjectType, O as LsTreeOpts, M as MIN_GIT_VERSION, aa as MergeOpts, ab as MergeResult, ao as MvOpts, NodeExecAdapter, NodeFsAdapter, P as ParsedCommit, h as ParsedLsTreeEntry, i as ParsedWorktree, j as PorcelainV2Entry, ac as PullOpts, Y as PushOpts, ap as RebaseOpts, bl as RemoteAddOpts, bk as RemoteInfo, bs as RemoteOperations, bo as RemotePruneOpts, bq as RemoteSetBranchesOpts, bm as RemoteSetHeadOpts, bn as RemoteShowOpts, bp as RemoteUpdateOpts, br as RemoteUrlOpts, R as RepoBase, aQ as RepoLfsInstallOpts, aR as RepoLfsUninstallOpts, J as RepoLsRemoteOpts, K as RepoLsRemoteResult, ad as ResetOpts, aq as RestoreOpts, au as RevParseBooleanQuery, av as RevParseListOpts, aw as RevParseListQuery, ay as RevParseOtherQuery, az as RevParsePathFormat, aA as RevParsePathOpts, at as RevParsePathQuery, ax as RevParseRefOpts, ar as RevertOpts, ae as RmOpts, as as ShowOpts, ah as StashApplyOpts, af as StashEntry, bi as StashOperations, ag as StashPushOpts, S as StatusEntry, T as StatusOpts, Q as StatusPorcelain, aC as SubmoduleAddOpts, aD as SubmoduleDeinitOpts, aG as SubmoduleForeachOpts, aJ as SubmoduleInfo, bA as SubmoduleOperations, aB as SubmoduleOpts, aI as SubmoduleSetBranchOpts, aE as SubmoduleStatusOpts, aF as SubmoduleSummaryOpts, aH as SubmoduleSyncOpts, ai as SwitchOpts, al as TagCreateOpts, aj as TagInfo, ak as TagListOpts, bj as TagOperations, TypeGit, TypeGitOptions, b7 as Worktree, b8 as WorktreeAddOpts, bd as WorktreeLockOpts, bb as WorktreeMoveOpts, be as WorktreeOperations, ba as WorktreePruneOpts, b9 as WorktreeRemoveOpts, bc as WorktreeRepairOpts, bB as WorktreeRepo, c as createGit, a as createGitSync, createNodeAdapters, d as detectErrorCategory, p as parseGitLog, k as parseGitProgress, l as parseJson, m as parseKeyValue, n as parseLfsProgress, o as parseLines, q as parseLsRemote, r as parseLsTree, s as parsePorcelainV2, t as parseRecords, u as parseWorktreeList } from './adapters/node/index.js';
|
|
2
|
-
export { l as AdapterFactory, A as AuditConfig,
|
|
2
|
+
export { l as AdapterFactory, A as AuditConfig, H as AuditEvent, B as AuditEventEnd, z as AuditEventStart, C as Capabilities, v as CommandSpec, x as Credential, y as CredentialConfig, w as CredentialRequest, D as DEFAULT_ENV_ALLOWLIST, m as EnvAllowlistAdjustment, i as EnvInheritance, n as EnvInheritancePredicate, E as ExecAdapter, e as ExecOpts, j as ExecutionContext, F as FsAdapter, t as GitArgumentError, k as GitError, G as GitErrorCategory, s as GitErrorKind, h as GitOpenOptions, g as GitProgress, L as LfsMode, q as LfsProgress, N as NonEmptyString, O as OutputContract, f as RawResult, u as Runtime, R as RuntimeAdapters, c as SpawnHandle, S as SpawnOptions, b as SpawnResult, a as StreamHandler, d as TailHandle, T as TailOptions, I as TraceEvent, p as isNonEmpty, o as nonEmpty, r as resolveInheritedEnv } from './adapters-sSzx9O1u.js';
|
package/dist/index.js
CHANGED
|
@@ -533,6 +533,22 @@ var DEFAULT_ENV_ALLOWLIST = [
|
|
|
533
533
|
// SSH agent (required for Git-over-SSH authentication)
|
|
534
534
|
"SSH_AUTH_SOCK",
|
|
535
535
|
"SSH_AGENT_PID",
|
|
536
|
+
// Git SSH transport and TLS configuration. These are commonly required for
|
|
537
|
+
// fetch/push to keep working under the default allowlist. They are transport
|
|
538
|
+
// configuration rather than credential stores, but note they can still carry
|
|
539
|
+
// sensitive data depending on local setup (e.g. GIT_SSH_COMMAND can name a command
|
|
540
|
+
// Git executes). The most credential-prone / askpass variables (GIT_ASKPASS,
|
|
541
|
+
// SSH_ASKPASS, GIT_PROXY_COMMAND) are intentionally NOT inherited by default — they
|
|
542
|
+
// can carry inline credentials or run a helper that reads secrets from the
|
|
543
|
+
// environment, which would weaken the traversal-prevention model. Opt into those
|
|
544
|
+
// explicitly via `inheritEnv` when needed.
|
|
545
|
+
"GIT_SSH",
|
|
546
|
+
"GIT_SSH_COMMAND",
|
|
547
|
+
"GIT_SSH_VARIANT",
|
|
548
|
+
"GIT_SSL_CAINFO",
|
|
549
|
+
"GIT_SSL_CAPATH",
|
|
550
|
+
"GIT_TERMINAL_PROMPT",
|
|
551
|
+
"GIT_CONFIG_NOSYSTEM",
|
|
536
552
|
// HTTP(S) proxy configuration (required for Git network operations behind a proxy)
|
|
537
553
|
"HTTP_PROXY",
|
|
538
554
|
"HTTPS_PROXY",
|
|
@@ -563,35 +579,52 @@ var DEFAULT_ENV_ALLOWLIST = [
|
|
|
563
579
|
"NUMBER_OF_PROCESSORS",
|
|
564
580
|
"PROCESSOR_ARCHITECTURE"
|
|
565
581
|
];
|
|
566
|
-
function
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
all[key] = value;
|
|
572
|
-
}
|
|
582
|
+
function pickEnv(parentEnv, predicate) {
|
|
583
|
+
const result = {};
|
|
584
|
+
for (const [key, value] of Object.entries(parentEnv)) {
|
|
585
|
+
if (value !== void 0 && predicate(key)) {
|
|
586
|
+
result[key] = value;
|
|
573
587
|
}
|
|
574
|
-
return all;
|
|
575
588
|
}
|
|
589
|
+
return result;
|
|
590
|
+
}
|
|
591
|
+
function buildAllowlist(inheritEnv) {
|
|
576
592
|
const allow = new Set(inheritEnv === false ? [] : DEFAULT_ENV_ALLOWLIST);
|
|
577
593
|
if (Array.isArray(inheritEnv)) {
|
|
578
594
|
for (const name of inheritEnv) {
|
|
579
595
|
allow.add(name);
|
|
580
596
|
}
|
|
597
|
+
return { allow, remove: void 0 };
|
|
581
598
|
}
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
const result = {};
|
|
585
|
-
for (const [key, value] of Object.entries(parentEnv)) {
|
|
586
|
-
if (value === void 0) {
|
|
587
|
-
continue;
|
|
588
|
-
}
|
|
589
|
-
const allowed = allowLower ? allowLower.has(key.toLowerCase()) : allow.has(key);
|
|
590
|
-
if (allowed) {
|
|
591
|
-
result[key] = value;
|
|
592
|
-
}
|
|
599
|
+
if (inheritEnv === false) {
|
|
600
|
+
return { allow, remove: void 0 };
|
|
593
601
|
}
|
|
594
|
-
|
|
602
|
+
for (const name of inheritEnv.add ?? []) {
|
|
603
|
+
allow.add(name);
|
|
604
|
+
}
|
|
605
|
+
const hasRemove = inheritEnv.remove !== void 0 && inheritEnv.remove.length > 0;
|
|
606
|
+
const remove = hasRemove ? new Set(inheritEnv.remove) : void 0;
|
|
607
|
+
return { allow, remove };
|
|
608
|
+
}
|
|
609
|
+
function makeNameMatcher(names, isWindows) {
|
|
610
|
+
if (!isWindows) {
|
|
611
|
+
return (name) => names.has(name);
|
|
612
|
+
}
|
|
613
|
+
const lower = new Set([...names].map((name) => name.toLowerCase()));
|
|
614
|
+
return (name) => lower.has(name.toLowerCase());
|
|
615
|
+
}
|
|
616
|
+
function resolveInheritedEnv(parentEnv, inheritEnv, platform = "") {
|
|
617
|
+
if (inheritEnv === true) {
|
|
618
|
+
return pickEnv(parentEnv, () => true);
|
|
619
|
+
}
|
|
620
|
+
if (typeof inheritEnv === "function") {
|
|
621
|
+
return pickEnv(parentEnv, inheritEnv);
|
|
622
|
+
}
|
|
623
|
+
const { allow, remove } = buildAllowlist(inheritEnv ?? []);
|
|
624
|
+
const isWindows = platform === "win32";
|
|
625
|
+
const isAllowed = makeNameMatcher(allow, isWindows);
|
|
626
|
+
const isRemoved = remove ? makeNameMatcher(remove, isWindows) : () => false;
|
|
627
|
+
return pickEnv(parentEnv, (name) => isAllowed(name) && !isRemoved(name));
|
|
595
628
|
}
|
|
596
629
|
|
|
597
630
|
// src/runner/cli-runner.ts
|
|
@@ -776,8 +809,11 @@ var CliRunner = class _CliRunner {
|
|
|
776
809
|
*/
|
|
777
810
|
async run(context, args, opts) {
|
|
778
811
|
const argv = this.buildArgv(context, args);
|
|
779
|
-
const { signal, onProgress, onLfsProgress } = opts ?? {};
|
|
812
|
+
const { signal, onProgress, onLfsProgress, env: envOverride } = opts ?? {};
|
|
780
813
|
const env = this.buildEnv();
|
|
814
|
+
if (envOverride) {
|
|
815
|
+
Object.assign(env, envOverride);
|
|
816
|
+
}
|
|
781
817
|
if (onLfsProgress) {
|
|
782
818
|
env.GIT_LFS_FORCE_PROGRESS = "1";
|
|
783
819
|
}
|
|
@@ -1345,7 +1381,7 @@ var BareRepoImpl = class {
|
|
|
1345
1381
|
*/
|
|
1346
1382
|
async push(opts) {
|
|
1347
1383
|
const args = ["push"];
|
|
1348
|
-
if (opts?.onProgress) {
|
|
1384
|
+
if (opts?.onProgress || opts?.onLfsProgress) {
|
|
1349
1385
|
args.push("--progress");
|
|
1350
1386
|
}
|
|
1351
1387
|
if (opts?.force) {
|
|
@@ -2243,7 +2279,7 @@ var WorktreeRepoImpl = class _WorktreeRepoImpl {
|
|
|
2243
2279
|
*/
|
|
2244
2280
|
async push(opts) {
|
|
2245
2281
|
const args = ["push"];
|
|
2246
|
-
if (opts?.onProgress) {
|
|
2282
|
+
if (opts?.onProgress || opts?.onLfsProgress) {
|
|
2247
2283
|
args.push("--progress");
|
|
2248
2284
|
}
|
|
2249
2285
|
if (opts?.verbose) {
|
|
@@ -2348,6 +2384,29 @@ var WorktreeRepoImpl = class _WorktreeRepoImpl {
|
|
|
2348
2384
|
setLfsMode(mode) {
|
|
2349
2385
|
this._lfsMode = mode;
|
|
2350
2386
|
}
|
|
2387
|
+
/**
|
|
2388
|
+
* Per-command environment overrides derived from the configured LFS mode.
|
|
2389
|
+
*
|
|
2390
|
+
* When the repository was opened (or reconfigured) with an object-form LFS
|
|
2391
|
+
* mode requesting `skipSmudge` and/or `skipDownload`, working-tree-populating
|
|
2392
|
+
* operations (checkout, switch, reset, merge, pull, rebase, restore) run with
|
|
2393
|
+
* `GIT_LFS_SKIP_SMUDGE=1`. Git then leaves LFS pointer files in place instead
|
|
2394
|
+
* of downloading their contents during the implicit checkout.
|
|
2395
|
+
*
|
|
2396
|
+
* The objects can be materialized later via the explicit `repo.lfs.pull()` /
|
|
2397
|
+
* `repo.lfs.checkout()` helpers, which use dedicated git-lfs commands and are
|
|
2398
|
+
* not affected by `GIT_LFS_SKIP_SMUDGE`.
|
|
2399
|
+
*
|
|
2400
|
+
* Returns `undefined` for the `'enabled'` / `'disabled'` string modes so the
|
|
2401
|
+
* runner environment is left untouched.
|
|
2402
|
+
*/
|
|
2403
|
+
lfsModeEnv() {
|
|
2404
|
+
const mode = this._lfsMode;
|
|
2405
|
+
if (typeof mode === "object" && (mode.skipSmudge === true || mode.skipDownload === true)) {
|
|
2406
|
+
return { GIT_LFS_SKIP_SMUDGE: "1" };
|
|
2407
|
+
}
|
|
2408
|
+
return void 0;
|
|
2409
|
+
}
|
|
2351
2410
|
// ==========================================================================
|
|
2352
2411
|
// LFS Operations
|
|
2353
2412
|
// ==========================================================================
|
|
@@ -2370,7 +2429,8 @@ var WorktreeRepoImpl = class _WorktreeRepoImpl {
|
|
|
2370
2429
|
}
|
|
2371
2430
|
await this.runner.runOrThrow(this.context, args, {
|
|
2372
2431
|
signal: opts?.signal,
|
|
2373
|
-
onProgress: opts?.onProgress
|
|
2432
|
+
onProgress: opts?.onProgress,
|
|
2433
|
+
onLfsProgress: opts?.onLfsProgress
|
|
2374
2434
|
});
|
|
2375
2435
|
}
|
|
2376
2436
|
async lfsPush(opts) {
|
|
@@ -2399,7 +2459,8 @@ var WorktreeRepoImpl = class _WorktreeRepoImpl {
|
|
|
2399
2459
|
}
|
|
2400
2460
|
await this.runner.runOrThrow(this.context, args, {
|
|
2401
2461
|
signal: opts?.signal,
|
|
2402
|
-
onProgress: opts?.onProgress
|
|
2462
|
+
onProgress: opts?.onProgress,
|
|
2463
|
+
onLfsProgress: opts?.onLfsProgress
|
|
2403
2464
|
});
|
|
2404
2465
|
}
|
|
2405
2466
|
async lfsStatus(opts) {
|
|
@@ -2482,7 +2543,8 @@ var WorktreeRepoImpl = class _WorktreeRepoImpl {
|
|
|
2482
2543
|
const args = ["lfs", "push", remote, "--object-id", ...batch];
|
|
2483
2544
|
const result = await this.runner.run(this.context, args, {
|
|
2484
2545
|
signal: opts?.signal,
|
|
2485
|
-
onProgress: opts?.onProgress
|
|
2546
|
+
onProgress: opts?.onProgress,
|
|
2547
|
+
onLfsProgress: opts?.onLfsProgress
|
|
2486
2548
|
});
|
|
2487
2549
|
if (result.exitCode === 0) {
|
|
2488
2550
|
uploadedCount += batch.length;
|
|
@@ -2559,7 +2621,8 @@ var WorktreeRepoImpl = class _WorktreeRepoImpl {
|
|
|
2559
2621
|
const args = ["lfs", "fetch", remote, "--", ...batch];
|
|
2560
2622
|
const result = await this.runner.run(this.context, args, {
|
|
2561
2623
|
signal: opts?.signal,
|
|
2562
|
-
onProgress: opts?.onProgress
|
|
2624
|
+
onProgress: opts?.onProgress,
|
|
2625
|
+
onLfsProgress: opts?.onLfsProgress
|
|
2563
2626
|
});
|
|
2564
2627
|
if (result.exitCode === 0) {
|
|
2565
2628
|
downloadedCount += batch.length;
|
|
@@ -2624,7 +2687,7 @@ var WorktreeRepoImpl = class _WorktreeRepoImpl {
|
|
|
2624
2687
|
return;
|
|
2625
2688
|
}
|
|
2626
2689
|
const args = ["lfs", "fetch"];
|
|
2627
|
-
if (opts?.onProgress) {
|
|
2690
|
+
if (opts?.onProgress || opts?.onLfsProgress) {
|
|
2628
2691
|
args.push("--progress");
|
|
2629
2692
|
}
|
|
2630
2693
|
if (opts?.all) {
|
|
@@ -2657,7 +2720,8 @@ var WorktreeRepoImpl = class _WorktreeRepoImpl {
|
|
|
2657
2720
|
}
|
|
2658
2721
|
await this.runner.runOrThrow(this.context, args, {
|
|
2659
2722
|
signal: opts?.signal,
|
|
2660
|
-
onProgress: opts?.onProgress
|
|
2723
|
+
onProgress: opts?.onProgress,
|
|
2724
|
+
onLfsProgress: opts?.onLfsProgress
|
|
2661
2725
|
});
|
|
2662
2726
|
}
|
|
2663
2727
|
async lfsInstall(opts) {
|
|
@@ -3419,7 +3483,8 @@ var WorktreeRepoImpl = class _WorktreeRepoImpl {
|
|
|
3419
3483
|
}
|
|
3420
3484
|
}
|
|
3421
3485
|
await this.runner.runOrThrow(this.context, args, {
|
|
3422
|
-
signal: opts?.signal
|
|
3486
|
+
signal: opts?.signal,
|
|
3487
|
+
env: this.lfsModeEnv()
|
|
3423
3488
|
});
|
|
3424
3489
|
}
|
|
3425
3490
|
// ==========================================================================
|
|
@@ -3776,7 +3841,8 @@ var WorktreeRepoImpl = class _WorktreeRepoImpl {
|
|
|
3776
3841
|
}
|
|
3777
3842
|
args.push(branch);
|
|
3778
3843
|
const result = await this.runner.run(this.context, args, {
|
|
3779
|
-
signal: opts?.signal
|
|
3844
|
+
signal: opts?.signal,
|
|
3845
|
+
env: this.lfsModeEnv()
|
|
3780
3846
|
});
|
|
3781
3847
|
if (result.exitCode !== 0) {
|
|
3782
3848
|
const statusResult = await this.runner.runOrThrow(this.context, ["status", "--porcelain"], {
|
|
@@ -3805,7 +3871,7 @@ var WorktreeRepoImpl = class _WorktreeRepoImpl {
|
|
|
3805
3871
|
// ==========================================================================
|
|
3806
3872
|
async pull(opts) {
|
|
3807
3873
|
const args = ["pull"];
|
|
3808
|
-
if (opts?.onProgress) {
|
|
3874
|
+
if (opts?.onProgress || opts?.onLfsProgress) {
|
|
3809
3875
|
args.push("--progress");
|
|
3810
3876
|
}
|
|
3811
3877
|
if (opts?.rebase === true) {
|
|
@@ -3953,7 +4019,9 @@ var WorktreeRepoImpl = class _WorktreeRepoImpl {
|
|
|
3953
4019
|
}
|
|
3954
4020
|
await this.runner.runOrThrow(this.context, args, {
|
|
3955
4021
|
signal: opts?.signal,
|
|
3956
|
-
onProgress: opts?.onProgress
|
|
4022
|
+
onProgress: opts?.onProgress,
|
|
4023
|
+
onLfsProgress: opts?.onLfsProgress,
|
|
4024
|
+
env: this.lfsModeEnv()
|
|
3957
4025
|
});
|
|
3958
4026
|
}
|
|
3959
4027
|
// ==========================================================================
|
|
@@ -3983,7 +4051,8 @@ var WorktreeRepoImpl = class _WorktreeRepoImpl {
|
|
|
3983
4051
|
args.push(target);
|
|
3984
4052
|
}
|
|
3985
4053
|
await this.runner.runOrThrow(this.context, args, {
|
|
3986
|
-
signal: opts?.signal
|
|
4054
|
+
signal: opts?.signal,
|
|
4055
|
+
env: this.lfsModeEnv()
|
|
3987
4056
|
});
|
|
3988
4057
|
}
|
|
3989
4058
|
// ==========================================================================
|
|
@@ -4179,7 +4248,8 @@ var WorktreeRepoImpl = class _WorktreeRepoImpl {
|
|
|
4179
4248
|
args.push(opts.startPoint);
|
|
4180
4249
|
}
|
|
4181
4250
|
await this.runner.runOrThrow(this.context, args, {
|
|
4182
|
-
signal: opts?.signal
|
|
4251
|
+
signal: opts?.signal,
|
|
4252
|
+
env: this.lfsModeEnv()
|
|
4183
4253
|
});
|
|
4184
4254
|
}
|
|
4185
4255
|
// ==========================================================================
|
|
@@ -4606,7 +4676,8 @@ var WorktreeRepoImpl = class _WorktreeRepoImpl {
|
|
|
4606
4676
|
args.push(opts.upstream);
|
|
4607
4677
|
}
|
|
4608
4678
|
await this.runner.runOrThrow(this.context, args, {
|
|
4609
|
-
signal: opts?.signal
|
|
4679
|
+
signal: opts?.signal,
|
|
4680
|
+
env: this.lfsModeEnv()
|
|
4610
4681
|
});
|
|
4611
4682
|
}
|
|
4612
4683
|
// ==========================================================================
|
|
@@ -4664,7 +4735,8 @@ var WorktreeRepoImpl = class _WorktreeRepoImpl {
|
|
|
4664
4735
|
const pathList = Array.isArray(paths) ? paths : [paths];
|
|
4665
4736
|
args.push("--", ...pathList);
|
|
4666
4737
|
await this.runner.runOrThrow(this.context, args, {
|
|
4667
|
-
signal: opts?.signal
|
|
4738
|
+
signal: opts?.signal,
|
|
4739
|
+
env: this.lfsModeEnv()
|
|
4668
4740
|
});
|
|
4669
4741
|
}
|
|
4670
4742
|
// ==========================================================================
|
|
@@ -5677,7 +5749,7 @@ var GitImpl = class {
|
|
|
5677
5749
|
}
|
|
5678
5750
|
async clone(url, path, opts) {
|
|
5679
5751
|
const args = buildCloneArgs(opts);
|
|
5680
|
-
if (opts?.onProgress) {
|
|
5752
|
+
if (opts?.onProgress || opts?.onLfsProgress) {
|
|
5681
5753
|
args.push("--progress");
|
|
5682
5754
|
}
|
|
5683
5755
|
args.push(url, path);
|