@gitkraken/core-gitlens 0.8.0 → 0.9.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 +43 -1
- package/dist/git/cache.d.ts +11 -0
- package/dist/git/cache.js +26 -3
- package/dist/git/cache.js.map +1 -1
- package/dist/git/context.d.ts +3 -2
- package/dist/git/context.js.map +1 -1
- package/dist/git/features.d.ts +1 -1
- package/dist/git/features.js +1 -0
- package/dist/git/features.js.map +1 -1
- package/dist/git/models/reflog.d.ts +6 -0
- package/dist/git/models/reflog.js.map +1 -1
- package/dist/git/models/revision.d.ts +0 -1
- package/dist/git/models/revision.js +1 -2
- package/dist/git/models/revision.js.map +1 -1
- package/dist/git/providers/commits.d.ts +20 -1
- package/dist/git/providers/operations.d.ts +13 -0
- package/dist/git/providers/provider.d.ts +14 -4
- package/dist/git/providers/refs.d.ts +10 -0
- package/dist/git/providers/revision.d.ts +2 -0
- package/dist/git/providers/staging.d.ts +2 -1
- package/dist/git/providers/stash.d.ts +3 -2
- package/dist/git/providers/status.d.ts +4 -0
- package/dist/git/run.types.d.ts +16 -0
- package/dist/git-cli/cliGitProvider.d.ts +24 -3
- package/dist/git-cli/cliGitProvider.js +79 -17
- package/dist/git-cli/cliGitProvider.js.map +1 -1
- package/dist/git-cli/exec/commandClassifier.d.ts +31 -0
- package/dist/git-cli/exec/commandClassifier.js +391 -0
- package/dist/git-cli/exec/commandClassifier.js.map +1 -0
- package/dist/git-cli/exec/git.d.ts +24 -3
- package/dist/git-cli/exec/git.js +116 -12
- package/dist/git-cli/exec/git.js.map +1 -1
- package/dist/git-cli/parsers/reflogParser.d.ts +7 -0
- package/dist/git-cli/parsers/reflogParser.js +11 -1
- package/dist/git-cli/parsers/reflogParser.js.map +1 -1
- package/dist/git-cli/providers/branches.js +16 -14
- package/dist/git-cli/providers/branches.js.map +1 -1
- package/dist/git-cli/providers/commits.d.ts +4 -2
- package/dist/git-cli/providers/commits.js +55 -4
- package/dist/git-cli/providers/commits.js.map +1 -1
- package/dist/git-cli/providers/diff.js +4 -4
- package/dist/git-cli/providers/diff.js.map +1 -1
- package/dist/git-cli/providers/operations.d.ts +12 -0
- package/dist/git-cli/providers/operations.js +26 -3
- package/dist/git-cli/providers/operations.js.map +1 -1
- package/dist/git-cli/providers/patch.js +2 -5
- package/dist/git-cli/providers/patch.js.map +1 -1
- package/dist/git-cli/providers/refs.d.ts +5 -0
- package/dist/git-cli/providers/refs.js +26 -1
- package/dist/git-cli/providers/refs.js.map +1 -1
- package/dist/git-cli/providers/remotes.js +3 -2
- package/dist/git-cli/providers/remotes.js.map +1 -1
- package/dist/git-cli/providers/revision.d.ts +2 -0
- package/dist/git-cli/providers/revision.js +11 -0
- package/dist/git-cli/providers/revision.js.map +1 -1
- package/dist/git-cli/providers/staging.d.ts +2 -1
- package/dist/git-cli/providers/staging.js +12 -7
- package/dist/git-cli/providers/staging.js.map +1 -1
- package/dist/git-cli/providers/stash.d.ts +3 -2
- package/dist/git-cli/providers/stash.js +34 -22
- package/dist/git-cli/providers/stash.js.map +1 -1
- package/dist/git-cli/providers/status.d.ts +2 -0
- package/dist/git-cli/providers/status.js +27 -9
- package/dist/git-cli/providers/status.js.map +1 -1
- package/dist/plus/git-github/api/github.d.ts +13 -0
- package/dist/plus/git-github/api/github.js +36 -6
- package/dist/plus/git-github/api/github.js.map +1 -1
- package/dist/plus/git-github/providers/github/commits.d.ts +4 -2
- package/dist/plus/git-github/providers/github/commits.js +3 -1
- package/dist/plus/git-github/providers/github/commits.js.map +1 -1
- package/dist/plus/git-github/providers/github/revision.d.ts +1 -0
- package/dist/plus/git-github/providers/github/revision.js +5 -0
- package/dist/plus/git-github/providers/github/revision.js.map +1 -1
- package/dist/plus/integrations/collectionMetadata.d.ts +6 -0
- package/dist/plus/integrations/collectionMetadata.js +7 -4
- package/dist/plus/integrations/collectionMetadata.js.map +1 -1
- package/dist/plus/integrations/models/gitHostIntegration.d.ts +13 -0
- package/dist/plus/integrations/models/gitHostIntegration.js +19 -0
- package/dist/plus/integrations/models/gitHostIntegration.js.map +1 -1
- package/dist/plus/integrations/providers/github.d.ts +16 -1
- package/dist/plus/integrations/providers/github.js +39 -1
- package/dist/plus/integrations/providers/github.js.map +1 -1
- package/dist/plus/integrations/reads/resolveRepository.js +26 -5
- package/dist/plus/integrations/reads/resolveRepository.js.map +1 -1
- package/docs/integrations.md +22 -5
- package/docs/kepler-git-write-api-parity.md +140 -14
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,46 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [0.9.1] - 2026-09-29
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
- Adds GitHub and GitHub Enterprise to the refusals `resolveRepository` names. An organization with OAuth App access restrictions that has not approved the OAuth app a token belongs to hides its private repositories from every listing and search without an error, and GraphQL answers a lookup of one exactly as it answers a missing repository, so such a repository resolved as `not-found`, indistinguishable from a deleted one. A GitHub miss is now confirmed over REST (the new `GitHubApi.getRepositoryAccess`), which refuses such a repository with a `403` saying why; the resolution is then `unauthorized` with a warning scoped to the repository (`scope.repositoryId`) and, once the credential is confirmed with a profile read (the new GitHub `validateCredential`), `cause: { reason: 'oauth-app-not-allowed', remedyUrl }`, where `remedyUrl` is the app's page in the user's authorized OAuth apps, addressed by the client id GitHub reports in `X-OAuth-Client-Id`. A REST read that cannot confirm either way keeps the `not-found`, and any other `403` stays scoped with GitHub's own words and no cause. Neither the confirming read nor the credential check raises the reauthentication prompt (`GitHubApi.getCurrentAccount` takes `silent`). A refusal's facts now also read Octokit's `{ status, headers, data }` response, and carry the refused token's OAuth client id (plus/integrations, plus/git-github)
|
|
14
|
+
|
|
15
|
+
### Changed
|
|
16
|
+
|
|
17
|
+
- Changes `resolveRepository`'s `unauthorized` on Azure DevOps, Azure DevOps Server, Bitbucket and Bitbucket Data Center: a `401`/`403` for the repository now settles as a batch read's refused target does, so once the credential checks out, the warning is scoped to that repository (and, on Azure DevOps, named by its `cause`) instead of reported for the connection. GitLab, which has no credential check, is unchanged. Also, a GitHub batch read whose every target is refused now checks the credential once and, when it passes, publishes each refusal scoped to its repository, spending no strike and keeping the session, instead of failing as the connection's (plus/integrations)
|
|
18
|
+
|
|
19
|
+
## [0.9.0] - 2026-09-29
|
|
20
|
+
|
|
21
|
+
### Added
|
|
22
|
+
|
|
23
|
+
- Adds `excluding` to `commits.getLogShas`, the same `GitRefExclusions` `getCommitCount` takes, for listing what `rev` has that other refs don't; GitHub returns no SHAs when it's set (git, git-cli, plus/git-github)
|
|
24
|
+
- Adds `revision.getEmptyTreeSha(repoPath)`, the empty tree's id in the repository's own object format, SHA-1 or SHA-256, cached per repository. GitHub repositories are always SHA-1 (git, git-cli, plus/git-github)
|
|
25
|
+
- Adds `excluding` to `commits.getCommitCount`, counting what `rev` has that other refs don't, such as what deleting a branch would orphan. `branches`, `remotes` and `tags` exclude a whole namespace, and `except` takes full ref names back out of it, which core converts to the short form git's `--exclude` actually matches (a raw `--exclude=refs/heads/x --branches` excludes nothing). GitHub returns `undefined` when `excluding` is set (git, git-cli, plus/git-github)
|
|
26
|
+
- Adds `refs.getReflogEntries(repoPath, ref, { grep })`, a ref's reflog entries (sha and message, newest first) optionally filtered by git's `--grep-reflog` pattern. A failed read rejects rather than resolving `[]`, so "no match" is distinguishable from "never read" (git, git-cli)
|
|
27
|
+
- Adds `untracked` (`'no'`, `'normal'` or `'all'`) and `branch: false` to `status.getStatus`, for a caller that only needs the file list: `branch: false` skips `--branch`, so no upstream ahead/behind is computed, and leaves the result's branch fields unset. Defaults are unchanged (git, git-cli)
|
|
28
|
+
- Adds `folderName` and a trailing `runOptions` to `clone`. `folderName` is used exactly, with no auto-numbering, so git's own refusal of a non-empty folder surfaces; without it the folder is still derived from the URL and numbered past a taken one. `runOptions` carries the clone's `env`, `cancellation` and `timeout` (git, git-cli)
|
|
29
|
+
- Adds `preserveFetchHead` to `ops.fetch` (`--no-write-fetch-head`), for a fetch that must not disturb `FETCH_HEAD` before a user's own `git pull` reads it. Ignored on git older than 2.29, leaving `FETCH_HEAD` written as before (git, git-cli)
|
|
30
|
+
- Adds `refspecs` to `ops.fetch`, passed verbatim after `remote` (`git fetch <remote> <refspec>...`), for fetching one ref into a chosen destination. It never adds `-u`, so git still refuses to write into a checked-out branch. A refspec that writes a local branch or tag also announces `heads` or `tags` (git, git-cli)
|
|
31
|
+
- Adds `notify` to `git.run`'s options, so a raw command announces its own change through `provider.notifyChanged` once it settles, whether it succeeded or failed. `'infer'` classifies the argv: read-only and object-store-only commands announce nothing; a write announces its verb's change kinds for the repository it ran in, the `-C` target when given, and run under `-C` it also announces the kinds every worktree sharing that `.git` sees, such as a branch, tag or stash it wrote, to the caller's own tree, dropping a repository's in-flight runs once however many of its worktrees are named. An explicit list announces exactly those kinds. Left unset, nothing is classified (git, git-cli)
|
|
32
|
+
- Adds a trailing `runOptions` (`env`, `cancellation`, `timeout`) to `stash.applyStash`, `stash.saveStash` and `staging.clean`, as the other long-running operations already take, so a caller can lift the default timeout for a large stash or clean, or cancel one. Defaults are unchanged (git, git-cli)
|
|
33
|
+
|
|
34
|
+
### Changed
|
|
35
|
+
|
|
36
|
+
- **Breaking (git)** — `rootSha` is removed; use `revision.getEmptyTreeSha(repoPath)`
|
|
37
|
+
- **Breaking (git, git-cli, plus/git-github)** — `commits.getCommitCount` takes `options` before `cancellation`, `getCommitCount(repoPath, rev, options?, cancellation?)`. A caller passing a cancellation positionally must move it
|
|
38
|
+
- **Breaking (git)** — `GitRevisionSubProvider` requires `getEmptyTreeSha(repoPath)`, so a custom implementation must add it
|
|
39
|
+
- **Breaking (git, git-cli)** — `provider.notifyChanged` without `cache` now resets only what its `changes` can have made stale — the caches a file watcher's change of the same kinds clears, status clock included — instead of every cache, and fires `cache.onReset` with those types. An empty `changes`, or one naming `unknown`, still resets everything; a kind no cache depends on, such as `starred`, resets nothing and fires no `cache.onReset`. Pass `cache: 'all'` for the old behavior (git, git-cli)
|
|
40
|
+
|
|
41
|
+
### Fixed
|
|
42
|
+
|
|
43
|
+
- Fixes `remotes.removeRemote`, and `remotes.addRemote` with `fetch`, leaving branch lists and history reads cached without the remote-tracking branches they deleted or created, so a count excluding remote branches kept its old answer (git-cli)
|
|
44
|
+
- Fixes every typed write and `provider.notifyChanged` dropping the in-flight git runs of every repository, so identical reads running at once in other repositories each spawned their own process. Only the written repository's runs, its worktrees' included, are dropped now; `git.clearPendingCommands(repoPaths)` takes the paths to drop, and with none still drops all (git-cli)
|
|
45
|
+
- Fixes diffs against a root commit's missing parent, and against a stash's untracked files, failing in a SHA-256 repository, which the hardcoded SHA-1 empty tree doesn't exist in (git-cli)
|
|
46
|
+
- Fixes detecting a branch's base from its reflog failing for a branch named like a tracked file, or named `delete`, `expire` or `exists` (git-cli)
|
|
47
|
+
- Fixes every git command core runs targeting the wrong repository when the host itself was launched by git — from a hook, a `rebase -x` step, or as `GIT_EDITOR` (a VS Code window opened by `git rebase -i`). The inherited `GIT_DIR`, `GIT_WORK_TREE`, `GIT_INDEX_FILE`, `GIT_COMMON_DIR`, `GIT_OBJECT_DIRECTORY`, `GIT_ALTERNATE_OBJECT_DIRECTORIES` and `GIT_NAMESPACE` overrode each command's working directory, and `GIT_CONFIG_PARAMETERS`, `GIT_EXEC_PATH`, `GIT_PREFIX` and `GIT_REFLOG_ACTION` carried the launching command's own state into all of them. They are now dropped from the inherited environment, and so are `GIT_AUTHOR_*` / `GIT_COMMITTER_*` when git launched the host (it always exports `GIT_EXEC_PATH`), since an editor opened for `commit --amend` inherits that commit's author and date; an identity set deliberately still applies. A host's `env` option or a call's own `env` can still set any of them (git-cli)
|
|
48
|
+
|
|
9
49
|
## [0.8.0] - 2026-09-27
|
|
10
50
|
|
|
11
51
|
### Added
|
|
@@ -417,7 +457,9 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
|
|
|
417
457
|
|
|
418
458
|
- Initial release. Bundles `@gitlens/utils`, `@gitlens/git`, `@gitlens/git-cli`, `@gitlens/ai`, and `@gitlens/git-github` into a single core npm package with subpath exports.
|
|
419
459
|
|
|
420
|
-
[unreleased]: https://github.com/gitkraken/vscode-gitlens/compare/releases/core/v0.
|
|
460
|
+
[unreleased]: https://github.com/gitkraken/vscode-gitlens/compare/releases/core/v0.9.1...HEAD
|
|
461
|
+
[0.9.1]: https://github.com/gitkraken/vscode-gitlens/compare/releases/core/v0.9.0...gitkraken:releases/core/v0.9.1
|
|
462
|
+
[0.9.0]: https://github.com/gitkraken/vscode-gitlens/compare/releases/core/v0.8.0...gitkraken:releases/core/v0.9.0
|
|
421
463
|
[0.8.0]: https://github.com/gitkraken/vscode-gitlens/compare/releases/core/v0.7.2...gitkraken:releases/core/v0.8.0
|
|
422
464
|
[0.7.2]: https://github.com/gitkraken/vscode-gitlens/compare/releases/core/v0.7.1...gitkraken:releases/core/v0.7.2
|
|
423
465
|
[0.7.1]: https://github.com/gitkraken/vscode-gitlens/compare/releases/core/v0.7.0...gitkraken:releases/core/v0.7.1
|
package/dist/git/cache.d.ts
CHANGED
|
@@ -101,6 +101,7 @@ export declare class Cache implements Disposable {
|
|
|
101
101
|
get contributorsStats(): RepoPromiseCacheMap<string, GitContributorsStats | undefined>;
|
|
102
102
|
get currentUser(): Map<RepoPath, GitUser | null>;
|
|
103
103
|
get defaultBranchName(): RepoPromiseCacheMap<string, string | undefined>;
|
|
104
|
+
get emptyTreeSha(): PromiseMap<RepoPath, string>;
|
|
104
105
|
get gitDir(): Map<RepoPath, GitDir>;
|
|
105
106
|
get gitIgnore(): Map<RepoPath, GitIgnoreFilter>;
|
|
106
107
|
get gitResults(): RepoPromiseCacheMap<RepoPath, GitResult>;
|
|
@@ -207,7 +208,15 @@ export declare class Cache implements Disposable {
|
|
|
207
208
|
*/
|
|
208
209
|
unregisterRepoPath(repoPath: string): void;
|
|
209
210
|
reset(): void;
|
|
211
|
+
/** Applies a watcher-observed change, sharing reads still in flight (see {@link applyRepositoryChanges}). */
|
|
210
212
|
onRepositoryChanged(repoPath: string, changes: Iterable<RepositoryChange>): void;
|
|
213
|
+
/**
|
|
214
|
+
* Clears what `changes` can have made stale for `repoPath`, advances its status clock, and reconciles a
|
|
215
|
+
* `'gkConfig'` change, returning the cache types it cleared. `inFlight` is as {@link clearCaches}
|
|
216
|
+
* (`'share'`) vs {@link evictCaches} (`'evict'`). `'unknown'` and `'closed'` map to nothing here: the
|
|
217
|
+
* watcher unregisters the path on them, and an announced write resets everything instead.
|
|
218
|
+
*/
|
|
219
|
+
applyRepositoryChanges(repoPath: string, changes: Iterable<RepositoryChange>, inFlight: 'share' | 'evict'): CachedGitTypes[];
|
|
211
220
|
/**
|
|
212
221
|
* Handles a watcher-observed `'gkConfig'` change. Always evicts the cached bulk map (forcing the
|
|
213
222
|
* next read to hit disk). If a reconciler is registered (see {@link setGkConfigReconciler}),
|
|
@@ -316,6 +325,8 @@ export declare class Cache implements Disposable {
|
|
|
316
325
|
/** Clears the cached default branch for one `remote` key (the networked lookup or its `:local` variant). */
|
|
317
326
|
deleteDefaultBranchName(repoPath: string, remote: string): void;
|
|
318
327
|
getInitialCommitSha(repoPath: string, factory: (commonPath: string) => PromiseOrValue<string | undefined>): Promise<string | undefined>;
|
|
328
|
+
/** A rejected factory is never cached (`PromiseMap` evicts on rejection) — a failed read retries next time. */
|
|
329
|
+
getEmptyTreeSha(repoPath: string, factory: (commonPath: string) => PromiseOrValue<string>): Promise<string>;
|
|
319
330
|
getLastFetchedTimestamp(repoPath: string, factory: (commonPath: string) => PromiseOrValue<number | undefined>): Promise<number | undefined>;
|
|
320
331
|
getRefs(repoPath: string, factory: (commonPath: string, cacheable: CacheController, cancellation?: AbortSignal) => PromiseOrValue<RefRecord[]>, cancellation?: AbortSignal): Promise<RefRecord[]>;
|
|
321
332
|
getRefTips(repoPath: string, factory: (commonPath: string, cacheable: CacheController, cancellation?: AbortSignal) => PromiseOrValue<GitRefTip[]>, cancellation?: AbortSignal): Promise<GitRefTip[]>;
|
package/dist/git/cache.js
CHANGED
|
@@ -54,6 +54,7 @@ const sharedCacheKeys = new Set(exhaustiveArray()([
|
|
|
54
54
|
"contributorsLite",
|
|
55
55
|
"contributorsStats",
|
|
56
56
|
"defaultBranchName",
|
|
57
|
+
"emptyTreeSha",
|
|
57
58
|
"gitResults",
|
|
58
59
|
"gkConfigMap",
|
|
59
60
|
"initialCommitSha",
|
|
@@ -94,6 +95,7 @@ function createEmptyCaches() {
|
|
|
94
95
|
currentBranchReference: void 0,
|
|
95
96
|
currentUser: void 0,
|
|
96
97
|
defaultBranchName: void 0,
|
|
98
|
+
emptyTreeSha: void 0,
|
|
97
99
|
gitDir: void 0,
|
|
98
100
|
gitIgnore: void 0,
|
|
99
101
|
gitResults: void 0,
|
|
@@ -237,6 +239,9 @@ var Cache = class Cache {
|
|
|
237
239
|
get defaultBranchName() {
|
|
238
240
|
return this._caches.defaultBranchName ??= new RepoPromiseCacheMap();
|
|
239
241
|
}
|
|
242
|
+
get emptyTreeSha() {
|
|
243
|
+
return this._caches.emptyTreeSha ??= new PromiseMap();
|
|
244
|
+
}
|
|
240
245
|
get gitDir() {
|
|
241
246
|
return this._caches.gitDir ??= /* @__PURE__ */ new Map();
|
|
242
247
|
}
|
|
@@ -420,6 +425,7 @@ var Cache = class Cache {
|
|
|
420
425
|
keysToClear.add("refTips");
|
|
421
426
|
keysToClear.add("commit");
|
|
422
427
|
keysToClear.add("commitCount");
|
|
428
|
+
keysToClear.add("logShas");
|
|
423
429
|
keysToClear.add("resolvedRevisions");
|
|
424
430
|
}
|
|
425
431
|
if (types.includes("tracking")) {
|
|
@@ -599,13 +605,24 @@ var Cache = class Cache {
|
|
|
599
605
|
this._gkConfigReconciler = void 0;
|
|
600
606
|
this._caches = createEmptyCaches();
|
|
601
607
|
}
|
|
608
|
+
/** Applies a watcher-observed change, sharing reads still in flight (see {@link applyRepositoryChanges}). */
|
|
602
609
|
onRepositoryChanged(repoPath, changes) {
|
|
603
610
|
const changesSet = new Set(changes);
|
|
604
|
-
|
|
605
|
-
if (hasAny("unknown", "closed")) {
|
|
611
|
+
if (changesSet.has("unknown") || changesSet.has("closed")) {
|
|
606
612
|
this.unregisterRepoPath(repoPath);
|
|
607
613
|
return;
|
|
608
614
|
}
|
|
615
|
+
this.applyRepositoryChanges(repoPath, changesSet, "share");
|
|
616
|
+
}
|
|
617
|
+
/**
|
|
618
|
+
* Clears what `changes` can have made stale for `repoPath`, advances its status clock, and reconciles a
|
|
619
|
+
* `'gkConfig'` change, returning the cache types it cleared. `inFlight` is as {@link clearCaches}
|
|
620
|
+
* (`'share'`) vs {@link evictCaches} (`'evict'`). `'unknown'` and `'closed'` map to nothing here: the
|
|
621
|
+
* watcher unregisters the path on them, and an announced write resets everything instead.
|
|
622
|
+
*/
|
|
623
|
+
applyRepositoryChanges(repoPath, changes, inFlight) {
|
|
624
|
+
const changesSet = new Set(changes);
|
|
625
|
+
const hasAny = (...c) => c.some((ch) => changesSet.has(ch));
|
|
609
626
|
if (hasAny("index", "head", "heads", "remotes", "ignores", "config")) this.incrementStatusGeneration(repoPath);
|
|
610
627
|
const types = /* @__PURE__ */ new Set();
|
|
611
628
|
if (hasAny("head")) types.add("branch");
|
|
@@ -638,7 +655,8 @@ var Cache = class Cache {
|
|
|
638
655
|
if (hasAny("stash")) types.add("stashes");
|
|
639
656
|
if (hasAny("tags")) types.add("tags");
|
|
640
657
|
if (hasAny("worktrees")) types.add("worktrees");
|
|
641
|
-
if (types.size) this.
|
|
658
|
+
if (types.size) this.clearCachesCore(inFlight, repoPath, ...types);
|
|
659
|
+
return [...types];
|
|
642
660
|
}
|
|
643
661
|
/**
|
|
644
662
|
* Handles a watcher-observed `'gkConfig'` change. Always evicts the cached bulk map (forcing the
|
|
@@ -882,6 +900,10 @@ var Cache = class Cache {
|
|
|
882
900
|
getInitialCommitSha(repoPath, factory) {
|
|
883
901
|
return this.getSharedSimple(this.initialCommitSha, repoPath, factory);
|
|
884
902
|
}
|
|
903
|
+
/** A rejected factory is never cached (`PromiseMap` evicts on rejection) — a failed read retries next time. */
|
|
904
|
+
getEmptyTreeSha(repoPath, factory) {
|
|
905
|
+
return this.getSharedSimple(this.emptyTreeSha, repoPath, factory);
|
|
906
|
+
}
|
|
885
907
|
getLastFetchedTimestamp(repoPath, factory) {
|
|
886
908
|
return this.getSharedSimple(this.lastFetched, repoPath, factory);
|
|
887
909
|
}
|
|
@@ -972,6 +994,7 @@ __decorate([debug({ onlyExit: true })], Cache.prototype, "clearCaches", null);
|
|
|
972
994
|
__decorate([debug({ onlyExit: true })], Cache.prototype, "unregisterRepoPath", null);
|
|
973
995
|
__decorate([debug({ onlyExit: true })], Cache.prototype, "reset", null);
|
|
974
996
|
__decorate([debug({ onlyExit: true })], Cache.prototype, "onRepositoryChanged", null);
|
|
997
|
+
__decorate([debug({ onlyExit: true })], Cache.prototype, "applyRepositoryChanges", null);
|
|
975
998
|
//#endregion
|
|
976
999
|
export { Cache, areUriScopedCachedGitTypes, shouldEvictBlameCacheEntry };
|
|
977
1000
|
|