@gitkraken/core-gitlens 0.32.0 → 0.33.0
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 +27 -1
- package/dist/git/cache.d.ts +90 -15
- package/dist/git/cache.js +215 -44
- package/dist/git/cache.js.map +1 -1
- package/dist/git/models/repositoryIdentities.d.ts +0 -1
- package/dist/git/models/repositoryIdentities.js +1 -4
- package/dist/git/models/repositoryIdentities.js.map +1 -1
- package/dist/git/providers/provider.d.ts +7 -0
- package/dist/git/remotes/gitlab.js +15 -9
- package/dist/git/remotes/gitlab.js.map +1 -1
- package/dist/git/service.js +4 -1
- package/dist/git/service.js.map +1 -1
- package/dist/git/utils/repository.utils.d.ts +10 -0
- package/dist/git/utils/repository.utils.js +25 -2
- package/dist/git/utils/repository.utils.js.map +1 -1
- package/dist/git/watching/changeEvent.d.ts +13 -3
- package/dist/git/watching/changeEvent.js +19 -4
- package/dist/git/watching/changeEvent.js.map +1 -1
- package/dist/git/watching/watchGroup.d.ts +4 -2
- package/dist/git/watching/watchGroup.js +32 -17
- package/dist/git/watching/watchGroup.js.map +1 -1
- package/dist/git/watching/watchService.d.ts +4 -1
- package/dist/git/watching/watchService.js +18 -15
- package/dist/git/watching/watchService.js.map +1 -1
- package/dist/git/watching/watchSession.d.ts +27 -12
- package/dist/git/watching/watchSession.js +49 -19
- package/dist/git/watching/watchSession.js.map +1 -1
- package/dist/git/watching/worktreeSummary.js +7 -7
- package/dist/git/watching/worktreeSummary.js.map +1 -1
- package/dist/git-cli/cliGitProvider.d.ts +28 -2
- package/dist/git-cli/cliGitProvider.js +62 -19
- package/dist/git-cli/cliGitProvider.js.map +1 -1
- package/dist/git-cli/exec/git.js +7 -2
- package/dist/git-cli/exec/git.js.map +1 -1
- package/dist/git-cli/providers/branches.js +15 -10
- package/dist/git-cli/providers/branches.js.map +1 -1
- package/dist/git-cli/providers/config.d.ts +2 -0
- package/dist/git-cli/providers/config.js +19 -8
- package/dist/git-cli/providers/config.js.map +1 -1
- package/dist/git-cli/providers/worktrees.js +34 -10
- package/dist/git-cli/providers/worktrees.js.map +1 -1
- package/dist/git-cli/service.js +1 -1
- package/dist/git-cli/service.js.map +1 -1
- package/dist/plus/integrations/models/integration.js +1 -1
- package/dist/plus/integrations/models/integration.js.map +1 -1
- package/dist/plus/integrations/providers/gitlab/gitlab.d.ts +10 -0
- package/dist/plus/integrations/providers/gitlab/gitlab.js +62 -15
- package/dist/plus/integrations/providers/gitlab/gitlab.js.map +1 -1
- package/dist/plus/integrations/providers/gitlab/gitlab.utils.d.ts +8 -0
- package/dist/plus/integrations/providers/gitlab/gitlab.utils.js +32 -16
- package/dist/plus/integrations/providers/gitlab/gitlab.utils.js.map +1 -1
- package/package.json +1 -1
|
@@ -183,17 +183,22 @@ const storedMergeKeys = [
|
|
|
183
183
|
* `branch`, from the list shared by a repository's worktrees, as `repoPath` sees it. The copy holds the same metadata
|
|
184
184
|
* object, which `Cache.patchBranchMetadata` updates in place.
|
|
185
185
|
*
|
|
186
|
-
* A list read before a checkout gives the branch now current `worktree: false
|
|
187
|
-
* of the whole list (`findStaleBranches`) can tell the list
|
|
186
|
+
* A list read before a checkout gives the branch now current `worktree: false`, or the worktree it was checked out in
|
|
187
|
+
* then. `keepUnlisted` keeps those placements, so a reader of the whole list (`findStaleBranches`) can tell the list
|
|
188
|
+
* is stale. Otherwise the current branch names `repoPath`, and a branch that isn't current but that the list places at
|
|
189
|
+
* `repoPath` was left by the checkout, so it gets `worktree: false`. `isCurrent` is `undefined` when `repoPath`'s
|
|
190
|
+
* current branch couldn't be read, so the list's placement stands.
|
|
188
191
|
*/
|
|
189
192
|
function mapSharedBranch(branch, repoPath, commonPath, isCurrent, defaultWorktreePath, keepUnlisted) {
|
|
190
|
-
if (!isCurrent && repoPath === commonPath) return branch;
|
|
191
193
|
let worktree = branch.worktree;
|
|
192
|
-
if (isCurrent
|
|
193
|
-
path
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
194
|
+
if (isCurrent) {
|
|
195
|
+
if (worktree == null || !keepUnlisted && (worktree === false || worktree.path !== repoPath)) worktree = {
|
|
196
|
+
path: repoPath,
|
|
197
|
+
isDefault: repoPath === defaultWorktreePath
|
|
198
|
+
};
|
|
199
|
+
} else if (!keepUnlisted && isCurrent === false && worktree !== false && worktree?.path === repoPath) worktree = false;
|
|
200
|
+
if (!isCurrent && repoPath === commonPath && worktree === branch.worktree) return branch;
|
|
201
|
+
return new GitBranch(repoPath, branch.refName, isCurrent ?? false, branch.date, branch.metadata, branch.sha, branch.upstream, worktree, false, false);
|
|
197
202
|
}
|
|
198
203
|
var BranchesGitSubProvider = class {
|
|
199
204
|
context;
|
|
@@ -327,7 +332,7 @@ var BranchesGitSubProvider = class {
|
|
|
327
332
|
};
|
|
328
333
|
const branch = values[index];
|
|
329
334
|
return {
|
|
330
|
-
branch: mapSharedBranch(branch, repoPath, commonPath, isCurrent(branch), defaultWorktreePath, false),
|
|
335
|
+
branch: mapSharedBranch(branch, repoPath, commonPath, currentRef != null ? isCurrent(branch) : void 0, defaultWorktreePath, false),
|
|
331
336
|
kept
|
|
332
337
|
};
|
|
333
338
|
}
|
|
@@ -475,7 +480,7 @@ var BranchesGitSubProvider = class {
|
|
|
475
480
|
mapperSignal ??= cancellation;
|
|
476
481
|
const { currentRef, defaultWorktreePath, isDetached } = await this.getCurrentRefAndDefaultWorktreePath(targetRepoPath, commonPath, mapperSignal);
|
|
477
482
|
const branches = shared.values.map((b) => {
|
|
478
|
-
return mapSharedBranch(b, targetRepoPath, commonPath, !b.remote && b.name === currentRef
|
|
483
|
+
return mapSharedBranch(b, targetRepoPath, commonPath, currentRef != null ? !b.remote && b.name === currentRef.name && !isDetached : void 0, defaultWorktreePath, true);
|
|
479
484
|
});
|
|
480
485
|
if (isDetached || currentRef != null && !branches.some((b) => b.current)) {
|
|
481
486
|
const metadataMap = await this.getBranchMetadataMap(commonPath);
|