@gitkraken/core-gitlens 0.37.1 → 0.38.1
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/CHANGELOG.md +69 -1
- package/dist/git/cache.d.ts +128 -8
- package/dist/git/cache.js +425 -46
- package/dist/git/cache.js.map +1 -1
- package/dist/git/features.d.ts +1 -1
- package/dist/git/features.js +3 -0
- package/dist/git/features.js.map +1 -1
- package/dist/git/providers/branches.d.ts +42 -1
- package/dist/git/providers/diff.d.ts +17 -0
- package/dist/git/providers/provider.d.ts +7 -0
- package/dist/git/providers/shared/remotes.js +8 -4
- package/dist/git/providers/shared/remotes.js.map +1 -1
- package/dist/git/remotes/matcher.js +2 -2
- package/dist/git/remotes/matcher.js.map +1 -1
- package/dist/git/repositoryService.d.ts +16 -1
- package/dist/git/repositoryService.js +51 -3
- package/dist/git/repositoryService.js.map +1 -1
- package/dist/git/run.types.d.ts +1 -0
- package/dist/git/service.js +6 -2
- package/dist/git/service.js.map +1 -1
- package/dist/git/utils/fileStatus.utils.d.ts +5 -0
- package/dist/git/utils/fileStatus.utils.js +18 -1
- package/dist/git/utils/fileStatus.utils.js.map +1 -1
- package/dist/git/watching/changeEvent.d.ts +13 -3
- package/dist/git/watching/changeEvent.js +15 -4
- package/dist/git/watching/changeEvent.js.map +1 -1
- package/dist/git/watching/changeOrdinal.d.ts +9 -0
- package/dist/git/watching/changeOrdinal.js +14 -0
- package/dist/git/watching/changeOrdinal.js.map +1 -0
- package/dist/git/watching/unwatchedCacheValidator.d.ts +38 -5
- package/dist/git/watching/unwatchedCacheValidator.js +180 -36
- package/dist/git/watching/unwatchedCacheValidator.js.map +1 -1
- package/dist/git/watching/watchGroup.d.ts +63 -14
- package/dist/git/watching/watchGroup.js +213 -74
- package/dist/git/watching/watchGroup.js.map +1 -1
- package/dist/git/watching/watchService.js +4 -3
- package/dist/git/watching/watchService.js.map +1 -1
- package/dist/git/watching/watchSession.d.ts +10 -2
- package/dist/git/watching/watchSession.js +18 -4
- package/dist/git/watching/watchSession.js.map +1 -1
- package/dist/git/watching/watcherPatterns.d.ts +18 -4
- package/dist/git/watching/watcherPatterns.js +39 -8
- package/dist/git/watching/watcherPatterns.js.map +1 -1
- package/dist/git/watching/worktreeSummary.d.ts +23 -12
- package/dist/git/watching/worktreeSummary.js +164 -41
- package/dist/git/watching/worktreeSummary.js.map +1 -1
- package/dist/git-cli/cliGitProvider.d.ts +1 -0
- package/dist/git-cli/cliGitProvider.js +11 -2
- package/dist/git-cli/cliGitProvider.js.map +1 -1
- package/dist/git-cli/exec/git.d.ts +7 -2
- package/dist/git-cli/exec/git.js +46 -10
- package/dist/git-cli/exec/git.js.map +1 -1
- package/dist/git-cli/exec/headState.d.ts +24 -0
- package/dist/git-cli/exec/headState.js +46 -6
- package/dist/git-cli/exec/headState.js.map +1 -1
- package/dist/git-cli/parsers/logParser.js +6 -3
- package/dist/git-cli/parsers/logParser.js.map +1 -1
- package/dist/git-cli/providers/branches.d.ts +135 -10
- package/dist/git-cli/providers/branches.js +622 -80
- package/dist/git-cli/providers/branches.js.map +1 -1
- package/dist/git-cli/providers/commits.d.ts +16 -0
- package/dist/git-cli/providers/commits.js +80 -28
- package/dist/git-cli/providers/commits.js.map +1 -1
- package/dist/git-cli/providers/config.d.ts +10 -0
- package/dist/git-cli/providers/config.js +50 -12
- package/dist/git-cli/providers/config.js.map +1 -1
- package/dist/git-cli/providers/contributors.js +11 -7
- package/dist/git-cli/providers/contributors.js.map +1 -1
- package/dist/git-cli/providers/diff.d.ts +12 -0
- package/dist/git-cli/providers/diff.js +107 -15
- package/dist/git-cli/providers/diff.js.map +1 -1
- package/dist/git-cli/providers/graph.js +32 -25
- package/dist/git-cli/providers/graph.js.map +1 -1
- package/dist/git-cli/providers/operations.d.ts +37 -3
- package/dist/git-cli/providers/operations.js +124 -46
- package/dist/git-cli/providers/operations.js.map +1 -1
- package/dist/git-cli/providers/patch.js +1 -1
- package/dist/git-cli/providers/patch.js.map +1 -1
- package/dist/git-cli/providers/refs.d.ts +1 -1
- package/dist/git-cli/providers/refs.js +10 -11
- package/dist/git-cli/providers/refs.js.map +1 -1
- package/dist/git-cli/providers/status.d.ts +4 -5
- package/dist/git-cli/providers/status.js +36 -33
- package/dist/git-cli/providers/status.js.map +1 -1
- package/dist/git-cli/providers/tags.d.ts +8 -0
- package/dist/git-cli/providers/tags.js +53 -34
- package/dist/git-cli/providers/tags.js.map +1 -1
- package/dist/git-cli/service.d.ts +15 -0
- package/dist/git-cli/service.js +19 -1
- package/dist/git-cli/service.js.map +1 -1
- package/dist/plus/git-github/providers/github/diff.d.ts +1 -0
- package/dist/plus/git-github/providers/github/diff.js +6 -1
- package/dist/plus/git-github/providers/github/diff.js.map +1 -1
- package/dist/plus/integrations/integrationService.js +9 -0
- package/dist/plus/integrations/integrationService.js.map +1 -1
- package/dist/plus/integrations/providers/jira-server.js +1 -1
- package/dist/plus/integrations/providers/jira-server.js.map +1 -1
- package/dist/plus/integrations/providers/jira.d.ts +20 -9
- package/dist/plus/integrations/providers/jira.js +114 -99
- package/dist/plus/integrations/providers/jira.js.map +1 -1
- package/dist/plus/integrations/providers/linear.d.ts +11 -4
- package/dist/plus/integrations/providers/linear.js +75 -32
- package/dist/plus/integrations/providers/linear.js.map +1 -1
- package/dist/plus/integrations/providers/utils/discoveryCache.d.ts +35 -4
- package/dist/plus/integrations/providers/utils/discoveryCache.js +45 -11
- package/dist/plus/integrations/providers/utils/discoveryCache.js.map +1 -1
- package/dist/utils/env/node/exec.d.ts +8 -4
- package/dist/utils/env/node/exec.js +115 -9
- package/dist/utils/env/node/exec.js.map +1 -1
- package/dist/utils/holdOffMap.d.ts +23 -0
- package/dist/utils/holdOffMap.js +43 -0
- package/dist/utils/holdOffMap.js.map +1 -0
- package/dist/utils/promiseCache.d.ts +15 -2
- package/dist/utils/promiseCache.js +34 -4
- package/dist/utils/promiseCache.js.map +1 -1
- package/package.json +1 -1
|
@@ -14,11 +14,17 @@ import { Cache } from "../../git/cache.js";
|
|
|
14
14
|
import { Git } from "../exec/git.js";
|
|
15
15
|
import { CliGitProviderInternal } from "../cliGitProvider.js";
|
|
16
16
|
//#region ../git-cli/src/providers/commits.d.ts
|
|
17
|
+
/** The clock a repository's limited-renames wait is measured on, exported for testing */
|
|
18
|
+
export declare const commitReadClock: {
|
|
19
|
+
now: () => number;
|
|
20
|
+
};
|
|
17
21
|
export declare class CommitsGitSubProvider implements GitCommitsSubProvider {
|
|
18
22
|
private readonly context;
|
|
19
23
|
private readonly git;
|
|
20
24
|
private readonly cache;
|
|
21
25
|
private readonly provider;
|
|
26
|
+
/** When a commit read of each repository (by common path) last ran out of time with unlimited rename detection */
|
|
27
|
+
private readonly limitedRenamesSince;
|
|
22
28
|
constructor(context: GitServiceContext, git: Git, cache: Cache, provider: CliGitProviderInternal);
|
|
23
29
|
/**
|
|
24
30
|
* Creates a commit object from a tree via `commit-tree`, with explicit (zero or more) parents and an
|
|
@@ -99,6 +105,16 @@ export declare class CommitsGitSubProvider implements GitCommitsSubProvider {
|
|
|
99
105
|
}, cancellation?: AbortSignal): Promise<LeftRightCommitCountResult | undefined>;
|
|
100
106
|
getLog(repoPath: string, rev?: string | undefined, options?: GitLogOptions, cancellation?: AbortSignal): Promise<GitLog | undefined>;
|
|
101
107
|
private getLogCore;
|
|
108
|
+
/**
|
|
109
|
+
* Reads commits with unlimited rename detection, which git can take very long over for a commit that moves and edits
|
|
110
|
+
* a great many files. A read that runs out of time is read once more with `-l{@link renameLimit}` straight after
|
|
111
|
+
* the rename argument: only a commit with more rename candidates than that loses its inexact renames (exact and
|
|
112
|
+
* same-name moves, and every other commit read, keep theirs). The repository's later reads then use it straight away
|
|
113
|
+
* for a while (see {@link commitReadClock}) rather than waiting out the limit again. A caller leaving is not running
|
|
114
|
+
* out of time, and is not remembered. `read` is told whether it is the first attempt, which is the one a time limit
|
|
115
|
+
* applies to.
|
|
116
|
+
*/
|
|
117
|
+
private readWithRenameFallback;
|
|
102
118
|
private getLogCoreMoreFn;
|
|
103
119
|
getLogForPath(repoPath: string | undefined, pathOrUri: string | Uri, rev?: string | undefined, options?: GitLogForPathOptions, cancellation?: AbortSignal): Promise<GitLog | undefined>;
|
|
104
120
|
private getLogForPathCore;
|
|
@@ -18,6 +18,7 @@ import { createUncommittedChangesCommit } from "../../git/utils/commit.utils.js"
|
|
|
18
18
|
import { GitCommit, GitCommitIdentity } from "../../git/models/commit.js";
|
|
19
19
|
import { isUserMatch } from "../../git/utils/user.utils.js";
|
|
20
20
|
import { compareReachableRefs } from "../../git/utils/sorting.js";
|
|
21
|
+
import { HoldOffMap } from "../../utils/holdOffMap.js";
|
|
21
22
|
import { parseSearchQueryGitCommand } from "../../git/utils/search.utils.js";
|
|
22
23
|
import { getCommitsLogParser, getShaAndDatesLogParser, getShaAndFilesAndStatsLogParser, getShaLogParser } from "../parsers/logParser.js";
|
|
23
24
|
import { getReflogParser, parseGitRefLog } from "../parsers/reflogParser.js";
|
|
@@ -32,6 +33,7 @@ const reflogCommands = ["merge", "pull"];
|
|
|
32
33
|
/** Keeps `filterUnpublishedShas` well inside Windows' ~32K command-line cap (40 hex chars + separator each). */
|
|
33
34
|
const maxShasPerRevListSpawn = 500;
|
|
34
35
|
const fullShaRegex = /^[0-9a-f]{40}$/;
|
|
36
|
+
const unbornHeadRegex = /bad revision 'HEAD'|ambiguous argument 'HEAD': unknown revision/;
|
|
35
37
|
/** Bounds the diff text held in memory, and piped to `patch-id`, per `diff-tree` spawn. */
|
|
36
38
|
const maxCommitsPerPatchIdSpawn = 250;
|
|
37
39
|
/**
|
|
@@ -118,11 +120,31 @@ function getCommitCountKey(rev, excluding) {
|
|
|
118
120
|
if (excluding == null) return rev;
|
|
119
121
|
return `${rev}\0${getRefExclusionsKey(excluding)}`;
|
|
120
122
|
}
|
|
123
|
+
/**
|
|
124
|
+
* How long a repository's commit reads, after one ran out of time with unlimited rename detection, are read with
|
|
125
|
+
* {@link renameLimit} straight away. Running out of time can be the machine being busy rather than a commit being too
|
|
126
|
+
* costly, so unlimited renames are tried again later rather than given up on for good
|
|
127
|
+
*/
|
|
128
|
+
const limitedRenamesWait = 6e5;
|
|
129
|
+
/**
|
|
130
|
+
* The number of files git considers in the exhaustive (inexact) part of rename detection (`-l`) for a commit read again
|
|
131
|
+
* after running out of time. It is git's own default for `diff.renameLimit`, not a tuned number; core's reads set
|
|
132
|
+
* `diff.renameLimit=0` (unlimited) and a larger commit then skips only that part of the detection
|
|
133
|
+
*/
|
|
134
|
+
const renameLimit = 1e3;
|
|
135
|
+
/** The clock a repository's limited-renames wait is measured on, exported for testing */
|
|
136
|
+
const commitReadClock = { now: () => Date.now() };
|
|
137
|
+
/** Whether `ex` is a git read, run or stream, running out of its time limit */
|
|
138
|
+
function isTimeout(ex) {
|
|
139
|
+
return isCancellationError(ex) && ex.reason === "timeout";
|
|
140
|
+
}
|
|
121
141
|
var CommitsGitSubProvider = class {
|
|
122
142
|
context;
|
|
123
143
|
git;
|
|
124
144
|
cache;
|
|
125
145
|
provider;
|
|
146
|
+
/** When a commit read of each repository (by common path) last ran out of time with unlimited rename detection */
|
|
147
|
+
limitedRenamesSince = new HoldOffMap(limitedRenamesWait, 256, commitReadClock);
|
|
126
148
|
constructor(context, git, cache, provider) {
|
|
127
149
|
this.context = context;
|
|
128
150
|
this.git = git;
|
|
@@ -298,7 +320,7 @@ var CommitsGitSubProvider = class {
|
|
|
298
320
|
}
|
|
299
321
|
for (const sha of batch) {
|
|
300
322
|
const id = batchIds?.get(sha);
|
|
301
|
-
this.cache.patchIds.
|
|
323
|
+
this.cache.patchIds.set(repoPath, `${sha}${keySuffix}`, Promise.resolve(id));
|
|
302
324
|
if (id != null) ids.set(sha, id);
|
|
303
325
|
}
|
|
304
326
|
}
|
|
@@ -452,14 +474,14 @@ var CommitsGitSubProvider = class {
|
|
|
452
474
|
getCommitReachability(repoPath, rev, cancellation) {
|
|
453
475
|
if (repoPath == null || isUncommitted(rev)) return Promise.resolve(void 0);
|
|
454
476
|
const scope = getScopedLogger();
|
|
455
|
-
const getCore = async (cacheable) => {
|
|
477
|
+
const getCore = async (cacheable, signal) => {
|
|
456
478
|
try {
|
|
457
479
|
const result = await this.git.run({
|
|
458
480
|
cwd: repoPath,
|
|
459
|
-
cancellation,
|
|
481
|
+
cancellation: signal ?? cancellation,
|
|
460
482
|
errors: "ignore"
|
|
461
483
|
}, "for-each-ref", "--contains", rev, "--format=%(HEAD)%(refname)", "--sort=-version:refname", "--sort=-committerdate", "--sort=-HEAD", "refs/heads/", "refs/remotes/", "refs/tags/");
|
|
462
|
-
if (cancellation?.aborted) throw new CancellationError();
|
|
484
|
+
if ((signal ?? cancellation)?.aborted) throw new CancellationError();
|
|
463
485
|
const refs = [];
|
|
464
486
|
if (result?.stdout) {
|
|
465
487
|
const lines = result.stdout.split("\n");
|
|
@@ -498,7 +520,7 @@ var CommitsGitSubProvider = class {
|
|
|
498
520
|
return;
|
|
499
521
|
}
|
|
500
522
|
};
|
|
501
|
-
return this.cache.reachability.getOrCreate(repoPath, rev, getCore);
|
|
523
|
+
return this.cache.reachability.getOrCreate(repoPath, rev, getCore, { cancellation });
|
|
502
524
|
}
|
|
503
525
|
async getIncomingActivity(repoPath, options, cancellation) {
|
|
504
526
|
const scope = getScopedLogger();
|
|
@@ -556,31 +578,35 @@ var CommitsGitSubProvider = class {
|
|
|
556
578
|
return mergedLog;
|
|
557
579
|
};
|
|
558
580
|
}
|
|
559
|
-
getInitialCommitSha(repoPath, cancellation) {
|
|
560
|
-
|
|
561
|
-
|
|
581
|
+
async getInitialCommitSha(repoPath, cancellation) {
|
|
582
|
+
try {
|
|
583
|
+
return await this.cache.getInitialCommitSha(repoPath, async (commonPath, _cacheable, signal) => {
|
|
562
584
|
const result = await this.git.run({
|
|
563
585
|
cwd: commonPath,
|
|
564
|
-
cancellation,
|
|
586
|
+
cancellation: signal ?? cancellation,
|
|
565
587
|
errors: "ignore"
|
|
566
588
|
}, "rev-list", `--max-parents=0`, "HEAD", "--");
|
|
567
|
-
if (result.completion.status === "cancelled" ||
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
589
|
+
if (result.completion.status === "cancelled" || signal?.aborted) throw new CancellationError();
|
|
590
|
+
if (result.completion.status === "exited") {
|
|
591
|
+
if (result.exitCode === 0) return result.stdout.trim().split("\n")[0] || void 0;
|
|
592
|
+
if (unbornHeadRegex.test(result.stderr ?? "")) return void 0;
|
|
593
|
+
}
|
|
594
|
+
throw new Error("Unable to read the initial commit");
|
|
595
|
+
}, cancellation);
|
|
596
|
+
} catch (ex) {
|
|
597
|
+
if (isCancellationError(ex)) throw ex;
|
|
598
|
+
return;
|
|
599
|
+
}
|
|
574
600
|
}
|
|
575
601
|
async getLeftRightCommitCount(repoPath, range, options, cancellation) {
|
|
576
602
|
const authors = options?.authors?.length ? options.authors.map((a) => `--author=^${escapeRegex(a.name ?? "")} <${escapeRegex(a.email ?? "")}>$`) : [];
|
|
577
|
-
const run = async () => {
|
|
603
|
+
const run = async (signal) => {
|
|
578
604
|
const result = await this.git.run({
|
|
579
605
|
cwd: repoPath,
|
|
580
|
-
cancellation,
|
|
606
|
+
cancellation: signal ?? cancellation,
|
|
581
607
|
errors: "ignore"
|
|
582
608
|
}, "rev-list", "--left-right", "--count", ...authors, options?.excludeMerges ? "--no-merges" : void 0, range, "--");
|
|
583
|
-
if (result.completion.status === "cancelled" || cancellation?.aborted) throw new CancellationError();
|
|
609
|
+
if (result.completion.status === "cancelled" || (signal ?? cancellation)?.aborted) throw new CancellationError();
|
|
584
610
|
if (!result.stdout) return void 0;
|
|
585
611
|
const parts = result.stdout.split(" ");
|
|
586
612
|
if (parts.length !== 2) return void 0;
|
|
@@ -594,7 +620,7 @@ var CommitsGitSubProvider = class {
|
|
|
594
620
|
};
|
|
595
621
|
if (authors.length > 0) return run();
|
|
596
622
|
const cacheKey = `${range}\x1f${options?.excludeMerges ? "no-merges" : ""}`;
|
|
597
|
-
return this.cache.leftRightCommitCount.getOrCreate(repoPath, cacheKey, run);
|
|
623
|
+
return this.cache.leftRightCommitCount.getOrCreate(repoPath, cacheKey, (_cacheable, signal) => run(signal), { cancellation });
|
|
598
624
|
}
|
|
599
625
|
async getLog(repoPath, rev, options, cancellation) {
|
|
600
626
|
return this.getLogCore(repoPath, rev, options, cancellation);
|
|
@@ -610,14 +636,15 @@ var CommitsGitSubProvider = class {
|
|
|
610
636
|
const parser = getCommitsLogParser(includeFiles, Boolean(options?.path?.pathspec && options?.path?.range));
|
|
611
637
|
const args = ["log", ...parser.arguments];
|
|
612
638
|
const similarityThreshold = options?.similarityThreshold ?? cfg?.commits.similarityThreshold;
|
|
613
|
-
|
|
639
|
+
const renamesArg = `-M${similarityThreshold == null ? "" : `${similarityThreshold}%`}`;
|
|
640
|
+
args.push(renamesArg, "--use-mailmap");
|
|
614
641
|
if (options?.all) {
|
|
615
642
|
args.push("--all");
|
|
616
643
|
if (options?.path?.pathspec) args.push("--single-worktree");
|
|
617
644
|
}
|
|
618
645
|
const merges = options?.merges ?? true;
|
|
619
646
|
if (merges) {
|
|
620
|
-
if (isSingleCommit) args.push("-m");
|
|
647
|
+
if (isSingleCommit) args.push(await this.git.supports("git:log:diff-merges") ? "--diff-merges=first-parent" : "-m");
|
|
621
648
|
args.push(merges === "first-parent" ? "--first-parent" : "--no-min-parents");
|
|
622
649
|
} else args.push("--no-merges");
|
|
623
650
|
const ordering = options?.ordering ?? cfg?.commits.ordering;
|
|
@@ -671,7 +698,11 @@ var CommitsGitSubProvider = class {
|
|
|
671
698
|
} } : void 0,
|
|
672
699
|
...isEagerPagedFileLog ? { slownessCategory: "commitFiles" } : void 0
|
|
673
700
|
};
|
|
674
|
-
|
|
701
|
+
const parse = (output) => parseCommits(parser, output, repoPath, pathspec, limit, void 0, currentUser);
|
|
702
|
+
let { commits, count } = isEagerPagedFileLog && limit > 0 ? await this.readWithRenameFallback(repoPath, args, renamesArg, cancellation, (readArgs, firstAttempt) => parse(this.git.stream(firstAttempt ? {
|
|
703
|
+
...cmdOpts,
|
|
704
|
+
timeout: this.git.options.gitTimeout ?? 6e4
|
|
705
|
+
} : cmdOpts, ...readArgs))) : isSingleCommit && !options?.path?.pathspec ? await this.readWithRenameFallback(repoPath, args, renamesArg, cancellation, (readArgs) => parse(this.git.run(cmdOpts, ...readArgs))) : await parse(isSingleCommit ? this.git.run(cmdOpts, ...args) : this.git.stream(cmdOpts, ...args));
|
|
675
706
|
if (rev == null && pathspec && !commits.size) {
|
|
676
707
|
const status = await this.provider.status?.getStatusForFile?.(repoPath, pathspec, void 0, cancellation);
|
|
677
708
|
if (status?.originalPath != null) {
|
|
@@ -741,6 +772,27 @@ var CommitsGitSubProvider = class {
|
|
|
741
772
|
return;
|
|
742
773
|
}
|
|
743
774
|
}
|
|
775
|
+
/**
|
|
776
|
+
* Reads commits with unlimited rename detection, which git can take very long over for a commit that moves and edits
|
|
777
|
+
* a great many files. A read that runs out of time is read once more with `-l{@link renameLimit}` straight after
|
|
778
|
+
* the rename argument: only a commit with more rename candidates than that loses its inexact renames (exact and
|
|
779
|
+
* same-name moves, and every other commit read, keep theirs). The repository's later reads then use it straight away
|
|
780
|
+
* for a while (see {@link commitReadClock}) rather than waiting out the limit again. A caller leaving is not running
|
|
781
|
+
* out of time, and is not remembered. `read` is told whether it is the first attempt, which is the one a time limit
|
|
782
|
+
* applies to.
|
|
783
|
+
*/
|
|
784
|
+
async readWithRenameFallback(repoPath, args, renamesArg, cancellation, read) {
|
|
785
|
+
const limitedArgs = args.flatMap((a) => a === renamesArg ? [a, `-l${renameLimit}`] : [a]);
|
|
786
|
+
const commonPath = this.cache.getCommonPath(repoPath);
|
|
787
|
+
if (this.limitedRenamesSince.isHeld(commonPath)) return read(limitedArgs, false);
|
|
788
|
+
try {
|
|
789
|
+
return await read(args, true);
|
|
790
|
+
} catch (ex) {
|
|
791
|
+
if (cancellation?.aborted || !isTimeout(ex)) throw ex;
|
|
792
|
+
this.limitedRenamesSince.hold(commonPath, true);
|
|
793
|
+
return read(limitedArgs, false);
|
|
794
|
+
}
|
|
795
|
+
}
|
|
744
796
|
getLogCoreMoreFn(log, rev, options) {
|
|
745
797
|
return async (limit) => {
|
|
746
798
|
const moreUntil = limit != null && typeof limit === "object" ? limit.until : void 0;
|
|
@@ -947,7 +999,7 @@ var CommitsGitSubProvider = class {
|
|
|
947
999
|
options.ordering ??= cfg?.commits.ordering ?? void 0;
|
|
948
1000
|
options.similarityThreshold ??= cfg?.commits.similarityThreshold;
|
|
949
1001
|
options.merges ??= true;
|
|
950
|
-
const getCore = async () => {
|
|
1002
|
+
const getCore = async (signal) => {
|
|
951
1003
|
try {
|
|
952
1004
|
const parser = getShaLogParser();
|
|
953
1005
|
const args = [...parser.arguments];
|
|
@@ -975,7 +1027,7 @@ var CommitsGitSubProvider = class {
|
|
|
975
1027
|
if (pathspec) args.push(pathspec);
|
|
976
1028
|
const result = await this.git.run({
|
|
977
1029
|
cwd: repoPath,
|
|
978
|
-
cancellation,
|
|
1030
|
+
cancellation: signal ?? cancellation,
|
|
979
1031
|
configs: gitConfigsLog
|
|
980
1032
|
}, "log", ...args);
|
|
981
1033
|
return [...parser.parse(result.stdout)];
|
|
@@ -986,7 +1038,7 @@ var CommitsGitSubProvider = class {
|
|
|
986
1038
|
return [];
|
|
987
1039
|
}
|
|
988
1040
|
};
|
|
989
|
-
if (!options.pathOrUri && !options.authors?.length && !options.reverse && !options.all) return this.cache.logShas.getOrCreate(repoPath, `${rev ?? ""}:${options.ordering ?? ""}:${options.limit}:${options.merges}:${options.since ?? ""}${options.excluding == null ? "" : `:${getRefExclusionsKey(options.excluding)}`}`, () => getCore());
|
|
1041
|
+
if (!options.pathOrUri && !options.authors?.length && !options.reverse && !options.all) return this.cache.logShas.getOrCreate(repoPath, `${rev ?? ""}:${options.ordering ?? ""}:${options.limit}:${options.merges}:${options.since ?? ""}${options.excluding == null ? "" : `:${getRefExclusionsKey(options.excluding)}`}`, (_cacheable, signal) => getCore(signal), { cancellation });
|
|
990
1042
|
return getCore();
|
|
991
1043
|
}
|
|
992
1044
|
async getOldestUnpushedShaForPath(repoPath, pathOrUri, cancellation) {
|
|
@@ -1369,7 +1421,7 @@ async function parseCommits(parser, resultOrStream, repoPath, pathspec, limit, s
|
|
|
1369
1421
|
} finally {
|
|
1370
1422
|
_usingCtx3.d();
|
|
1371
1423
|
}
|
|
1372
|
-
_usingCtx$1.u(createDisposable(() => void resultOrStream.return?.(void 0)));
|
|
1424
|
+
_usingCtx$1.u(createDisposable(() => void resultOrStream.return?.(void 0)?.catch(() => {})));
|
|
1373
1425
|
if (stashes?.size) {
|
|
1374
1426
|
const allowFilteredFiles = searchFilters?.files ?? false;
|
|
1375
1427
|
const stashesOnly = searchFilters?.type === "stash";
|
|
@@ -1409,6 +1461,6 @@ async function parseCommits(parser, resultOrStream, repoPath, pathspec, limit, s
|
|
|
1409
1461
|
}
|
|
1410
1462
|
}
|
|
1411
1463
|
//#endregion
|
|
1412
|
-
export { CommitsGitSubProvider, parseCatFileBatchForSshSigners };
|
|
1464
|
+
export { CommitsGitSubProvider, commitReadClock, parseCatFileBatchForSshSigners };
|
|
1413
1465
|
|
|
1414
1466
|
//# sourceMappingURL=commits.js.map
|