@gitkraken/core-gitlens 0.6.0 → 0.7.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 +15 -1
- package/README.md +9 -2
- package/dist/_virtual/@oxc-project+runtime/helpers/esm/decorate.js +9 -0
- package/dist/_virtual/@oxc-project+runtime/helpers/esm/usingCtx.js +57 -0
- package/dist/git/cache.d.ts +297 -297
- package/dist/git/cache.js +948 -1276
- package/dist/git/cache.js.map +1 -1
- package/dist/git/context.d.ts +202 -197
- package/dist/git/context.js +12 -8
- package/dist/git/context.js.map +1 -1
- package/dist/git/errors.d.ts +268 -281
- package/dist/git/errors.js +928 -706
- package/dist/git/errors.js.map +1 -1
- package/dist/git/features.d.ts +3 -2
- package/dist/git/features.js +34 -55
- package/dist/git/features.js.map +1 -1
- package/dist/git/gitHealth.d.ts +88 -81
- package/dist/git/gitHealth.js +259 -329
- package/dist/git/gitHealth.js.map +1 -1
- package/dist/git/models/author.d.ts +12 -10
- package/dist/git/models/author.js +0 -2
- package/dist/git/models/autolink.d.ts +36 -37
- package/dist/git/models/autolink.js +0 -2
- package/dist/git/models/blame.d.ts +25 -23
- package/dist/git/models/blame.js +0 -2
- package/dist/git/models/branch.d.ts +74 -72
- package/dist/git/models/branch.js +132 -171
- package/dist/git/models/branch.js.map +1 -1
- package/dist/git/models/commit.d.ts +135 -133
- package/dist/git/models/commit.js +381 -484
- package/dist/git/models/commit.js.map +1 -1
- package/dist/git/models/contributor.d.ts +30 -29
- package/dist/git/models/contributor.js +56 -64
- package/dist/git/models/contributor.js.map +1 -1
- package/dist/git/models/defaultBranch.d.ts +5 -3
- package/dist/git/models/defaultBranch.js +0 -2
- package/dist/git/models/diff.d.ts +49 -47
- package/dist/git/models/diff.js +0 -2
- package/dist/git/models/file.d.ts +20 -18
- package/dist/git/models/file.js +0 -2
- package/dist/git/models/fileChange.d.ts +45 -43
- package/dist/git/models/fileChange.js +60 -66
- package/dist/git/models/fileChange.js.map +1 -1
- package/dist/git/models/fileStatus.d.ts +25 -23
- package/dist/git/models/fileStatus.js +30 -26
- package/dist/git/models/fileStatus.js.map +1 -1
- package/dist/git/models/graph.d.ts +328 -320
- package/dist/git/models/graph.js +31 -27
- package/dist/git/models/graph.js.map +1 -1
- package/dist/git/models/graphSearch.d.ts +37 -35
- package/dist/git/models/graphSearch.js +0 -2
- package/dist/git/models/graphSession.d.ts +158 -66
- package/dist/git/models/graphSession.js +72 -1
- package/dist/git/models/graphSession.js.map +1 -1
- package/dist/git/models/issue.d.ts +171 -150
- package/dist/git/models/issue.js +86 -88
- package/dist/git/models/issue.js.map +1 -1
- package/dist/git/models/issueOrPullRequest.d.ts +16 -14
- package/dist/git/models/issueOrPullRequest.js +0 -2
- package/dist/git/models/lineRange.d.ts +6 -4
- package/dist/git/models/lineRange.js +0 -2
- package/dist/git/models/log.d.ts +18 -16
- package/dist/git/models/log.js +0 -2
- package/dist/git/models/mergeConflicts.d.ts +17 -15
- package/dist/git/models/mergeConflicts.js +0 -2
- package/dist/git/models/patch.d.ts +14 -12
- package/dist/git/models/patch.js +0 -2
- package/dist/git/models/pausedOperationStatus.d.ts +42 -40
- package/dist/git/models/pausedOperationStatus.js +0 -2
- package/dist/git/models/pullRequest.d.ts +238 -236
- package/dist/git/models/pullRequest.js +151 -163
- package/dist/git/models/pullRequest.js.map +1 -1
- package/dist/git/models/rebase.d.ts +30 -28
- package/dist/git/models/rebase.js +0 -2
- package/dist/git/models/reference.d.ts +57 -55
- package/dist/git/models/reference.js +0 -2
- package/dist/git/models/reflog.d.ts +29 -27
- package/dist/git/models/reflog.js +63 -82
- package/dist/git/models/reflog.js.map +1 -1
- package/dist/git/models/remote.d.ts +34 -32
- package/dist/git/models/remote.js +74 -95
- package/dist/git/models/remote.js.map +1 -1
- package/dist/git/models/remoteProvider.d.ts +86 -84
- package/dist/git/models/remoteProvider.js +145 -150
- package/dist/git/models/remoteProvider.js.map +1 -1
- package/dist/git/models/remoteResource.d.ts +58 -56
- package/dist/git/models/remoteResource.js +15 -12
- package/dist/git/models/remoteResource.js.map +1 -1
- package/dist/git/models/repository.d.ts +144 -142
- package/dist/git/models/repository.js +358 -406
- package/dist/git/models/repository.js.map +1 -1
- package/dist/git/models/repositoryChangeEvent.d.ts +8 -6
- package/dist/git/models/repositoryChangeEvent.js +26 -24
- package/dist/git/models/repositoryChangeEvent.js.map +1 -1
- package/dist/git/models/repositoryIdentities.d.ts +50 -46
- package/dist/git/models/repositoryIdentities.js +7 -5
- package/dist/git/models/repositoryIdentities.js.map +1 -1
- package/dist/git/models/repositoryMetadata.d.ts +9 -7
- package/dist/git/models/repositoryMetadata.js +0 -2
- package/dist/git/models/resourceDescriptor.d.ts +11 -9
- package/dist/git/models/resourceDescriptor.js +0 -2
- package/dist/git/models/revision.d.ts +2 -0
- package/dist/git/models/revision.js +8 -5
- package/dist/git/models/revision.js.map +1 -1
- package/dist/git/models/search.d.ts +48 -47
- package/dist/git/models/search.js +53 -49
- package/dist/git/models/search.js.map +1 -1
- package/dist/git/models/shortlog.d.ts +5 -3
- package/dist/git/models/shortlog.js +0 -2
- package/dist/git/models/signature.d.ts +28 -26
- package/dist/git/models/signature.js +0 -2
- package/dist/git/models/staging.d.ts +18 -16
- package/dist/git/models/staging.js +0 -2
- package/dist/git/models/stash.d.ts +5 -3
- package/dist/git/models/stash.js +0 -2
- package/dist/git/models/status.d.ts +51 -49
- package/dist/git/models/status.js +172 -205
- package/dist/git/models/status.js.map +1 -1
- package/dist/git/models/statusFile.d.ts +35 -34
- package/dist/git/models/statusFile.js +112 -125
- package/dist/git/models/statusFile.js.map +1 -1
- package/dist/git/models/tag.d.ts +34 -32
- package/dist/git/models/tag.js +64 -77
- package/dist/git/models/tag.js.map +1 -1
- package/dist/git/models/tree.d.ts +8 -6
- package/dist/git/models/tree.js +0 -2
- package/dist/git/models/user.d.ts +6 -4
- package/dist/git/models/user.js +0 -2
- package/dist/git/models/worktree.d.ts +50 -48
- package/dist/git/models/worktree.js +102 -133
- package/dist/git/models/worktree.js.map +1 -1
- package/dist/git/parsers/diffParser.d.ts +7 -5
- package/dist/git/parsers/diffParser.js +438 -587
- package/dist/git/parsers/diffParser.js.map +1 -1
- package/dist/git/parsers/rebaseTodoParser.d.ts +3 -1
- package/dist/git/parsers/rebaseTodoParser.js +165 -208
- package/dist/git/parsers/rebaseTodoParser.js.map +1 -1
- package/dist/git/providers/blame.d.ts +12 -10
- package/dist/git/providers/blame.js +0 -2
- package/dist/git/providers/branches.d.ts +96 -94
- package/dist/git/providers/branches.js +0 -2
- package/dist/git/providers/commits.d.ts +105 -104
- package/dist/git/providers/commits.js +0 -2
- package/dist/git/providers/config.d.ts +80 -78
- package/dist/git/providers/config.js +0 -2
- package/dist/git/providers/contributors.d.ts +23 -21
- package/dist/git/providers/contributors.js +0 -2
- package/dist/git/providers/diff.d.ts +68 -66
- package/dist/git/providers/diff.js +0 -2
- package/dist/git/providers/graph.d.ts +73 -62
- package/dist/git/providers/graph.js +0 -2
- package/dist/git/providers/maintenance.d.ts +180 -178
- package/dist/git/providers/maintenance.js +0 -20
- package/dist/git/providers/operations.d.ts +114 -112
- package/dist/git/providers/operations.js +0 -2
- package/dist/git/providers/patch.d.ts +26 -24
- package/dist/git/providers/patch.js +0 -2
- package/dist/git/providers/pausedOperations.d.ts +19 -17
- package/dist/git/providers/pausedOperations.js +0 -2
- package/dist/git/providers/provider.d.ts +52 -50
- package/dist/git/providers/provider.js +0 -2
- package/dist/git/providers/refs.d.ts +42 -40
- package/dist/git/providers/refs.js +0 -2
- package/dist/git/providers/remotes.d.ts +24 -22
- package/dist/git/providers/remotes.js +0 -2
- package/dist/git/providers/revision.d.ts +25 -23
- package/dist/git/providers/revision.js +0 -2
- package/dist/git/providers/shared/remotes.d.ts +24 -22
- package/dist/git/providers/shared/remotes.js +52 -77
- package/dist/git/providers/shared/remotes.js.map +1 -1
- package/dist/git/providers/staging.d.ts +37 -35
- package/dist/git/providers/staging.js +0 -2
- package/dist/git/providers/stash.d.ts +38 -36
- package/dist/git/providers/stash.js +0 -2
- package/dist/git/providers/status.d.ts +32 -30
- package/dist/git/providers/status.js +0 -2
- package/dist/git/providers/tags.d.ts +20 -18
- package/dist/git/providers/tags.js +0 -2
- package/dist/git/providers/types.d.ts +19 -17
- package/dist/git/providers/types.js +0 -2
- package/dist/git/providers/worktrees.d.ts +26 -24
- package/dist/git/providers/worktrees.js +0 -2
- package/dist/git/remotes/azure-devops.d.ts +46 -45
- package/dist/git/remotes/azure-devops.js +252 -257
- package/dist/git/remotes/azure-devops.js.map +1 -1
- package/dist/git/remotes/bitbucket-server.d.ts +30 -29
- package/dist/git/remotes/bitbucket-server.js +141 -142
- package/dist/git/remotes/bitbucket-server.js.map +1 -1
- package/dist/git/remotes/bitbucket.d.ts +27 -26
- package/dist/git/remotes/bitbucket.js +114 -111
- package/dist/git/remotes/bitbucket.js.map +1 -1
- package/dist/git/remotes/custom.d.ts +26 -25
- package/dist/git/remotes/custom.js +130 -130
- package/dist/git/remotes/custom.js.map +1 -1
- package/dist/git/remotes/gerrit.d.ts +29 -28
- package/dist/git/remotes/gerrit.js +140 -143
- package/dist/git/remotes/gerrit.js.map +1 -1
- package/dist/git/remotes/gitea.d.ts +28 -27
- package/dist/git/remotes/gitea.js +141 -145
- package/dist/git/remotes/gitea.js.map +1 -1
- package/dist/git/remotes/github.d.ts +35 -34
- package/dist/git/remotes/github.js +196 -190
- package/dist/git/remotes/github.js.map +1 -1
- package/dist/git/remotes/gitlab.d.ts +31 -30
- package/dist/git/remotes/gitlab.js +245 -227
- package/dist/git/remotes/gitlab.js.map +1 -1
- package/dist/git/remotes/google-source.d.ts +16 -14
- package/dist/git/remotes/google-source.js +33 -31
- package/dist/git/remotes/google-source.js.map +1 -1
- package/dist/git/remotes/matcher.d.ts +16 -14
- package/dist/git/remotes/matcher.js +141 -124
- package/dist/git/remotes/matcher.js.map +1 -1
- package/dist/git/repositoryService.d.ts +47 -47
- package/dist/git/repositoryService.js +47 -44
- package/dist/git/repositoryService.js.map +1 -1
- package/dist/git/run.types.d.ts +91 -76
- package/dist/git/run.types.js +0 -2
- package/dist/git/service.d.ts +73 -71
- package/dist/git/service.js +286 -302
- package/dist/git/service.js.map +1 -1
- package/dist/git/utils/autolink.utils.d.ts +4 -2
- package/dist/git/utils/autolink.utils.js +103 -139
- package/dist/git/utils/autolink.utils.js.map +1 -1
- package/dist/git/utils/blame.utils.d.ts +22 -20
- package/dist/git/utils/blame.utils.js +196 -230
- package/dist/git/utils/blame.utils.js.map +1 -1
- package/dist/git/utils/branch.utils.d.ts +7 -9
- package/dist/git/utils/branch.utils.js +89 -115
- package/dist/git/utils/branch.utils.js.map +1 -1
- package/dist/git/utils/commit.utils.d.ts +10 -16
- package/dist/git/utils/commit.utils.js +28 -47
- package/dist/git/utils/commit.utils.js.map +1 -1
- package/dist/git/utils/config.utils.d.ts +2 -0
- package/dist/git/utils/config.utils.js +14 -5
- package/dist/git/utils/config.utils.js.map +1 -1
- package/dist/git/utils/conflictResolution.utils.d.ts +16 -13
- package/dist/git/utils/conflictResolution.utils.js +116 -113
- package/dist/git/utils/conflictResolution.utils.js.map +1 -1
- package/dist/git/utils/contributor.utils.d.ts +10 -8
- package/dist/git/utils/contributor.utils.js +47 -69
- package/dist/git/utils/contributor.utils.js.map +1 -1
- package/dist/git/utils/fetch.utils.d.ts +2 -0
- package/dist/git/utils/fetch.utils.js +33 -44
- package/dist/git/utils/fetch.utils.js.map +1 -1
- package/dist/git/utils/fileStatus.utils.d.ts +22 -21
- package/dist/git/utils/fileStatus.utils.js +59 -45
- package/dist/git/utils/fileStatus.utils.js.map +1 -1
- package/dist/git/utils/graph.utils.d.ts +19 -1
- package/dist/git/utils/graph.utils.js +60 -35
- package/dist/git/utils/graph.utils.js.map +1 -1
- package/dist/git/utils/issue.utils.d.ts +3 -1
- package/dist/git/utils/issue.utils.js +154 -158
- package/dist/git/utils/issue.utils.js.map +1 -1
- package/dist/git/utils/issueOrPullRequest.utils.d.ts +3 -1
- package/dist/git/utils/issueOrPullRequest.utils.js +23 -20
- package/dist/git/utils/issueOrPullRequest.utils.js.map +1 -1
- package/dist/git/utils/mergeConflicts.utils.d.ts +4 -1
- package/dist/git/utils/mergeConflicts.utils.js +28 -15
- package/dist/git/utils/mergeConflicts.utils.js.map +1 -1
- package/dist/git/utils/pausedOperationStatus.utils.d.ts +7 -42
- package/dist/git/utils/pausedOperationStatus.utils.js +83 -146
- package/dist/git/utils/pausedOperationStatus.utils.js.map +1 -1
- package/dist/git/utils/pullRequest.utils.d.ts +7 -5
- package/dist/git/utils/pullRequest.utils.js +180 -187
- package/dist/git/utils/pullRequest.utils.js.map +1 -1
- package/dist/git/utils/reachability.utils.d.ts +6 -6
- package/dist/git/utils/reachability.utils.js +120 -147
- package/dist/git/utils/reachability.utils.js.map +1 -1
- package/dist/git/utils/rebase.utils.d.ts +3 -1
- package/dist/git/utils/rebase.utils.js +87 -71
- package/dist/git/utils/rebase.utils.js.map +1 -1
- package/dist/git/utils/reference.utils.d.ts +33 -32
- package/dist/git/utils/reference.utils.js +152 -179
- package/dist/git/utils/reference.utils.js.map +1 -1
- package/dist/git/utils/remote.utils.d.ts +5 -3
- package/dist/git/utils/remote.utils.js +77 -116
- package/dist/git/utils/remote.utils.js.map +1 -1
- package/dist/git/utils/repository.utils.d.ts +3 -1
- package/dist/git/utils/repository.utils.js +12 -11
- package/dist/git/utils/repository.utils.js.map +1 -1
- package/dist/git/utils/resourceDescriptor.utils.d.ts +3 -1
- package/dist/git/utils/resourceDescriptor.utils.js +8 -14
- package/dist/git/utils/resourceDescriptor.utils.js.map +1 -1
- package/dist/git/utils/revision.utils.d.ts +11 -10
- package/dist/git/utils/revision.utils.js +69 -83
- package/dist/git/utils/revision.utils.js.map +1 -1
- package/dist/git/utils/search.utils.d.ts +5 -3
- package/dist/git/utils/search.utils.js +383 -522
- package/dist/git/utils/search.utils.js.map +1 -1
- package/dist/git/utils/sorting.d.ts +22 -20
- package/dist/git/utils/sorting.js +133 -227
- package/dist/git/utils/sorting.js.map +1 -1
- package/dist/git/utils/sshKey.utils.d.ts +2 -0
- package/dist/git/utils/sshKey.utils.js +10 -15
- package/dist/git/utils/sshKey.utils.js.map +1 -1
- package/dist/git/utils/status.utils.d.ts +20 -15
- package/dist/git/utils/status.utils.js +93 -79
- package/dist/git/utils/status.utils.js.map +1 -1
- package/dist/git/utils/statusFile.utils.d.ts +6 -4
- package/dist/git/utils/statusFile.utils.js +71 -72
- package/dist/git/utils/statusFile.utils.js.map +1 -1
- package/dist/git/utils/tag.utils.d.ts +4 -2
- package/dist/git/utils/tag.utils.js +10 -8
- package/dist/git/utils/tag.utils.js.map +1 -1
- package/dist/git/utils/tooltip.utils.d.ts +5 -2
- package/dist/git/utils/tooltip.utils.js +49 -24
- package/dist/git/utils/tooltip.utils.js.map +1 -1
- package/dist/git/utils/uriAuthority.d.ts +9 -7
- package/dist/git/utils/uriAuthority.js +19 -16
- package/dist/git/utils/uriAuthority.js.map +1 -1
- package/dist/git/utils/user.utils.d.ts +3 -1
- package/dist/git/utils/user.utils.js +6 -10
- package/dist/git/utils/user.utils.js.map +1 -1
- package/dist/git/utils/worktree.utils.d.ts +5 -3
- package/dist/git/utils/worktree.utils.js +14 -12
- package/dist/git/utils/worktree.utils.js.map +1 -1
- package/dist/git/watching/changeEvent.d.ts +38 -36
- package/dist/git/watching/changeEvent.js +60 -67
- package/dist/git/watching/changeEvent.js.map +1 -1
- package/dist/git/watching/classifyChange.d.ts +3 -1
- package/dist/git/watching/classifyChange.js +50 -79
- package/dist/git/watching/classifyChange.js.map +1 -1
- package/dist/git/watching/gitIgnoreFilter.d.ts +43 -41
- package/dist/git/watching/gitIgnoreFilter.js +92 -107
- package/dist/git/watching/gitIgnoreFilter.js.map +1 -1
- package/dist/git/watching/initWatcher.d.ts +22 -20
- package/dist/git/watching/initWatcher.js +58 -57
- package/dist/git/watching/initWatcher.js.map +1 -1
- package/dist/git/watching/provider.d.ts +8 -7
- package/dist/git/watching/provider.js +0 -2
- package/dist/git/watching/watchGroup.d.ts +29 -28
- package/dist/git/watching/watchGroup.js +105 -137
- package/dist/git/watching/watchGroup.js.map +1 -1
- package/dist/git/watching/watchService.d.ts +70 -68
- package/dist/git/watching/watchService.js +275 -339
- package/dist/git/watching/watchService.js.map +1 -1
- package/dist/git/watching/watchSession.d.ts +112 -111
- package/dist/git/watching/watchSession.js +260 -314
- package/dist/git/watching/watchSession.js.map +1 -1
- package/dist/git/watching/watcherPatterns.d.ts +4 -2
- package/dist/git/watching/watcherPatterns.js +21 -24
- package/dist/git/watching/watcherPatterns.js.map +1 -1
- package/dist/git-cli/cliGitProvider.d.ts +117 -114
- package/dist/git-cli/cliGitProvider.js +261 -283
- package/dist/git-cli/cliGitProvider.js.map +1 -1
- package/dist/git-cli/exec/eventLoopMonitor.d.ts +26 -0
- package/dist/git-cli/exec/eventLoopMonitor.js +61 -0
- package/dist/git-cli/exec/eventLoopMonitor.js.map +1 -0
- package/dist/git-cli/exec/exec.d.ts +3 -4
- package/dist/git-cli/exec/exec.errors.d.ts +2 -2
- package/dist/git-cli/exec/exec.errors.js +2 -2
- package/dist/git-cli/exec/exec.js +3 -3
- package/dist/git-cli/exec/exec.types.d.ts +2 -2
- package/dist/git-cli/exec/exec.types.js +0 -2
- package/dist/git-cli/exec/features.d.ts +2 -3
- package/dist/git-cli/exec/features.js +2 -2
- package/dist/git-cli/exec/git.d.ts +224 -205
- package/dist/git-cli/exec/git.js +834 -1042
- package/dist/git-cli/exec/git.js.map +1 -1
- package/dist/git-cli/exec/gitQueue.d.ts +51 -48
- package/dist/git-cli/exec/gitQueue.js +225 -260
- package/dist/git-cli/exec/gitQueue.js.map +1 -1
- package/dist/git-cli/exec/locator.d.ts +8 -6
- package/dist/git-cli/exec/locator.js +95 -121
- package/dist/git-cli/exec/locator.js.map +1 -1
- package/dist/git-cli/parsers/blameParser.d.ts +22 -20
- package/dist/git-cli/parsers/blameParser.js +238 -332
- package/dist/git-cli/parsers/blameParser.js.map +1 -1
- package/dist/git-cli/parsers/indexParser.d.ts +3 -1
- package/dist/git-cli/parsers/indexParser.js +146 -221
- package/dist/git-cli/parsers/indexParser.js.map +1 -1
- package/dist/git-cli/parsers/logParser.d.ts +103 -110
- package/dist/git-cli/parsers/logParser.js +998 -1199
- package/dist/git-cli/parsers/logParser.js.map +1 -1
- package/dist/git-cli/parsers/mergeTreeParser.d.ts +5 -3
- package/dist/git-cli/parsers/mergeTreeParser.js +28 -72
- package/dist/git-cli/parsers/mergeTreeParser.js.map +1 -1
- package/dist/git-cli/parsers/refParser.d.ts +5 -4
- package/dist/git-cli/parsers/refParser.js +92 -137
- package/dist/git-cli/parsers/refParser.js.map +1 -1
- package/dist/git-cli/parsers/reflogParser.d.ts +7 -6
- package/dist/git-cli/parsers/reflogParser.js +100 -173
- package/dist/git-cli/parsers/reflogParser.js.map +1 -1
- package/dist/git-cli/parsers/remoteParser.d.ts +4 -2
- package/dist/git-cli/parsers/remoteParser.js +74 -126
- package/dist/git-cli/parsers/remoteParser.js.map +1 -1
- package/dist/git-cli/parsers/shortlogParser.d.ts +4 -2
- package/dist/git-cli/parsers/shortlogParser.js +44 -49
- package/dist/git-cli/parsers/shortlogParser.js.map +1 -1
- package/dist/git-cli/parsers/signatureParser.d.ts +3 -1
- package/dist/git-cli/parsers/signatureParser.js +82 -124
- package/dist/git-cli/parsers/signatureParser.js.map +1 -1
- package/dist/git-cli/parsers/sshSignatureParser.d.ts +5 -3
- package/dist/git-cli/parsers/sshSignatureParser.js +55 -64
- package/dist/git-cli/parsers/sshSignatureParser.js.map +1 -1
- package/dist/git-cli/parsers/statusParser.d.ts +4 -2
- package/dist/git-cli/parsers/statusParser.js +148 -205
- package/dist/git-cli/parsers/statusParser.js.map +1 -1
- package/dist/git-cli/parsers/treeParser.d.ts +3 -1
- package/dist/git-cli/parsers/treeParser.js +57 -108
- package/dist/git-cli/parsers/treeParser.js.map +1 -1
- package/dist/git-cli/parsers/worktreeParser.d.ts +4 -3
- package/dist/git-cli/parsers/worktreeParser.js +76 -132
- package/dist/git-cli/parsers/worktreeParser.js.map +1 -1
- package/dist/git-cli/providers/blame.d.ts +25 -23
- package/dist/git-cli/providers/blame.js +404 -413
- package/dist/git-cli/providers/blame.js.map +1 -1
- package/dist/git-cli/providers/branches.d.ts +117 -116
- package/dist/git-cli/providers/branches.js +1132 -1468
- package/dist/git-cli/providers/branches.js.map +1 -1
- package/dist/git-cli/providers/commitFilesetUtils.d.ts +4 -2
- package/dist/git-cli/providers/commitFilesetUtils.js +36 -18
- package/dist/git-cli/providers/commitFilesetUtils.js.map +1 -1
- package/dist/git-cli/providers/commits.d.ts +58 -56
- package/dist/git-cli/providers/commits.js +1084 -1423
- package/dist/git-cli/providers/commits.js.map +1 -1
- package/dist/git-cli/providers/config.d.ts +129 -127
- package/dist/git-cli/providers/config.js +612 -831
- package/dist/git-cli/providers/config.js.map +1 -1
- package/dist/git-cli/providers/contributors.d.ts +29 -28
- package/dist/git-cli/providers/contributors.js +246 -351
- package/dist/git-cli/providers/contributors.js.map +1 -1
- package/dist/git-cli/providers/diff.d.ts +97 -94
- package/dist/git-cli/providers/diff.js +638 -845
- package/dist/git-cli/providers/diff.js.map +1 -1
- package/dist/git-cli/providers/graph.d.ts +66 -68
- package/dist/git-cli/providers/graph.js +1400 -1848
- package/dist/git-cli/providers/graph.js.map +1 -1
- package/dist/git-cli/providers/maintenance.d.ts +305 -303
- package/dist/git-cli/providers/maintenance.js +1526 -2078
- package/dist/git-cli/providers/maintenance.js.map +1 -1
- package/dist/git-cli/providers/operations.d.ts +96 -94
- package/dist/git-cli/providers/operations.js +664 -724
- package/dist/git-cli/providers/operations.js.map +1 -1
- package/dist/git-cli/providers/patch.d.ts +37 -35
- package/dist/git-cli/providers/patch.js +206 -307
- package/dist/git-cli/providers/patch.js.map +1 -1
- package/dist/git-cli/providers/pausedOperations.d.ts +30 -28
- package/dist/git-cli/providers/pausedOperations.js +475 -506
- package/dist/git-cli/providers/pausedOperations.js.map +1 -1
- package/dist/git-cli/providers/refs.d.ts +50 -48
- package/dist/git-cli/providers/refs.js +335 -479
- package/dist/git-cli/providers/refs.js.map +1 -1
- package/dist/git-cli/providers/remotes.d.ts +23 -21
- package/dist/git-cli/providers/remotes.js +71 -92
- package/dist/git-cli/providers/remotes.js.map +1 -1
- package/dist/git-cli/providers/revision.d.ts +27 -25
- package/dist/git-cli/providers/revision.js +288 -304
- package/dist/git-cli/providers/revision.js.map +1 -1
- package/dist/git-cli/providers/staging.d.ts +31 -29
- package/dist/git-cli/providers/staging.js +140 -189
- package/dist/git-cli/providers/staging.js.map +1 -1
- package/dist/git-cli/providers/stash.d.ts +44 -42
- package/dist/git-cli/providers/stash.js +288 -387
- package/dist/git-cli/providers/stash.js.map +1 -1
- package/dist/git-cli/providers/status.d.ts +61 -59
- package/dist/git-cli/providers/status.js +332 -453
- package/dist/git-cli/providers/status.js.map +1 -1
- package/dist/git-cli/providers/tags.d.ts +31 -29
- package/dist/git-cli/providers/tags.js +158 -215
- package/dist/git-cli/providers/tags.js.map +1 -1
- package/dist/git-cli/providers/worktrees.d.ts +35 -33
- package/dist/git-cli/providers/worktrees.js +178 -203
- package/dist/git-cli/providers/worktrees.js.map +1 -1
- package/dist/git-cli/service.d.ts +28 -26
- package/dist/git-cli/service.js +38 -40
- package/dist/git-cli/service.js.map +1 -1
- package/dist/ipc/discovery.d.ts +19 -17
- package/dist/ipc/discovery.js +104 -128
- package/dist/ipc/discovery.js.map +1 -1
- package/dist/ipc/ipcServer.d.ts +16 -14
- package/dist/ipc/ipcServer.js +139 -160
- package/dist/ipc/ipcServer.js.map +1 -1
- package/dist/plus/agents/agentCapabilities.d.ts +50 -37
- package/dist/plus/agents/agentCapabilities.js +138 -173
- package/dist/plus/agents/agentCapabilities.js.map +1 -1
- package/dist/plus/agents/providers/claudeCodeTranscript.d.ts +153 -151
- package/dist/plus/agents/providers/claudeCodeTranscript.js +605 -679
- package/dist/plus/agents/providers/claudeCodeTranscript.js.map +1 -1
- package/dist/plus/agents/providers/gkAgentProvider.d.ts +237 -240
- package/dist/plus/agents/providers/gkAgentProvider.js +2162 -3334
- package/dist/plus/agents/providers/gkAgentProvider.js.map +1 -1
- package/dist/plus/agents/sanitizePrompt.d.ts +2 -0
- package/dist/plus/agents/sanitizePrompt.js +58 -91
- package/dist/plus/agents/sanitizePrompt.js.map +1 -1
- package/dist/plus/agents/stateMachine.d.ts +7 -5
- package/dist/plus/agents/stateMachine.js +135 -163
- package/dist/plus/agents/stateMachine.js.map +1 -1
- package/dist/plus/agents/types.d.ts +333 -336
- package/dist/plus/agents/types.js +48 -48
- package/dist/plus/agents/types.js.map +1 -1
- package/dist/plus/ai/constants.d.ts +3 -1
- package/dist/plus/ai/constants.js +88 -84
- package/dist/plus/ai/constants.js.map +1 -1
- package/dist/plus/ai/errors.d.ts +22 -18
- package/dist/plus/ai/errors.js +158 -138
- package/dist/plus/ai/errors.js.map +1 -1
- package/dist/plus/ai/models/conversation.d.ts +11 -9
- package/dist/plus/ai/models/conversation.js +30 -26
- package/dist/plus/ai/models/conversation.js.map +1 -1
- package/dist/plus/ai/models/model.d.ts +29 -27
- package/dist/plus/ai/models/model.js +663 -471
- package/dist/plus/ai/models/model.js.map +1 -1
- package/dist/plus/ai/models/promptTemplates.d.ts +56 -55
- package/dist/plus/ai/models/promptTemplates.js +0 -2
- package/dist/plus/ai/models/provider.d.ts +79 -77
- package/dist/plus/ai/models/provider.js +0 -2
- package/dist/plus/ai/models/results.d.ts +27 -21
- package/dist/plus/ai/models/results.js +0 -2
- package/dist/plus/ai/prompts.d.ts +4 -2
- package/dist/plus/ai/prompts.js +301 -190
- package/dist/plus/ai/prompts.js.map +1 -1
- package/dist/plus/ai/providers/anthropicProvider.d.ts +33 -32
- package/dist/plus/ai/providers/anthropicProvider.js +484 -381
- package/dist/plus/ai/providers/anthropicProvider.js.map +1 -1
- package/dist/plus/ai/providers/azureProvider.d.ts +18 -16
- package/dist/plus/ai/providers/azureProvider.js +53 -53
- package/dist/plus/ai/providers/azureProvider.js.map +1 -1
- package/dist/plus/ai/providers/context.d.ts +23 -20
- package/dist/plus/ai/providers/context.js +0 -2
- package/dist/plus/ai/providers/deepSeekProvider.d.ts +17 -15
- package/dist/plus/ai/providers/deepSeekProvider.js +45 -39
- package/dist/plus/ai/providers/deepSeekProvider.js.map +1 -1
- package/dist/plus/ai/providers/geminiProvider.d.ts +16 -14
- package/dist/plus/ai/providers/geminiProvider.js +316 -230
- package/dist/plus/ai/providers/geminiProvider.js.map +1 -1
- package/dist/plus/ai/providers/gitkrakenProvider.d.ts +22 -20
- package/dist/plus/ai/providers/gitkrakenProvider.js +165 -260
- package/dist/plus/ai/providers/gitkrakenProvider.js.map +1 -1
- package/dist/plus/ai/providers/huggingFaceProvider.d.ts +16 -14
- package/dist/plus/ai/providers/huggingFaceProvider.js +45 -46
- package/dist/plus/ai/providers/huggingFaceProvider.js.map +1 -1
- package/dist/plus/ai/providers/mistralProvider.d.ts +22 -20
- package/dist/plus/ai/providers/mistralProvider.js +263 -195
- package/dist/plus/ai/providers/mistralProvider.js.map +1 -1
- package/dist/plus/ai/providers/ollamaProvider.d.ts +26 -24
- package/dist/plus/ai/providers/ollamaProvider.js +156 -189
- package/dist/plus/ai/providers/ollamaProvider.js.map +1 -1
- package/dist/plus/ai/providers/openAICompatibleProvider.d.ts +18 -16
- package/dist/plus/ai/providers/openAICompatibleProvider.js +50 -50
- package/dist/plus/ai/providers/openAICompatibleProvider.js.map +1 -1
- package/dist/plus/ai/providers/openAICompatibleProviderBase.d.ts +187 -185
- package/dist/plus/ai/providers/openAICompatibleProviderBase.js +356 -475
- package/dist/plus/ai/providers/openAICompatibleProviderBase.js.map +1 -1
- package/dist/plus/ai/providers/openRouterProvider.d.ts +20 -19
- package/dist/plus/ai/providers/openRouterProvider.js +60 -65
- package/dist/plus/ai/providers/openRouterProvider.js.map +1 -1
- package/dist/plus/ai/providers/openaiProvider.d.ts +17 -15
- package/dist/plus/ai/providers/openaiProvider.js +35 -34
- package/dist/plus/ai/providers/openaiProvider.js.map +1 -1
- package/dist/plus/ai/providers/responseFormatCache.d.ts +4 -2
- package/dist/plus/ai/providers/responseFormatCache.js +21 -17
- package/dist/plus/ai/providers/responseFormatCache.js.map +1 -1
- package/dist/plus/ai/providers/xaiProvider.d.ts +16 -14
- package/dist/plus/ai/providers/xaiProvider.js +61 -46
- package/dist/plus/ai/providers/xaiProvider.js.map +1 -1
- package/dist/plus/ai/utils/ai.utils.d.ts +4 -2
- package/dist/plus/ai/utils/ai.utils.js +50 -77
- package/dist/plus/ai/utils/ai.utils.js.map +1 -1
- package/dist/plus/ai/utils/results.utils.d.ts +7 -5
- package/dist/plus/ai/utils/results.utils.js +235 -269
- package/dist/plus/ai/utils/results.utils.js.map +1 -1
- package/dist/plus/ai/utils/truncation.utils.d.ts +3 -2
- package/dist/plus/ai/utils/truncation.utils.js +242 -205
- package/dist/plus/ai/utils/truncation.utils.js.map +1 -1
- package/dist/plus/git-github/api/config.d.ts +58 -56
- package/dist/plus/git-github/api/config.js +15 -11
- package/dist/plus/git-github/api/config.js.map +1 -1
- package/dist/plus/git-github/api/github.d.ts +500 -497
- package/dist/plus/git-github/api/github.js +2326 -3121
- package/dist/plus/git-github/api/github.js.map +1 -1
- package/dist/plus/git-github/api/github.utils.d.ts +5 -3
- package/dist/plus/git-github/api/github.utils.js +24 -19
- package/dist/plus/git-github/api/github.utils.js.map +1 -1
- package/dist/plus/git-github/api/issueSearchQuery.d.ts +5 -3
- package/dist/plus/git-github/api/issueSearchQuery.js +204 -221
- package/dist/plus/git-github/api/issueSearchQuery.js.map +1 -1
- package/dist/plus/git-github/api/pullRequestSearchQuery.d.ts +6 -5
- package/dist/plus/git-github/api/pullRequestSearchQuery.js +89 -116
- package/dist/plus/git-github/api/pullRequestSearchQuery.js.map +1 -1
- package/dist/plus/git-github/api/token.d.ts +10 -8
- package/dist/plus/git-github/api/token.js +0 -2
- package/dist/plus/git-github/api/tokenUtils.d.ts +4 -2
- package/dist/plus/git-github/api/tokenUtils.js +14 -10
- package/dist/plus/git-github/api/tokenUtils.js.map +1 -1
- package/dist/plus/git-github/api/types.d.ts +94 -92
- package/dist/plus/git-github/api/types.js +0 -2
- package/dist/plus/git-github/context.d.ts +65 -63
- package/dist/plus/git-github/context.js +13 -9
- package/dist/plus/git-github/context.js.map +1 -1
- package/dist/plus/git-github/models.d.ts +182 -182
- package/dist/plus/git-github/models.js +199 -265
- package/dist/plus/git-github/models.js.map +1 -1
- package/dist/plus/git-github/providers/github/blame.d.ts +32 -31
- package/dist/plus/git-github/providers/github/blame.js +137 -150
- package/dist/plus/git-github/providers/github/blame.js.map +1 -1
- package/dist/plus/git-github/providers/github/branches.d.ts +42 -40
- package/dist/plus/git-github/providers/github/branches.js +199 -274
- package/dist/plus/git-github/providers/github/branches.js.map +1 -1
- package/dist/plus/git-github/providers/github/commits.d.ts +35 -33
- package/dist/plus/git-github/providers/github/commits.js +527 -606
- package/dist/plus/git-github/providers/github/commits.js.map +1 -1
- package/dist/plus/git-github/providers/github/config.d.ts +10 -8
- package/dist/plus/git-github/providers/github/config.js +35 -45
- package/dist/plus/git-github/providers/github/config.js.map +1 -1
- package/dist/plus/git-github/providers/github/contributors.d.ts +25 -24
- package/dist/plus/git-github/providers/github/contributors.js +174 -216
- package/dist/plus/git-github/providers/github/contributors.js.map +1 -1
- package/dist/plus/git-github/providers/github/diff.d.ts +34 -32
- package/dist/plus/git-github/providers/github/diff.js +154 -194
- package/dist/plus/git-github/providers/github/diff.js.map +1 -1
- package/dist/plus/git-github/providers/github/graph.d.ts +33 -31
- package/dist/plus/git-github/providers/github/graph.js +400 -452
- package/dist/plus/git-github/providers/github/graph.js.map +1 -1
- package/dist/plus/git-github/providers/github/refs.d.ts +33 -31
- package/dist/plus/git-github/providers/github/refs.js +97 -131
- package/dist/plus/git-github/providers/github/refs.js.map +1 -1
- package/dist/plus/git-github/providers/github/remotes.d.ts +8 -6
- package/dist/plus/git-github/providers/github/remotes.js +30 -35
- package/dist/plus/git-github/providers/github/remotes.js.map +1 -1
- package/dist/plus/git-github/providers/github/revision.d.ts +13 -11
- package/dist/plus/git-github/providers/github/revision.js +106 -129
- package/dist/plus/git-github/providers/github/revision.js.map +1 -1
- package/dist/plus/git-github/providers/github/status.d.ts +24 -22
- package/dist/plus/git-github/providers/github/status.js +49 -47
- package/dist/plus/git-github/providers/github/status.js.map +1 -1
- package/dist/plus/git-github/providers/github/tags.d.ts +21 -19
- package/dist/plus/git-github/providers/github/tags.js +78 -103
- package/dist/plus/git-github/providers/github/tags.js.map +1 -1
- package/dist/plus/git-github/providers/githubGitProvider.d.ts +67 -64
- package/dist/plus/git-github/providers/githubGitProvider.js +131 -128
- package/dist/plus/git-github/providers/githubGitProvider.js.map +1 -1
- package/dist/plus/git-github/providers/githubProvider.d.ts +46 -44
- package/dist/plus/git-github/providers/githubProvider.js +0 -2
- package/dist/plus/integrations/authentication/cloudIntegrationService.d.ts +29 -27
- package/dist/plus/integrations/authentication/cloudIntegrationService.js +173 -208
- package/dist/plus/integrations/authentication/cloudIntegrationService.js.map +1 -1
- package/dist/plus/integrations/authentication/configuredIntegrationService.d.ts +126 -107
- package/dist/plus/integrations/authentication/configuredIntegrationService.js +399 -497
- package/dist/plus/integrations/authentication/configuredIntegrationService.js.map +1 -1
- package/dist/plus/integrations/authentication/integrationAuthenticationProvider.d.ts +73 -72
- package/dist/plus/integrations/authentication/integrationAuthenticationProvider.js +153 -232
- package/dist/plus/integrations/authentication/integrationAuthenticationProvider.js.map +1 -1
- package/dist/plus/integrations/authentication/integrationAuthenticationService.d.ts +61 -59
- package/dist/plus/integrations/authentication/integrationAuthenticationService.js +100 -124
- package/dist/plus/integrations/authentication/integrationAuthenticationService.js.map +1 -1
- package/dist/plus/integrations/authentication/manualTokenProvider.d.ts +14 -12
- package/dist/plus/integrations/authentication/manualTokenProvider.js +26 -51
- package/dist/plus/integrations/authentication/manualTokenProvider.js.map +1 -1
- package/dist/plus/integrations/authentication/models.d.ts +102 -85
- package/dist/plus/integrations/authentication/models.js +55 -54
- package/dist/plus/integrations/authentication/models.js.map +1 -1
- package/dist/plus/integrations/authentication/rejectedTokenTracker.d.ts +19 -17
- package/dist/plus/integrations/authentication/rejectedTokenTracker.js +53 -51
- package/dist/plus/integrations/authentication/rejectedTokenTracker.js.map +1 -1
- package/dist/plus/integrations/collectionMetadata.d.ts +12 -10
- package/dist/plus/integrations/collectionMetadata.js +204 -254
- package/dist/plus/integrations/collectionMetadata.js.map +1 -1
- package/dist/plus/integrations/constants.d.ts +60 -34
- package/dist/plus/integrations/constants.js +157 -132
- package/dist/plus/integrations/constants.js.map +1 -1
- package/dist/plus/integrations/context.d.ts +253 -252
- package/dist/plus/integrations/context.js +0 -2
- package/dist/plus/integrations/errors.d.ts +26 -25
- package/dist/plus/integrations/errors.js +116 -140
- package/dist/plus/integrations/errors.js.map +1 -1
- package/dist/plus/integrations/index.d.ts +36 -40
- package/dist/plus/integrations/index.js +46 -57
- package/dist/plus/integrations/index.js.map +1 -1
- package/dist/plus/integrations/integrationService.d.ts +445 -440
- package/dist/plus/integrations/integrationService.js +1054 -1324
- package/dist/plus/integrations/integrationService.js.map +1 -1
- package/dist/plus/integrations/lite.d.ts +33 -31
- package/dist/plus/integrations/lite.js +84 -122
- package/dist/plus/integrations/lite.js.map +1 -1
- package/dist/plus/integrations/manager.d.ts +592 -580
- package/dist/plus/integrations/manager.js +0 -2
- package/dist/plus/integrations/models/gitHostIntegration.d.ts +420 -415
- package/dist/plus/integrations/models/gitHostIntegration.js +1180 -1293
- package/dist/plus/integrations/models/gitHostIntegration.js.map +1 -1
- package/dist/plus/integrations/models/integration.d.ts +200 -190
- package/dist/plus/integrations/models/integration.js +577 -722
- package/dist/plus/integrations/models/integration.js.map +1 -1
- package/dist/plus/integrations/models/issueCache.d.ts +15 -13
- package/dist/plus/integrations/models/issueCache.js +9 -7
- package/dist/plus/integrations/models/issueCache.js.map +1 -1
- package/dist/plus/integrations/models/issueReads.d.ts +108 -85
- package/dist/plus/integrations/models/issueReads.js +0 -2
- package/dist/plus/integrations/models/issuesIntegration.d.ts +72 -71
- package/dist/plus/integrations/models/issuesIntegration.js +160 -186
- package/dist/plus/integrations/models/issuesIntegration.js.map +1 -1
- package/dist/plus/integrations/models/pullRequestReads.d.ts +9 -7
- package/dist/plus/integrations/models/pullRequestReads.js +0 -2
- package/dist/plus/integrations/providerFilters.d.ts +8 -20
- package/dist/plus/integrations/providerFilters.js +11 -7
- package/dist/plus/integrations/providerFilters.js.map +1 -1
- package/dist/plus/integrations/providers/accounts.d.ts +7 -5
- package/dist/plus/integrations/providers/accounts.js +21 -31
- package/dist/plus/integrations/providers/accounts.js.map +1 -1
- package/dist/plus/integrations/providers/apiClients.d.ts +13 -10
- package/dist/plus/integrations/providers/apiClients.js +51 -36
- package/dist/plus/integrations/providers/apiClients.js.map +1 -1
- package/dist/plus/integrations/providers/apiConfig.d.ts +31 -29
- package/dist/plus/integrations/providers/apiConfig.js +18 -16
- package/dist/plus/integrations/providers/apiConfig.js.map +1 -1
- package/dist/plus/integrations/providers/azure/azure.d.ts +69 -67
- package/dist/plus/integrations/providers/azure/azure.js +452 -577
- package/dist/plus/integrations/providers/azure/azure.js.map +1 -1
- package/dist/plus/integrations/providers/azure/models.d.ts +228 -226
- package/dist/plus/integrations/providers/azure/models.js +223 -251
- package/dist/plus/integrations/providers/azure/models.js.map +1 -1
- package/dist/plus/integrations/providers/azureDevOps.d.ts +132 -131
- package/dist/plus/integrations/providers/azureDevOps.js +773 -931
- package/dist/plus/integrations/providers/azureDevOps.js.map +1 -1
- package/dist/plus/integrations/providers/bitbucket/bitbucket.d.ts +50 -48
- package/dist/plus/integrations/providers/bitbucket/bitbucket.js +417 -585
- package/dist/plus/integrations/providers/bitbucket/bitbucket.js.map +1 -1
- package/dist/plus/integrations/providers/bitbucket/models.d.ts +179 -179
- package/dist/plus/integrations/providers/bitbucket/models.js +96 -144
- package/dist/plus/integrations/providers/bitbucket/models.js.map +1 -1
- package/dist/plus/integrations/providers/bitbucket-server/models.d.ts +111 -109
- package/dist/plus/integrations/providers/bitbucket-server/models.js +102 -121
- package/dist/plus/integrations/providers/bitbucket-server/models.js.map +1 -1
- package/dist/plus/integrations/providers/bitbucket-server.d.ts +79 -79
- package/dist/plus/integrations/providers/bitbucket-server.js +205 -241
- package/dist/plus/integrations/providers/bitbucket-server.js.map +1 -1
- package/dist/plus/integrations/providers/bitbucket.d.ts +80 -79
- package/dist/plus/integrations/providers/bitbucket.js +390 -477
- package/dist/plus/integrations/providers/bitbucket.js.map +1 -1
- package/dist/plus/integrations/providers/github/github.d.ts +5 -3
- package/dist/plus/integrations/providers/github/github.js +38 -45
- package/dist/plus/integrations/providers/github/github.js.map +1 -1
- package/dist/plus/integrations/providers/github/github.utils.d.ts +8 -5
- package/dist/plus/integrations/providers/github/github.utils.js +7 -4
- package/dist/plus/integrations/providers/github/github.utils.js.map +1 -1
- package/dist/plus/integrations/providers/github/models.d.ts +2 -3
- package/dist/plus/integrations/providers/github/models.js +2 -2
- package/dist/plus/integrations/providers/github.d.ts +174 -172
- package/dist/plus/integrations/providers/github.js +431 -523
- package/dist/plus/integrations/providers/github.js.map +1 -1
- package/dist/plus/integrations/providers/gitlab/gitlab.d.ts +67 -66
- package/dist/plus/integrations/providers/gitlab/gitlab.js +546 -757
- package/dist/plus/integrations/providers/gitlab/gitlab.js.map +1 -1
- package/dist/plus/integrations/providers/gitlab/gitlab.utils.d.ts +7 -5
- package/dist/plus/integrations/providers/gitlab/gitlab.utils.js +45 -46
- package/dist/plus/integrations/providers/gitlab/gitlab.utils.js.map +1 -1
- package/dist/plus/integrations/providers/gitlab/models.d.ts +109 -107
- package/dist/plus/integrations/providers/gitlab/models.js +74 -89
- package/dist/plus/integrations/providers/gitlab/models.js.map +1 -1
- package/dist/plus/integrations/providers/gitlab.d.ts +115 -114
- package/dist/plus/integrations/providers/gitlab.js +440 -528
- package/dist/plus/integrations/providers/gitlab.js.map +1 -1
- package/dist/plus/integrations/providers/issueSorts.d.ts +3 -1
- package/dist/plus/integrations/providers/issueSorts.js +66 -62
- package/dist/plus/integrations/providers/issueSorts.js.map +1 -1
- package/dist/plus/integrations/providers/jira-server.d.ts +90 -0
- package/dist/plus/integrations/providers/jira-server.js +322 -0
- package/dist/plus/integrations/providers/jira-server.js.map +1 -0
- package/dist/plus/integrations/providers/jira.d.ts +41 -39
- package/dist/plus/integrations/providers/jira.js +378 -440
- package/dist/plus/integrations/providers/jira.js.map +1 -1
- package/dist/plus/integrations/providers/jiraIssueByKey.d.ts +3 -1
- package/dist/plus/integrations/providers/jiraIssueByKey.js +85 -89
- package/dist/plus/integrations/providers/jiraIssueByKey.js.map +1 -1
- package/dist/plus/integrations/providers/linear.d.ts +63 -62
- package/dist/plus/integrations/providers/linear.js +315 -358
- package/dist/plus/integrations/providers/linear.js.map +1 -1
- package/dist/plus/integrations/providers/models.d.ts +514 -503
- package/dist/plus/integrations/providers/models.js +816 -865
- package/dist/plus/integrations/providers/models.js.map +1 -1
- package/dist/plus/integrations/providers/providerErrors.d.ts +35 -2
- package/dist/plus/integrations/providers/providerErrors.js +120 -81
- package/dist/plus/integrations/providers/providerErrors.js.map +1 -1
- package/dist/plus/integrations/providers/providersApi.d.ts +299 -271
- package/dist/plus/integrations/providers/providersApi.js +1048 -1001
- package/dist/plus/integrations/providers/providersApi.js.map +1 -1
- package/dist/plus/integrations/providers/pullRequestReviews.d.ts +21 -21
- package/dist/plus/integrations/providers/pullRequestReviews.js +64 -90
- package/dist/plus/integrations/providers/pullRequestReviews.js.map +1 -1
- package/dist/plus/integrations/providers/trello.d.ts +35 -34
- package/dist/plus/integrations/providers/trello.js +136 -143
- package/dist/plus/integrations/providers/trello.js.map +1 -1
- package/dist/plus/integrations/providers/utils/providerPaging.d.ts +4 -2
- package/dist/plus/integrations/providers/utils/providerPaging.js +131 -156
- package/dist/plus/integrations/providers/utils/providerPaging.js.map +1 -1
- package/dist/plus/integrations/providers/utils.d.ts +51 -50
- package/dist/plus/integrations/providers/utils.js +185 -296
- package/dist/plus/integrations/providers/utils.js.map +1 -1
- package/dist/plus/integrations/reads/broaden.d.ts +10 -8
- package/dist/plus/integrations/reads/broaden.js +320 -439
- package/dist/plus/integrations/reads/broaden.js.map +1 -1
- package/dist/plus/integrations/reads/context.d.ts +47 -45
- package/dist/plus/integrations/reads/context.js +0 -2
- package/dist/plus/integrations/reads/counts.d.ts +74 -72
- package/dist/plus/integrations/reads/counts.js +233 -314
- package/dist/plus/integrations/reads/counts.js.map +1 -1
- package/dist/plus/integrations/reads/cursors.d.ts +26 -24
- package/dist/plus/integrations/reads/cursors.js +80 -115
- package/dist/plus/integrations/reads/cursors.js.map +1 -1
- package/dist/plus/integrations/reads/drains.d.ts +24 -23
- package/dist/plus/integrations/reads/drains.js +225 -298
- package/dist/plus/integrations/reads/drains.js.map +1 -1
- package/dist/plus/integrations/reads/filters.d.ts +84 -80
- package/dist/plus/integrations/reads/filters.js +326 -414
- package/dist/plus/integrations/reads/filters.js.map +1 -1
- package/dist/plus/integrations/reads/hierarchy.d.ts +14 -12
- package/dist/plus/integrations/reads/hierarchy.js +248 -332
- package/dist/plus/integrations/reads/hierarchy.js.map +1 -1
- package/dist/plus/integrations/reads/hierarchy.utils.d.ts +11 -9
- package/dist/plus/integrations/reads/hierarchy.utils.js +109 -108
- package/dist/plus/integrations/reads/hierarchy.utils.js.map +1 -1
- package/dist/plus/integrations/reads/issueBatch.d.ts +28 -26
- package/dist/plus/integrations/reads/issueBatch.js +83 -85
- package/dist/plus/integrations/reads/issueBatch.js.map +1 -1
- package/dist/plus/integrations/reads/issueTracker.d.ts +42 -33
- package/dist/plus/integrations/reads/issueTracker.js +265 -386
- package/dist/plus/integrations/reads/issueTracker.js.map +1 -1
- package/dist/plus/integrations/reads/issues.d.ts +50 -47
- package/dist/plus/integrations/reads/issues.js +202 -331
- package/dist/plus/integrations/reads/issues.js.map +1 -1
- package/dist/plus/integrations/reads/ordering.d.ts +32 -30
- package/dist/plus/integrations/reads/ordering.js +47 -43
- package/dist/plus/integrations/reads/ordering.js.map +1 -1
- package/dist/plus/integrations/reads/paging.d.ts +59 -57
- package/dist/plus/integrations/reads/paging.js +244 -261
- package/dist/plus/integrations/reads/paging.js.map +1 -1
- package/dist/plus/integrations/reads/pullRequests.d.ts +37 -35
- package/dist/plus/integrations/reads/pullRequests.js +95 -148
- package/dist/plus/integrations/reads/pullRequests.js.map +1 -1
- package/dist/plus/integrations/reads/resolveRepository.d.ts +15 -13
- package/dist/plus/integrations/reads/resolveRepository.js +147 -231
- package/dist/plus/integrations/reads/resolveRepository.js.map +1 -1
- package/dist/plus/integrations/reads/searchIssues.d.ts +29 -27
- package/dist/plus/integrations/reads/searchIssues.js +104 -153
- package/dist/plus/integrations/reads/searchIssues.js.map +1 -1
- package/dist/plus/integrations/reads/searchPullRequests.d.ts +20 -18
- package/dist/plus/integrations/reads/searchPullRequests.js +91 -113
- package/dist/plus/integrations/reads/searchPullRequests.js.map +1 -1
- package/dist/plus/integrations/reads/sweeps.d.ts +6 -4
- package/dist/plus/integrations/reads/sweeps.js +143 -178
- package/dist/plus/integrations/reads/sweeps.js.map +1 -1
- package/dist/plus/integrations/reads/trackerIssue.d.ts +24 -16
- package/dist/plus/integrations/reads/trackerIssue.js +52 -49
- package/dist/plus/integrations/reads/trackerIssue.js.map +1 -1
- package/dist/plus/integrations/reads/warnings.d.ts +10 -7
- package/dist/plus/integrations/reads/warnings.js +264 -291
- package/dist/plus/integrations/reads/warnings.js.map +1 -1
- package/dist/plus/integrations/results.d.ts +201 -199
- package/dist/plus/integrations/results.js +105 -119
- package/dist/plus/integrations/results.js.map +1 -1
- package/dist/plus/integrations/telemetry.d.ts +7 -5
- package/dist/plus/integrations/telemetry.js +9 -9
- package/dist/plus/integrations/telemetry.js.map +1 -1
- package/dist/plus/integrations/utils/domain.utils.d.ts +21 -0
- package/dist/plus/integrations/utils/domain.utils.js +55 -22
- package/dist/plus/integrations/utils/domain.utils.js.map +1 -1
- package/dist/plus/integrations/utils/integration.utils.d.ts +30 -6
- package/dist/plus/integrations/utils/integration.utils.js +154 -161
- package/dist/plus/integrations/utils/integration.utils.js.map +1 -1
- package/dist/utils/array.d.ts +9 -7
- package/dist/utils/array.js +110 -126
- package/dist/utils/array.js.map +1 -1
- package/dist/utils/base64.d.ts +2 -2
- package/dist/utils/base64.js +2 -2
- package/dist/utils/brand.d.ts +4 -3
- package/dist/utils/brand.js +0 -2
- package/dist/utils/cancellation.d.ts +24 -24
- package/dist/utils/cancellation.js +152 -167
- package/dist/utils/cancellation.js.map +1 -1
- package/dist/utils/charCode.d.ts +31 -37
- package/dist/utils/charCode.js +41 -37
- package/dist/utils/charCode.js.map +1 -1
- package/dist/utils/coalescedRun.d.ts +10 -8
- package/dist/utils/coalescedRun.js +39 -41
- package/dist/utils/coalescedRun.js.map +1 -1
- package/dist/utils/color.d.ts +137 -135
- package/dist/utils/color.js +535 -660
- package/dist/utils/color.js.map +1 -1
- package/dist/utils/counter.d.ts +5 -3
- package/dist/utils/counter.js +19 -17
- package/dist/utils/counter.js.map +1 -1
- package/dist/utils/crypto.d.ts +2 -2
- package/dist/utils/crypto.js +2 -2
- package/dist/utils/date.d.ts +10 -9
- package/dist/utils/date.js +312 -350
- package/dist/utils/date.js.map +1 -1
- package/dist/utils/debounce.d.ts +45 -43
- package/dist/utils/debounce.js +175 -206
- package/dist/utils/debounce.js.map +1 -1
- package/dist/utils/decorators/debounce.d.ts +3 -1
- package/dist/utils/decorators/debounce.js +16 -19
- package/dist/utils/decorators/debounce.js.map +1 -1
- package/dist/utils/decorators/gate.d.ts +13 -11
- package/dist/utils/decorators/gate.js +97 -124
- package/dist/utils/decorators/gate.js.map +1 -1
- package/dist/utils/decorators/log.d.ts +25 -24
- package/dist/utils/decorators/log.js +166 -227
- package/dist/utils/decorators/log.js.map +1 -1
- package/dist/utils/decorators/memoize.d.ts +10 -8
- package/dist/utils/decorators/memoize.js +49 -57
- package/dist/utils/decorators/memoize.js.map +1 -1
- package/dist/utils/decorators/resolver.d.ts +2 -0
- package/dist/utils/decorators/resolver.js +64 -75
- package/dist/utils/decorators/resolver.js.map +1 -1
- package/dist/utils/decorators/sequentialize.d.ts +15 -14
- package/dist/utils/decorators/sequentialize.js +61 -80
- package/dist/utils/decorators/sequentialize.js.map +1 -1
- package/dist/utils/decorators/serializable.d.ts +2 -0
- package/dist/utils/decorators/serializable.js +30 -39
- package/dist/utils/decorators/serializable.js.map +1 -1
- package/dist/utils/dedupedAsyncCache.d.ts +23 -21
- package/dist/utils/dedupedAsyncCache.js +63 -66
- package/dist/utils/dedupedAsyncCache.js.map +1 -1
- package/dist/utils/diff.d.ts +2 -0
- package/dist/utils/diff.js +41 -51
- package/dist/utils/diff.js.map +1 -1
- package/dist/utils/disposable.d.ts +15 -13
- package/dist/utils/disposable.js +71 -80
- package/dist/utils/disposable.js.map +1 -1
- package/dist/utils/dom.d.ts +45 -0
- package/dist/utils/dom.js +106 -0
- package/dist/utils/dom.js.map +1 -0
- package/dist/utils/encoding.d.ts +2 -0
- package/dist/utils/encoding.js +7 -5
- package/dist/utils/encoding.js.map +1 -1
- package/dist/utils/env/browser/base64.d.ts +2 -0
- package/dist/utils/env/browser/base64.js +32 -34
- package/dist/utils/env/browser/base64.js.map +1 -1
- package/dist/utils/env/browser/crypto.d.ts +2 -0
- package/dist/utils/env/browser/crypto.js +17 -13
- package/dist/utils/env/browser/crypto.js.map +1 -1
- package/dist/utils/env/browser/fs.d.ts +2 -0
- package/dist/utils/env/browser/fs.js +6 -2
- package/dist/utils/env/browser/fs.js.map +1 -1
- package/dist/utils/env/browser/hex.d.ts +2 -0
- package/dist/utils/env/browser/hex.js +271 -29
- package/dist/utils/env/browser/hex.js.map +1 -1
- package/dist/utils/env/browser/hrtime.d.ts +2 -0
- package/dist/utils/env/browser/hrtime.js +17 -13
- package/dist/utils/env/browser/hrtime.js.map +1 -1
- package/dist/utils/env/browser/logScope.d.ts +3 -1
- package/dist/utils/env/browser/logScope.js +39 -43
- package/dist/utils/env/browser/logScope.js.map +1 -1
- package/dist/utils/env/browser/md5.d.ts +2 -0
- package/dist/utils/env/browser/md5.js +211 -184
- package/dist/utils/env/browser/md5.js.map +1 -1
- package/dist/utils/env/browser/platform.d.ts +3 -0
- package/dist/utils/env/browser/platform.js +11 -4
- package/dist/utils/env/browser/platform.js.map +1 -1
- package/dist/utils/env/node/base64.d.ts +2 -0
- package/dist/utils/env/node/base64.js +13 -11
- package/dist/utils/env/node/base64.js.map +1 -1
- package/dist/utils/env/node/crypto.d.ts +2 -0
- package/dist/utils/env/node/crypto.js +13 -9
- package/dist/utils/env/node/crypto.js.map +1 -1
- package/dist/utils/env/node/exec.d.ts +66 -65
- package/dist/utils/env/node/exec.js +255 -267
- package/dist/utils/env/node/exec.js.map +1 -1
- package/dist/utils/env/node/fs.d.ts +2 -0
- package/dist/utils/env/node/fs.js +7 -3
- package/dist/utils/env/node/fs.js.map +1 -1
- package/dist/utils/env/node/hex.d.ts +2 -0
- package/dist/utils/env/node/hex.js +10 -6
- package/dist/utils/env/node/hex.js.map +1 -1
- package/dist/utils/env/node/hrtime.d.ts +2 -2
- package/dist/utils/env/node/hrtime.js +2 -2
- package/dist/utils/env/node/logScope.d.ts +3 -1
- package/dist/utils/env/node/logScope.js +52 -42
- package/dist/utils/env/node/logScope.js.map +1 -1
- package/dist/utils/env/node/platform.d.ts +3 -0
- package/dist/utils/env/node/platform.js +11 -4
- package/dist/utils/env/node/platform.js.map +1 -1
- package/dist/utils/error.d.ts +8 -6
- package/dist/utils/error.js +16 -14
- package/dist/utils/error.js.map +1 -1
- package/dist/utils/event.d.ts +27 -25
- package/dist/utils/event.js +141 -170
- package/dist/utils/event.js.map +1 -1
- package/dist/utils/formatter.d.ts +15 -14
- package/dist/utils/formatter.js +96 -129
- package/dist/utils/formatter.js.map +1 -1
- package/dist/utils/fs.d.ts +2 -2
- package/dist/utils/fs.js +2 -2
- package/dist/utils/function.d.ts +5 -6
- package/dist/utils/function.js +73 -90
- package/dist/utils/function.js.map +1 -1
- package/dist/utils/fuzzy.d.ts +18 -16
- package/dist/utils/fuzzy.js +121 -127
- package/dist/utils/fuzzy.js.map +1 -1
- package/dist/utils/gitRefs.d.ts +11 -0
- package/dist/utils/gitRefs.js +21 -0
- package/dist/utils/gitRefs.js.map +1 -0
- package/dist/utils/hash.d.ts +2 -0
- package/dist/utils/hash.js +49 -47
- package/dist/utils/hash.js.map +1 -1
- package/dist/utils/hex.d.ts +2 -2
- package/dist/utils/hex.js +2 -2
- package/dist/utils/hostingServiceType.d.ts +8 -0
- package/dist/utils/hostingServiceType.js +0 -0
- package/dist/utils/hrtime.d.ts +4 -2
- package/dist/utils/hrtime.js +8 -5
- package/dist/utils/hrtime.js.map +1 -1
- package/dist/utils/iterable.d.ts +3 -1
- package/dist/utils/iterable.js +591 -616
- package/dist/utils/iterable.js.map +1 -1
- package/dist/utils/keys/chord.d.ts +27 -25
- package/dist/utils/keys/chord.js +108 -122
- package/dist/utils/keys/chord.js.map +1 -1
- package/dist/utils/keys/keybinding.d.ts +98 -22
- package/dist/utils/keys/keybinding.js +151 -53
- package/dist/utils/keys/keybinding.js.map +1 -1
- package/dist/utils/keys/keymapDispatcher.d.ts +66 -0
- package/dist/utils/keys/keymapDispatcher.js +187 -0
- package/dist/utils/keys/keymapDispatcher.js.map +1 -0
- package/dist/utils/lazy.d.ts +14 -12
- package/dist/utils/lazy.js +35 -36
- package/dist/utils/lazy.js.map +1 -1
- package/dist/utils/loggable.d.ts +3 -1
- package/dist/utils/loggable.js +6 -2
- package/dist/utils/loggable.js.map +1 -1
- package/dist/utils/logger.d.ts +48 -46
- package/dist/utils/logger.js +219 -304
- package/dist/utils/logger.js.map +1 -1
- package/dist/utils/logger.scoped.d.ts +30 -28
- package/dist/utils/logger.scoped.js +133 -147
- package/dist/utils/logger.scoped.js.map +1 -1
- package/dist/utils/lruMap.d.ts +34 -32
- package/dist/utils/lruMap.js +97 -101
- package/dist/utils/lruMap.js.map +1 -1
- package/dist/utils/markdown.d.ts +5 -3
- package/dist/utils/markdown.js +52 -88
- package/dist/utils/markdown.js.map +1 -1
- package/dist/utils/mru.d.ts +13 -11
- package/dist/utils/mru.js +57 -62
- package/dist/utils/mru.js.map +1 -1
- package/dist/utils/object.d.ts +9 -34
- package/dist/utils/object.js +132 -191
- package/dist/utils/object.js.map +1 -1
- package/dist/utils/paging.d.ts +36 -34
- package/dist/utils/paging.js +42 -45
- package/dist/utils/paging.js.map +1 -1
- package/dist/utils/path.d.ts +4 -1
- package/dist/utils/path.js +129 -162
- package/dist/utils/path.js.map +1 -1
- package/dist/utils/pausedOperation.d.ts +42 -0
- package/dist/utils/pausedOperation.js +62 -0
- package/dist/utils/pausedOperation.js.map +1 -0
- package/dist/utils/platform.d.ts +2 -2
- package/dist/utils/platform.js +2 -2
- package/dist/utils/plural.d.ts +21 -0
- package/dist/utils/plural.js +136 -0
- package/dist/utils/plural.js.map +1 -0
- package/dist/utils/promise.d.ts +19 -18
- package/dist/utils/promise.js +323 -360
- package/dist/utils/promise.js.map +1 -1
- package/dist/utils/promiseCache.d.ts +331 -330
- package/dist/utils/promiseCache.js +602 -717
- package/dist/utils/promiseCache.js.map +1 -1
- package/dist/utils/resourceUsage.d.ts +2 -0
- package/dist/utils/resourceUsage.js +0 -2
- package/dist/utils/searchTree.d.ts +51 -49
- package/dist/utils/searchTree.js +306 -396
- package/dist/utils/searchTree.js.map +1 -1
- package/dist/utils/stopwatch.d.ts +33 -32
- package/dist/utils/stopwatch.js +67 -81
- package/dist/utils/stopwatch.js.map +1 -1
- package/dist/utils/string.d.ts +17 -24
- package/dist/utils/string.js +787 -803
- package/dist/utils/string.js.map +1 -1
- package/dist/utils/subscriptionManager.d.ts +15 -14
- package/dist/utils/subscriptionManager.js +36 -33
- package/dist/utils/subscriptionManager.js.map +1 -1
- package/dist/utils/trie.d.ts +64 -62
- package/dist/utils/trie.js +438 -580
- package/dist/utils/trie.js.map +1 -1
- package/dist/utils/types.d.ts +8 -16
- package/dist/utils/types.js +0 -2
- package/dist/utils/uri.d.ts +27 -25
- package/dist/utils/uri.js +42 -42
- package/dist/utils/uri.js.map +1 -1
- package/dist/utils/validation.d.ts +13 -12
- package/dist/utils/validation.js +17 -23
- package/dist/utils/validation.js.map +1 -1
- package/dist/utils/version.d.ts +6 -5
- package/dist/utils/version.js +77 -104
- package/dist/utils/version.js.map +1 -1
- package/docs/integrations.md +70 -26
- package/package.json +18 -8
- package/dist/git/cache.d.ts.map +0 -1
- package/dist/git/context.d.ts.map +0 -1
- package/dist/git/errors.d.ts.map +0 -1
- package/dist/git/features.d.ts.map +0 -1
- package/dist/git/gitHealth.d.ts.map +0 -1
- package/dist/git/models/author.d.ts.map +0 -1
- package/dist/git/models/author.js.map +0 -1
- package/dist/git/models/autolink.d.ts.map +0 -1
- package/dist/git/models/autolink.js.map +0 -1
- package/dist/git/models/blame.d.ts.map +0 -1
- package/dist/git/models/blame.js.map +0 -1
- package/dist/git/models/branch.d.ts.map +0 -1
- package/dist/git/models/commit.d.ts.map +0 -1
- package/dist/git/models/contributor.d.ts.map +0 -1
- package/dist/git/models/defaultBranch.d.ts.map +0 -1
- package/dist/git/models/defaultBranch.js.map +0 -1
- package/dist/git/models/diff.d.ts.map +0 -1
- package/dist/git/models/diff.js.map +0 -1
- package/dist/git/models/file.d.ts.map +0 -1
- package/dist/git/models/file.js.map +0 -1
- package/dist/git/models/fileChange.d.ts.map +0 -1
- package/dist/git/models/fileStatus.d.ts.map +0 -1
- package/dist/git/models/graph.d.ts.map +0 -1
- package/dist/git/models/graphSearch.d.ts.map +0 -1
- package/dist/git/models/graphSearch.js.map +0 -1
- package/dist/git/models/graphSession.d.ts.map +0 -1
- package/dist/git/models/issue.d.ts.map +0 -1
- package/dist/git/models/issueOrPullRequest.d.ts.map +0 -1
- package/dist/git/models/issueOrPullRequest.js.map +0 -1
- package/dist/git/models/lineRange.d.ts.map +0 -1
- package/dist/git/models/lineRange.js.map +0 -1
- package/dist/git/models/log.d.ts.map +0 -1
- package/dist/git/models/log.js.map +0 -1
- package/dist/git/models/mergeConflicts.d.ts.map +0 -1
- package/dist/git/models/mergeConflicts.js.map +0 -1
- package/dist/git/models/patch.d.ts.map +0 -1
- package/dist/git/models/patch.js.map +0 -1
- package/dist/git/models/pausedOperationStatus.d.ts.map +0 -1
- package/dist/git/models/pausedOperationStatus.js.map +0 -1
- package/dist/git/models/pullRequest.d.ts.map +0 -1
- package/dist/git/models/rebase.d.ts.map +0 -1
- package/dist/git/models/rebase.js.map +0 -1
- package/dist/git/models/reference.d.ts.map +0 -1
- package/dist/git/models/reference.js.map +0 -1
- package/dist/git/models/reflog.d.ts.map +0 -1
- package/dist/git/models/remote.d.ts.map +0 -1
- package/dist/git/models/remoteProvider.d.ts.map +0 -1
- package/dist/git/models/remoteResource.d.ts.map +0 -1
- package/dist/git/models/repository.d.ts.map +0 -1
- package/dist/git/models/repositoryChangeEvent.d.ts.map +0 -1
- package/dist/git/models/repositoryIdentities.d.ts.map +0 -1
- package/dist/git/models/repositoryMetadata.d.ts.map +0 -1
- package/dist/git/models/repositoryMetadata.js.map +0 -1
- package/dist/git/models/resourceDescriptor.d.ts.map +0 -1
- package/dist/git/models/resourceDescriptor.js.map +0 -1
- package/dist/git/models/revision.d.ts.map +0 -1
- package/dist/git/models/search.d.ts.map +0 -1
- package/dist/git/models/shortlog.d.ts.map +0 -1
- package/dist/git/models/shortlog.js.map +0 -1
- package/dist/git/models/signature.d.ts.map +0 -1
- package/dist/git/models/signature.js.map +0 -1
- package/dist/git/models/staging.d.ts.map +0 -1
- package/dist/git/models/staging.js.map +0 -1
- package/dist/git/models/stash.d.ts.map +0 -1
- package/dist/git/models/stash.js.map +0 -1
- package/dist/git/models/status.d.ts.map +0 -1
- package/dist/git/models/statusFile.d.ts.map +0 -1
- package/dist/git/models/tag.d.ts.map +0 -1
- package/dist/git/models/tree.d.ts.map +0 -1
- package/dist/git/models/tree.js.map +0 -1
- package/dist/git/models/user.d.ts.map +0 -1
- package/dist/git/models/user.js.map +0 -1
- package/dist/git/models/worktree.d.ts.map +0 -1
- package/dist/git/parsers/diffParser.d.ts.map +0 -1
- package/dist/git/parsers/rebaseTodoParser.d.ts.map +0 -1
- package/dist/git/providers/blame.d.ts.map +0 -1
- package/dist/git/providers/blame.js.map +0 -1
- package/dist/git/providers/branches.d.ts.map +0 -1
- package/dist/git/providers/branches.js.map +0 -1
- package/dist/git/providers/commits.d.ts.map +0 -1
- package/dist/git/providers/commits.js.map +0 -1
- package/dist/git/providers/config.d.ts.map +0 -1
- package/dist/git/providers/config.js.map +0 -1
- package/dist/git/providers/contributors.d.ts.map +0 -1
- package/dist/git/providers/contributors.js.map +0 -1
- package/dist/git/providers/diff.d.ts.map +0 -1
- package/dist/git/providers/diff.js.map +0 -1
- package/dist/git/providers/graph.d.ts.map +0 -1
- package/dist/git/providers/graph.js.map +0 -1
- package/dist/git/providers/maintenance.d.ts.map +0 -1
- package/dist/git/providers/maintenance.js.map +0 -1
- package/dist/git/providers/operations.d.ts.map +0 -1
- package/dist/git/providers/operations.js.map +0 -1
- package/dist/git/providers/patch.d.ts.map +0 -1
- package/dist/git/providers/patch.js.map +0 -1
- package/dist/git/providers/pausedOperations.d.ts.map +0 -1
- package/dist/git/providers/pausedOperations.js.map +0 -1
- package/dist/git/providers/provider.d.ts.map +0 -1
- package/dist/git/providers/provider.js.map +0 -1
- package/dist/git/providers/refs.d.ts.map +0 -1
- package/dist/git/providers/refs.js.map +0 -1
- package/dist/git/providers/remotes.d.ts.map +0 -1
- package/dist/git/providers/remotes.js.map +0 -1
- package/dist/git/providers/revision.d.ts.map +0 -1
- package/dist/git/providers/revision.js.map +0 -1
- package/dist/git/providers/shared/remotes.d.ts.map +0 -1
- package/dist/git/providers/staging.d.ts.map +0 -1
- package/dist/git/providers/staging.js.map +0 -1
- package/dist/git/providers/stash.d.ts.map +0 -1
- package/dist/git/providers/stash.js.map +0 -1
- package/dist/git/providers/status.d.ts.map +0 -1
- package/dist/git/providers/status.js.map +0 -1
- package/dist/git/providers/tags.d.ts.map +0 -1
- package/dist/git/providers/tags.js.map +0 -1
- package/dist/git/providers/types.d.ts.map +0 -1
- package/dist/git/providers/types.js.map +0 -1
- package/dist/git/providers/worktrees.d.ts.map +0 -1
- package/dist/git/providers/worktrees.js.map +0 -1
- package/dist/git/remotes/azure-devops.d.ts.map +0 -1
- package/dist/git/remotes/bitbucket-server.d.ts.map +0 -1
- package/dist/git/remotes/bitbucket.d.ts.map +0 -1
- package/dist/git/remotes/custom.d.ts.map +0 -1
- package/dist/git/remotes/gerrit.d.ts.map +0 -1
- package/dist/git/remotes/gitea.d.ts.map +0 -1
- package/dist/git/remotes/github.d.ts.map +0 -1
- package/dist/git/remotes/gitlab.d.ts.map +0 -1
- package/dist/git/remotes/google-source.d.ts.map +0 -1
- package/dist/git/remotes/matcher.d.ts.map +0 -1
- package/dist/git/repositoryService.d.ts.map +0 -1
- package/dist/git/run.types.d.ts.map +0 -1
- package/dist/git/run.types.js.map +0 -1
- package/dist/git/service.d.ts.map +0 -1
- package/dist/git/utils/autolink.utils.d.ts.map +0 -1
- package/dist/git/utils/blame.utils.d.ts.map +0 -1
- package/dist/git/utils/branch.utils.d.ts.map +0 -1
- package/dist/git/utils/commit.utils.d.ts.map +0 -1
- package/dist/git/utils/config.utils.d.ts.map +0 -1
- package/dist/git/utils/conflictResolution.utils.d.ts.map +0 -1
- package/dist/git/utils/contributor.utils.d.ts.map +0 -1
- package/dist/git/utils/fetch.utils.d.ts.map +0 -1
- package/dist/git/utils/fileStatus.utils.d.ts.map +0 -1
- package/dist/git/utils/graph.utils.d.ts.map +0 -1
- package/dist/git/utils/issue.utils.d.ts.map +0 -1
- package/dist/git/utils/issueOrPullRequest.utils.d.ts.map +0 -1
- package/dist/git/utils/mergeConflicts.utils.d.ts.map +0 -1
- package/dist/git/utils/pausedOperationStatus.utils.d.ts.map +0 -1
- package/dist/git/utils/pullRequest.utils.d.ts.map +0 -1
- package/dist/git/utils/reachability.utils.d.ts.map +0 -1
- package/dist/git/utils/rebase.utils.d.ts.map +0 -1
- package/dist/git/utils/reference.utils.d.ts.map +0 -1
- package/dist/git/utils/remote.utils.d.ts.map +0 -1
- package/dist/git/utils/repository.utils.d.ts.map +0 -1
- package/dist/git/utils/resourceDescriptor.utils.d.ts.map +0 -1
- package/dist/git/utils/revision.utils.d.ts.map +0 -1
- package/dist/git/utils/search.utils.d.ts.map +0 -1
- package/dist/git/utils/sorting.d.ts.map +0 -1
- package/dist/git/utils/sshKey.utils.d.ts.map +0 -1
- package/dist/git/utils/status.utils.d.ts.map +0 -1
- package/dist/git/utils/statusFile.utils.d.ts.map +0 -1
- package/dist/git/utils/tag.utils.d.ts.map +0 -1
- package/dist/git/utils/tooltip.utils.d.ts.map +0 -1
- package/dist/git/utils/uriAuthority.d.ts.map +0 -1
- package/dist/git/utils/user.utils.d.ts.map +0 -1
- package/dist/git/utils/worktree.utils.d.ts.map +0 -1
- package/dist/git/watching/changeEvent.d.ts.map +0 -1
- package/dist/git/watching/classifyChange.d.ts.map +0 -1
- package/dist/git/watching/gitIgnoreFilter.d.ts.map +0 -1
- package/dist/git/watching/initWatcher.d.ts.map +0 -1
- package/dist/git/watching/provider.d.ts.map +0 -1
- package/dist/git/watching/provider.js.map +0 -1
- package/dist/git/watching/watchGroup.d.ts.map +0 -1
- package/dist/git/watching/watchService.d.ts.map +0 -1
- package/dist/git/watching/watchSession.d.ts.map +0 -1
- package/dist/git/watching/watcherPatterns.d.ts.map +0 -1
- package/dist/git-cli/cliGitProvider.d.ts.map +0 -1
- package/dist/git-cli/exec/exec.d.ts.map +0 -1
- package/dist/git-cli/exec/exec.errors.d.ts.map +0 -1
- package/dist/git-cli/exec/exec.errors.js.map +0 -1
- package/dist/git-cli/exec/exec.js.map +0 -1
- package/dist/git-cli/exec/exec.types.d.ts.map +0 -1
- package/dist/git-cli/exec/exec.types.js.map +0 -1
- package/dist/git-cli/exec/features.d.ts.map +0 -1
- package/dist/git-cli/exec/features.js.map +0 -1
- package/dist/git-cli/exec/git.d.ts.map +0 -1
- package/dist/git-cli/exec/gitQueue.d.ts.map +0 -1
- package/dist/git-cli/exec/locator.d.ts.map +0 -1
- package/dist/git-cli/parsers/blameParser.d.ts.map +0 -1
- package/dist/git-cli/parsers/indexParser.d.ts.map +0 -1
- package/dist/git-cli/parsers/logParser.d.ts.map +0 -1
- package/dist/git-cli/parsers/mergeTreeParser.d.ts.map +0 -1
- package/dist/git-cli/parsers/refParser.d.ts.map +0 -1
- package/dist/git-cli/parsers/reflogParser.d.ts.map +0 -1
- package/dist/git-cli/parsers/remoteParser.d.ts.map +0 -1
- package/dist/git-cli/parsers/shortlogParser.d.ts.map +0 -1
- package/dist/git-cli/parsers/signatureParser.d.ts.map +0 -1
- package/dist/git-cli/parsers/sshSignatureParser.d.ts.map +0 -1
- package/dist/git-cli/parsers/statusParser.d.ts.map +0 -1
- package/dist/git-cli/parsers/treeParser.d.ts.map +0 -1
- package/dist/git-cli/parsers/worktreeParser.d.ts.map +0 -1
- package/dist/git-cli/providers/blame.d.ts.map +0 -1
- package/dist/git-cli/providers/branches.d.ts.map +0 -1
- package/dist/git-cli/providers/commitFilesetUtils.d.ts.map +0 -1
- package/dist/git-cli/providers/commits.d.ts.map +0 -1
- package/dist/git-cli/providers/config.d.ts.map +0 -1
- package/dist/git-cli/providers/contributors.d.ts.map +0 -1
- package/dist/git-cli/providers/diff.d.ts.map +0 -1
- package/dist/git-cli/providers/graph.d.ts.map +0 -1
- package/dist/git-cli/providers/maintenance.d.ts.map +0 -1
- package/dist/git-cli/providers/operations.d.ts.map +0 -1
- package/dist/git-cli/providers/patch.d.ts.map +0 -1
- package/dist/git-cli/providers/pausedOperations.d.ts.map +0 -1
- package/dist/git-cli/providers/refs.d.ts.map +0 -1
- package/dist/git-cli/providers/remotes.d.ts.map +0 -1
- package/dist/git-cli/providers/revision.d.ts.map +0 -1
- package/dist/git-cli/providers/staging.d.ts.map +0 -1
- package/dist/git-cli/providers/stash.d.ts.map +0 -1
- package/dist/git-cli/providers/status.d.ts.map +0 -1
- package/dist/git-cli/providers/tags.d.ts.map +0 -1
- package/dist/git-cli/providers/worktrees.d.ts.map +0 -1
- package/dist/git-cli/service.d.ts.map +0 -1
- package/dist/ipc/discovery.d.ts.map +0 -1
- package/dist/ipc/ipcServer.d.ts.map +0 -1
- package/dist/plus/agents/agentCapabilities.d.ts.map +0 -1
- package/dist/plus/agents/providers/claudeCodeTranscript.d.ts.map +0 -1
- package/dist/plus/agents/providers/gkAgentProvider.d.ts.map +0 -1
- package/dist/plus/agents/sanitizePrompt.d.ts.map +0 -1
- package/dist/plus/agents/stateMachine.d.ts.map +0 -1
- package/dist/plus/agents/types.d.ts.map +0 -1
- package/dist/plus/ai/constants.d.ts.map +0 -1
- package/dist/plus/ai/errors.d.ts.map +0 -1
- package/dist/plus/ai/models/conversation.d.ts.map +0 -1
- package/dist/plus/ai/models/model.d.ts.map +0 -1
- package/dist/plus/ai/models/promptTemplates.d.ts.map +0 -1
- package/dist/plus/ai/models/promptTemplates.js.map +0 -1
- package/dist/plus/ai/models/provider.d.ts.map +0 -1
- package/dist/plus/ai/models/provider.js.map +0 -1
- package/dist/plus/ai/models/results.d.ts.map +0 -1
- package/dist/plus/ai/models/results.js.map +0 -1
- package/dist/plus/ai/prompts.d.ts.map +0 -1
- package/dist/plus/ai/providers/anthropicProvider.d.ts.map +0 -1
- package/dist/plus/ai/providers/azureProvider.d.ts.map +0 -1
- package/dist/plus/ai/providers/context.d.ts.map +0 -1
- package/dist/plus/ai/providers/context.js.map +0 -1
- package/dist/plus/ai/providers/deepSeekProvider.d.ts.map +0 -1
- package/dist/plus/ai/providers/geminiProvider.d.ts.map +0 -1
- package/dist/plus/ai/providers/gitkrakenProvider.d.ts.map +0 -1
- package/dist/plus/ai/providers/huggingFaceProvider.d.ts.map +0 -1
- package/dist/plus/ai/providers/mistralProvider.d.ts.map +0 -1
- package/dist/plus/ai/providers/ollamaProvider.d.ts.map +0 -1
- package/dist/plus/ai/providers/openAICompatibleProvider.d.ts.map +0 -1
- package/dist/plus/ai/providers/openAICompatibleProviderBase.d.ts.map +0 -1
- package/dist/plus/ai/providers/openRouterProvider.d.ts.map +0 -1
- package/dist/plus/ai/providers/openaiProvider.d.ts.map +0 -1
- package/dist/plus/ai/providers/responseFormatCache.d.ts.map +0 -1
- package/dist/plus/ai/providers/xaiProvider.d.ts.map +0 -1
- package/dist/plus/ai/utils/ai.utils.d.ts.map +0 -1
- package/dist/plus/ai/utils/results.utils.d.ts.map +0 -1
- package/dist/plus/ai/utils/truncation.utils.d.ts.map +0 -1
- package/dist/plus/git-github/api/config.d.ts.map +0 -1
- package/dist/plus/git-github/api/github.d.ts.map +0 -1
- package/dist/plus/git-github/api/github.utils.d.ts.map +0 -1
- package/dist/plus/git-github/api/issueSearchQuery.d.ts.map +0 -1
- package/dist/plus/git-github/api/pullRequestSearchQuery.d.ts.map +0 -1
- package/dist/plus/git-github/api/token.d.ts.map +0 -1
- package/dist/plus/git-github/api/token.js.map +0 -1
- package/dist/plus/git-github/api/tokenUtils.d.ts.map +0 -1
- package/dist/plus/git-github/api/types.d.ts.map +0 -1
- package/dist/plus/git-github/api/types.js.map +0 -1
- package/dist/plus/git-github/context.d.ts.map +0 -1
- package/dist/plus/git-github/models.d.ts.map +0 -1
- package/dist/plus/git-github/providers/github/blame.d.ts.map +0 -1
- package/dist/plus/git-github/providers/github/branches.d.ts.map +0 -1
- package/dist/plus/git-github/providers/github/commits.d.ts.map +0 -1
- package/dist/plus/git-github/providers/github/config.d.ts.map +0 -1
- package/dist/plus/git-github/providers/github/contributors.d.ts.map +0 -1
- package/dist/plus/git-github/providers/github/diff.d.ts.map +0 -1
- package/dist/plus/git-github/providers/github/graph.d.ts.map +0 -1
- package/dist/plus/git-github/providers/github/refs.d.ts.map +0 -1
- package/dist/plus/git-github/providers/github/remotes.d.ts.map +0 -1
- package/dist/plus/git-github/providers/github/revision.d.ts.map +0 -1
- package/dist/plus/git-github/providers/github/status.d.ts.map +0 -1
- package/dist/plus/git-github/providers/github/tags.d.ts.map +0 -1
- package/dist/plus/git-github/providers/githubGitProvider.d.ts.map +0 -1
- package/dist/plus/git-github/providers/githubProvider.d.ts.map +0 -1
- package/dist/plus/git-github/providers/githubProvider.js.map +0 -1
- package/dist/plus/integrations/authentication/cloudIntegrationService.d.ts.map +0 -1
- package/dist/plus/integrations/authentication/configuredIntegrationService.d.ts.map +0 -1
- package/dist/plus/integrations/authentication/integrationAuthenticationProvider.d.ts.map +0 -1
- package/dist/plus/integrations/authentication/integrationAuthenticationService.d.ts.map +0 -1
- package/dist/plus/integrations/authentication/manualTokenProvider.d.ts.map +0 -1
- package/dist/plus/integrations/authentication/models.d.ts.map +0 -1
- package/dist/plus/integrations/authentication/rejectedTokenTracker.d.ts.map +0 -1
- package/dist/plus/integrations/collectionMetadata.d.ts.map +0 -1
- package/dist/plus/integrations/constants.d.ts.map +0 -1
- package/dist/plus/integrations/context.d.ts.map +0 -1
- package/dist/plus/integrations/context.js.map +0 -1
- package/dist/plus/integrations/errors.d.ts.map +0 -1
- package/dist/plus/integrations/index.d.ts.map +0 -1
- package/dist/plus/integrations/integrationService.d.ts.map +0 -1
- package/dist/plus/integrations/lite.d.ts.map +0 -1
- package/dist/plus/integrations/manager.d.ts.map +0 -1
- package/dist/plus/integrations/manager.js.map +0 -1
- package/dist/plus/integrations/models/gitHostIntegration.d.ts.map +0 -1
- package/dist/plus/integrations/models/integration.d.ts.map +0 -1
- package/dist/plus/integrations/models/issueCache.d.ts.map +0 -1
- package/dist/plus/integrations/models/issueReads.d.ts.map +0 -1
- package/dist/plus/integrations/models/issueReads.js.map +0 -1
- package/dist/plus/integrations/models/issuesIntegration.d.ts.map +0 -1
- package/dist/plus/integrations/models/pullRequestReads.d.ts.map +0 -1
- package/dist/plus/integrations/models/pullRequestReads.js.map +0 -1
- package/dist/plus/integrations/providerFilters.d.ts.map +0 -1
- package/dist/plus/integrations/providers/accounts.d.ts.map +0 -1
- package/dist/plus/integrations/providers/apiClients.d.ts.map +0 -1
- package/dist/plus/integrations/providers/apiConfig.d.ts.map +0 -1
- package/dist/plus/integrations/providers/azure/azure.d.ts.map +0 -1
- package/dist/plus/integrations/providers/azure/models.d.ts.map +0 -1
- package/dist/plus/integrations/providers/azureDevOps.d.ts.map +0 -1
- package/dist/plus/integrations/providers/bitbucket/bitbucket.d.ts.map +0 -1
- package/dist/plus/integrations/providers/bitbucket/models.d.ts.map +0 -1
- package/dist/plus/integrations/providers/bitbucket-server/models.d.ts.map +0 -1
- package/dist/plus/integrations/providers/bitbucket-server.d.ts.map +0 -1
- package/dist/plus/integrations/providers/bitbucket.d.ts.map +0 -1
- package/dist/plus/integrations/providers/github/github.d.ts.map +0 -1
- package/dist/plus/integrations/providers/github/github.utils.d.ts.map +0 -1
- package/dist/plus/integrations/providers/github/models.d.ts.map +0 -1
- package/dist/plus/integrations/providers/github/models.js.map +0 -1
- package/dist/plus/integrations/providers/github.d.ts.map +0 -1
- package/dist/plus/integrations/providers/gitlab/gitlab.d.ts.map +0 -1
- package/dist/plus/integrations/providers/gitlab/gitlab.utils.d.ts.map +0 -1
- package/dist/plus/integrations/providers/gitlab/models.d.ts.map +0 -1
- package/dist/plus/integrations/providers/gitlab.d.ts.map +0 -1
- package/dist/plus/integrations/providers/issueSorts.d.ts.map +0 -1
- package/dist/plus/integrations/providers/jira.d.ts.map +0 -1
- package/dist/plus/integrations/providers/jiraIssueByKey.d.ts.map +0 -1
- package/dist/plus/integrations/providers/linear.d.ts.map +0 -1
- package/dist/plus/integrations/providers/models.d.ts.map +0 -1
- package/dist/plus/integrations/providers/providerErrors.d.ts.map +0 -1
- package/dist/plus/integrations/providers/providersApi.d.ts.map +0 -1
- package/dist/plus/integrations/providers/pullRequestReviews.d.ts.map +0 -1
- package/dist/plus/integrations/providers/trello.d.ts.map +0 -1
- package/dist/plus/integrations/providers/utils/providerPaging.d.ts.map +0 -1
- package/dist/plus/integrations/providers/utils.d.ts.map +0 -1
- package/dist/plus/integrations/reads/broaden.d.ts.map +0 -1
- package/dist/plus/integrations/reads/context.d.ts.map +0 -1
- package/dist/plus/integrations/reads/context.js.map +0 -1
- package/dist/plus/integrations/reads/counts.d.ts.map +0 -1
- package/dist/plus/integrations/reads/cursors.d.ts.map +0 -1
- package/dist/plus/integrations/reads/drains.d.ts.map +0 -1
- package/dist/plus/integrations/reads/filters.d.ts.map +0 -1
- package/dist/plus/integrations/reads/hierarchy.d.ts.map +0 -1
- package/dist/plus/integrations/reads/hierarchy.utils.d.ts.map +0 -1
- package/dist/plus/integrations/reads/issueBatch.d.ts.map +0 -1
- package/dist/plus/integrations/reads/issueTracker.d.ts.map +0 -1
- package/dist/plus/integrations/reads/issues.d.ts.map +0 -1
- package/dist/plus/integrations/reads/ordering.d.ts.map +0 -1
- package/dist/plus/integrations/reads/paging.d.ts.map +0 -1
- package/dist/plus/integrations/reads/pullRequests.d.ts.map +0 -1
- package/dist/plus/integrations/reads/resolveRepository.d.ts.map +0 -1
- package/dist/plus/integrations/reads/searchIssues.d.ts.map +0 -1
- package/dist/plus/integrations/reads/searchPullRequests.d.ts.map +0 -1
- package/dist/plus/integrations/reads/sweeps.d.ts.map +0 -1
- package/dist/plus/integrations/reads/trackerIssue.d.ts.map +0 -1
- package/dist/plus/integrations/reads/warnings.d.ts.map +0 -1
- package/dist/plus/integrations/results.d.ts.map +0 -1
- package/dist/plus/integrations/telemetry.d.ts.map +0 -1
- package/dist/plus/integrations/utils/domain.utils.d.ts.map +0 -1
- package/dist/plus/integrations/utils/integration.utils.d.ts.map +0 -1
- package/dist/utils/array.d.ts.map +0 -1
- package/dist/utils/base64.d.ts.map +0 -1
- package/dist/utils/base64.js.map +0 -1
- package/dist/utils/brand.d.ts.map +0 -1
- package/dist/utils/brand.js.map +0 -1
- package/dist/utils/cancellation.d.ts.map +0 -1
- package/dist/utils/charCode.d.ts.map +0 -1
- package/dist/utils/coalescedRun.d.ts.map +0 -1
- package/dist/utils/color.d.ts.map +0 -1
- package/dist/utils/counter.d.ts.map +0 -1
- package/dist/utils/crypto.d.ts.map +0 -1
- package/dist/utils/crypto.js.map +0 -1
- package/dist/utils/date.d.ts.map +0 -1
- package/dist/utils/debounce.d.ts.map +0 -1
- package/dist/utils/decorators/debounce.d.ts.map +0 -1
- package/dist/utils/decorators/gate.d.ts.map +0 -1
- package/dist/utils/decorators/log.d.ts.map +0 -1
- package/dist/utils/decorators/memoize.d.ts.map +0 -1
- package/dist/utils/decorators/resolver.d.ts.map +0 -1
- package/dist/utils/decorators/sequentialize.d.ts.map +0 -1
- package/dist/utils/decorators/serializable.d.ts.map +0 -1
- package/dist/utils/dedupedAsyncCache.d.ts.map +0 -1
- package/dist/utils/diff.d.ts.map +0 -1
- package/dist/utils/disposable.d.ts.map +0 -1
- package/dist/utils/encoding.d.ts.map +0 -1
- package/dist/utils/env/browser/base64.d.ts.map +0 -1
- package/dist/utils/env/browser/crypto.d.ts.map +0 -1
- package/dist/utils/env/browser/fs.d.ts.map +0 -1
- package/dist/utils/env/browser/hex.d.ts.map +0 -1
- package/dist/utils/env/browser/hrtime.d.ts.map +0 -1
- package/dist/utils/env/browser/logScope.d.ts.map +0 -1
- package/dist/utils/env/browser/md5.d.ts.map +0 -1
- package/dist/utils/env/browser/platform.d.ts.map +0 -1
- package/dist/utils/env/node/base64.d.ts.map +0 -1
- package/dist/utils/env/node/crypto.d.ts.map +0 -1
- package/dist/utils/env/node/exec.d.ts.map +0 -1
- package/dist/utils/env/node/fs.d.ts.map +0 -1
- package/dist/utils/env/node/hex.d.ts.map +0 -1
- package/dist/utils/env/node/hrtime.d.ts.map +0 -1
- package/dist/utils/env/node/hrtime.js.map +0 -1
- package/dist/utils/env/node/logScope.d.ts.map +0 -1
- package/dist/utils/env/node/platform.d.ts.map +0 -1
- package/dist/utils/error.d.ts.map +0 -1
- package/dist/utils/event.d.ts.map +0 -1
- package/dist/utils/formatter.d.ts.map +0 -1
- package/dist/utils/fs.d.ts.map +0 -1
- package/dist/utils/fs.js.map +0 -1
- package/dist/utils/function.d.ts.map +0 -1
- package/dist/utils/fuzzy.d.ts.map +0 -1
- package/dist/utils/hash.d.ts.map +0 -1
- package/dist/utils/hex.d.ts.map +0 -1
- package/dist/utils/hex.js.map +0 -1
- package/dist/utils/hrtime.d.ts.map +0 -1
- package/dist/utils/iterable.d.ts.map +0 -1
- package/dist/utils/keys/chord.d.ts.map +0 -1
- package/dist/utils/keys/keybinding.d.ts.map +0 -1
- package/dist/utils/lazy.d.ts.map +0 -1
- package/dist/utils/loggable.d.ts.map +0 -1
- package/dist/utils/logger.d.ts.map +0 -1
- package/dist/utils/logger.scoped.d.ts.map +0 -1
- package/dist/utils/lruMap.d.ts.map +0 -1
- package/dist/utils/markdown.d.ts.map +0 -1
- package/dist/utils/mru.d.ts.map +0 -1
- package/dist/utils/object.d.ts.map +0 -1
- package/dist/utils/paging.d.ts.map +0 -1
- package/dist/utils/path.d.ts.map +0 -1
- package/dist/utils/platform.d.ts.map +0 -1
- package/dist/utils/platform.js.map +0 -1
- package/dist/utils/promise.d.ts.map +0 -1
- package/dist/utils/promiseCache.d.ts.map +0 -1
- package/dist/utils/resourceUsage.d.ts.map +0 -1
- package/dist/utils/resourceUsage.js.map +0 -1
- package/dist/utils/searchTree.d.ts.map +0 -1
- package/dist/utils/stopwatch.d.ts.map +0 -1
- package/dist/utils/string.d.ts.map +0 -1
- package/dist/utils/subscriptionManager.d.ts.map +0 -1
- package/dist/utils/trie.d.ts.map +0 -1
- package/dist/utils/types.d.ts.map +0 -1
- package/dist/utils/types.js.map +0 -1
- package/dist/utils/uri.d.ts.map +0 -1
- package/dist/utils/validation.d.ts.map +0 -1
- package/dist/utils/version.d.ts.map +0 -1
- package/src/git/cache.ts +0 -1859
- package/src/git/context.ts +0 -301
- package/src/git/errors.ts +0 -1168
- package/src/git/features.ts +0 -98
- package/src/git/gitHealth.ts +0 -522
- package/src/git/models/author.ts +0 -19
- package/src/git/models/autolink.ts +0 -59
- package/src/git/models/blame.ts +0 -46
- package/src/git/models/branch.ts +0 -237
- package/src/git/models/commit.ts +0 -673
- package/src/git/models/contributor.ts +0 -84
- package/src/git/models/defaultBranch.ts +0 -6
- package/src/git/models/diff.ts +0 -74
- package/src/git/models/file.ts +0 -29
- package/src/git/models/fileChange.ts +0 -82
- package/src/git/models/fileStatus.ts +0 -36
- package/src/git/models/graph.ts +0 -444
- package/src/git/models/graphSearch.ts +0 -53
- package/src/git/models/graphSession.ts +0 -102
- package/src/git/models/issue.ts +0 -273
- package/src/git/models/issueOrPullRequest.ts +0 -20
- package/src/git/models/lineRange.ts +0 -7
- package/src/git/models/log.ts +0 -21
- package/src/git/models/mergeConflicts.ts +0 -19
- package/src/git/models/patch.ts +0 -25
- package/src/git/models/pausedOperationStatus.ts +0 -63
- package/src/git/models/pullRequest.ts +0 -357
- package/src/git/models/rebase.ts +0 -60
- package/src/git/models/reference.ts +0 -80
- package/src/git/models/reflog.ts +0 -88
- package/src/git/models/remote.ts +0 -100
- package/src/git/models/remoteProvider.ts +0 -291
- package/src/git/models/remoteResource.ts +0 -87
- package/src/git/models/repository.ts +0 -510
- package/src/git/models/repositoryChangeEvent.ts +0 -30
- package/src/git/models/repositoryIdentities.ts +0 -99
- package/src/git/models/repositoryMetadata.ts +0 -12
- package/src/git/models/resourceDescriptor.ts +0 -28
- package/src/git/models/revision.ts +0 -12
- package/src/git/models/search.ts +0 -138
- package/src/git/models/shortlog.ts +0 -6
- package/src/git/models/signature.ts +0 -45
- package/src/git/models/staging.ts +0 -27
- package/src/git/models/stash.ts +0 -6
- package/src/git/models/status.ts +0 -246
- package/src/git/models/statusFile.ts +0 -131
- package/src/git/models/tag.ts +0 -76
- package/src/git/models/tree.ts +0 -10
- package/src/git/models/user.ts +0 -7
- package/src/git/models/worktree.ts +0 -160
- package/src/git/parsers/diffParser.ts +0 -648
- package/src/git/parsers/rebaseTodoParser.ts +0 -169
- package/src/git/providers/blame.ts +0 -40
- package/src/git/providers/branches.ts +0 -143
- package/src/git/providers/commits.ts +0 -174
- package/src/git/providers/config.ts +0 -167
- package/src/git/providers/contributors.ts +0 -34
- package/src/git/providers/diff.ts +0 -133
- package/src/git/providers/graph.ts +0 -95
- package/src/git/providers/maintenance.ts +0 -224
- package/src/git/providers/operations.ts +0 -164
- package/src/git/providers/patch.ts +0 -31
- package/src/git/providers/pausedOperations.ts +0 -23
- package/src/git/providers/provider.ts +0 -64
- package/src/git/providers/refs.ts +0 -68
- package/src/git/providers/remotes.ts +0 -33
- package/src/git/providers/revision.ts +0 -32
- package/src/git/providers/shared/remotes.ts +0 -95
- package/src/git/providers/staging.ts +0 -36
- package/src/git/providers/stash.ts +0 -51
- package/src/git/providers/status.ts +0 -48
- package/src/git/providers/tags.ts +0 -29
- package/src/git/providers/types.ts +0 -33
- package/src/git/providers/worktrees.ts +0 -37
- package/src/git/remotes/azure-devops.ts +0 -361
- package/src/git/remotes/bitbucket-server.ts +0 -189
- package/src/git/remotes/bitbucket.ts +0 -142
- package/src/git/remotes/custom.ts +0 -162
- package/src/git/remotes/gerrit.ts +0 -186
- package/src/git/remotes/gitea.ts +0 -184
- package/src/git/remotes/github.ts +0 -236
- package/src/git/remotes/gitlab.ts +0 -270
- package/src/git/remotes/google-source.ts +0 -51
- package/src/git/remotes/matcher.ts +0 -215
- package/src/git/repositoryService.ts +0 -180
- package/src/git/run.types.ts +0 -156
- package/src/git/service.ts +0 -369
- package/src/git/utils/autolink.utils.ts +0 -202
- package/src/git/utils/blame.utils.ts +0 -298
- package/src/git/utils/branch.utils.ts +0 -165
- package/src/git/utils/commit.utils.ts +0 -89
- package/src/git/utils/config.utils.ts +0 -8
- package/src/git/utils/conflictResolution.utils.ts +0 -157
- package/src/git/utils/contributor.utils.ts +0 -105
- package/src/git/utils/fetch.utils.ts +0 -48
- package/src/git/utils/fileStatus.utils.ts +0 -62
- package/src/git/utils/graph.utils.ts +0 -46
- package/src/git/utils/issue.utils.ts +0 -187
- package/src/git/utils/issueOrPullRequest.utils.ts +0 -23
- package/src/git/utils/mergeConflicts.utils.ts +0 -21
- package/src/git/utils/pausedOperationStatus.utils.ts +0 -184
- package/src/git/utils/pullRequest.utils.ts +0 -244
- package/src/git/utils/reachability.utils.ts +0 -180
- package/src/git/utils/rebase.utils.ts +0 -128
- package/src/git/utils/reference.utils.ts +0 -267
- package/src/git/utils/remote.utils.ts +0 -146
- package/src/git/utils/repository.utils.ts +0 -18
- package/src/git/utils/resourceDescriptor.utils.ts +0 -26
- package/src/git/utils/revision.utils.ts +0 -149
- package/src/git/utils/search.utils.ts +0 -624
- package/src/git/utils/sorting.ts +0 -329
- package/src/git/utils/sshKey.utils.ts +0 -30
- package/src/git/utils/status.utils.ts +0 -115
- package/src/git/utils/statusFile.utils.ts +0 -182
- package/src/git/utils/tag.utils.ts +0 -17
- package/src/git/utils/tooltip.utils.ts +0 -37
- package/src/git/utils/uriAuthority.ts +0 -34
- package/src/git/utils/user.utils.ts +0 -20
- package/src/git/utils/worktree.utils.ts +0 -21
- package/src/git/watching/changeEvent.ts +0 -95
- package/src/git/watching/classifyChange.ts +0 -104
- package/src/git/watching/gitIgnoreFilter.ts +0 -134
- package/src/git/watching/initWatcher.ts +0 -81
- package/src/git/watching/provider.ts +0 -24
- package/src/git/watching/watchGroup.ts +0 -185
- package/src/git/watching/watchService.ts +0 -430
- package/src/git/watching/watchSession.ts +0 -439
- package/src/git/watching/watcherPatterns.ts +0 -51
- package/src/git-cli/cliGitProvider.ts +0 -461
- package/src/git-cli/exec/exec.errors.ts +0 -1
- package/src/git-cli/exec/exec.ts +0 -11
- package/src/git-cli/exec/exec.types.ts +0 -8
- package/src/git-cli/exec/features.ts +0 -2
- package/src/git-cli/exec/git.ts +0 -1371
- package/src/git-cli/exec/gitQueue.ts +0 -326
- package/src/git-cli/exec/locator.ts +0 -157
- package/src/git-cli/parsers/blameParser.ts +0 -374
- package/src/git-cli/parsers/indexParser.ts +0 -192
- package/src/git-cli/parsers/logParser.ts +0 -1365
- package/src/git-cli/parsers/mergeTreeParser.ts +0 -22
- package/src/git-cli/parsers/refParser.ts +0 -110
- package/src/git-cli/parsers/reflogParser.ts +0 -153
- package/src/git-cli/parsers/remoteParser.ts +0 -95
- package/src/git-cli/parsers/shortlogParser.ts +0 -59
- package/src/git-cli/parsers/signatureParser.ts +0 -162
- package/src/git-cli/parsers/sshSignatureParser.ts +0 -85
- package/src/git-cli/parsers/statusParser.ts +0 -209
- package/src/git-cli/parsers/treeParser.ts +0 -61
- package/src/git-cli/parsers/worktreeParser.ts +0 -111
- package/src/git-cli/providers/blame.ts +0 -598
- package/src/git-cli/providers/branches.ts +0 -1931
- package/src/git-cli/providers/commitFilesetUtils.ts +0 -45
- package/src/git-cli/providers/commits.ts +0 -1856
- package/src/git-cli/providers/config.ts +0 -1025
- package/src/git-cli/providers/contributors.ts +0 -360
- package/src/git-cli/providers/diff.ts +0 -1172
- package/src/git-cli/providers/graph.ts +0 -2237
- package/src/git-cli/providers/maintenance.ts +0 -2599
- package/src/git-cli/providers/operations.ts +0 -1016
- package/src/git-cli/providers/patch.ts +0 -305
- package/src/git-cli/providers/pausedOperations.ts +0 -670
- package/src/git-cli/providers/refs.ts +0 -486
- package/src/git-cli/providers/remotes.ts +0 -115
- package/src/git-cli/providers/revision.ts +0 -383
- package/src/git-cli/providers/staging.ts +0 -210
- package/src/git-cli/providers/stash.ts +0 -577
- package/src/git-cli/providers/status.ts +0 -568
- package/src/git-cli/providers/tags.ts +0 -224
- package/src/git-cli/providers/worktrees.ts +0 -285
- package/src/git-cli/service.ts +0 -82
- package/src/ipc/discovery.ts +0 -186
- package/src/ipc/ipcServer.ts +0 -171
- package/src/plus/agents/agentCapabilities.ts +0 -286
- package/src/plus/agents/providers/claudeCodeTranscript.ts +0 -867
- package/src/plus/agents/providers/gkAgentProvider.ts +0 -4036
- package/src/plus/agents/sanitizePrompt.ts +0 -109
- package/src/plus/agents/stateMachine.ts +0 -197
- package/src/plus/agents/types.ts +0 -500
- package/src/plus/ai/constants.ts +0 -121
- package/src/plus/ai/errors.ts +0 -152
- package/src/plus/ai/models/conversation.ts +0 -35
- package/src/plus/ai/models/model.ts +0 -528
- package/src/plus/ai/models/promptTemplates.ts +0 -171
- package/src/plus/ai/models/provider.ts +0 -125
- package/src/plus/ai/models/results.ts +0 -31
- package/src/plus/ai/prompts.ts +0 -849
- package/src/plus/ai/providers/anthropicProvider.ts +0 -458
- package/src/plus/ai/providers/azureProvider.ts +0 -74
- package/src/plus/ai/providers/context.ts +0 -29
- package/src/plus/ai/providers/deepSeekProvider.ts +0 -46
- package/src/plus/ai/providers/geminiProvider.ts +0 -245
- package/src/plus/ai/providers/gitkrakenProvider.ts +0 -347
- package/src/plus/ai/providers/huggingFaceProvider.ts +0 -64
- package/src/plus/ai/providers/mistralProvider.ts +0 -243
- package/src/plus/ai/providers/ollamaProvider.ts +0 -292
- package/src/plus/ai/providers/openAICompatibleProvider.ts +0 -64
- package/src/plus/ai/providers/openAICompatibleProviderBase.ts +0 -654
- package/src/plus/ai/providers/openRouterProvider.ts +0 -101
- package/src/plus/ai/providers/openaiProvider.ts +0 -47
- package/src/plus/ai/providers/responseFormatCache.ts +0 -39
- package/src/plus/ai/providers/xaiProvider.ts +0 -54
- package/src/plus/ai/utils/ai.utils.ts +0 -95
- package/src/plus/ai/utils/results.utils.ts +0 -407
- package/src/plus/ai/utils/truncation.utils.ts +0 -296
- package/src/plus/git-github/api/config.ts +0 -91
- package/src/plus/git-github/api/github.ts +0 -5462
- package/src/plus/git-github/api/github.utils.ts +0 -36
- package/src/plus/git-github/api/issueSearchQuery.ts +0 -273
- package/src/plus/git-github/api/pullRequestSearchQuery.ts +0 -154
- package/src/plus/git-github/api/token.ts +0 -15
- package/src/plus/git-github/api/tokenUtils.ts +0 -15
- package/src/plus/git-github/api/types.ts +0 -197
- package/src/plus/git-github/context.ts +0 -107
- package/src/plus/git-github/models.ts +0 -623
- package/src/plus/git-github/providers/github/blame.ts +0 -225
- package/src/plus/git-github/providers/github/branches.ts +0 -401
- package/src/plus/git-github/providers/github/commits.ts +0 -929
- package/src/plus/git-github/providers/github/config.ts +0 -47
- package/src/plus/git-github/providers/github/contributors.ts +0 -313
- package/src/plus/git-github/providers/github/diff.ts +0 -281
- package/src/plus/git-github/providers/github/graph.ts +0 -635
- package/src/plus/git-github/providers/github/refs.ts +0 -172
- package/src/plus/git-github/providers/github/remotes.ts +0 -44
- package/src/plus/git-github/providers/github/revision.ts +0 -140
- package/src/plus/git-github/providers/github/status.ts +0 -69
- package/src/plus/git-github/providers/github/tags.ts +0 -148
- package/src/plus/git-github/providers/githubGitProvider.ts +0 -168
- package/src/plus/git-github/providers/githubProvider.ts +0 -65
- package/src/plus/integrations/authentication/cloudIntegrationService.ts +0 -292
- package/src/plus/integrations/authentication/configuredIntegrationService.ts +0 -656
- package/src/plus/integrations/authentication/integrationAuthenticationProvider.ts +0 -385
- package/src/plus/integrations/authentication/integrationAuthenticationService.ts +0 -148
- package/src/plus/integrations/authentication/manualTokenProvider.ts +0 -79
- package/src/plus/integrations/authentication/models.ts +0 -202
- package/src/plus/integrations/authentication/rejectedTokenTracker.ts +0 -56
- package/src/plus/integrations/collectionMetadata.ts +0 -325
- package/src/plus/integrations/constants.ts +0 -190
- package/src/plus/integrations/context.ts +0 -386
- package/src/plus/integrations/errors.ts +0 -188
- package/src/plus/integrations/index.ts +0 -231
- package/src/plus/integrations/integrationService.ts +0 -2003
- package/src/plus/integrations/lite.ts +0 -233
- package/src/plus/integrations/manager.ts +0 -728
- package/src/plus/integrations/models/gitHostIntegration.ts +0 -1862
- package/src/plus/integrations/models/integration.ts +0 -1005
- package/src/plus/integrations/models/issueCache.ts +0 -29
- package/src/plus/integrations/models/issueReads.ts +0 -152
- package/src/plus/integrations/models/issuesIntegration.ts +0 -248
- package/src/plus/integrations/models/pullRequestReads.ts +0 -18
- package/src/plus/integrations/providerFilters.ts +0 -36
- package/src/plus/integrations/providers/accounts.ts +0 -38
- package/src/plus/integrations/providers/apiClients.ts +0 -69
- package/src/plus/integrations/providers/apiConfig.ts +0 -71
- package/src/plus/integrations/providers/azure/azure.ts +0 -953
- package/src/plus/integrations/providers/azure/models.ts +0 -723
- package/src/plus/integrations/providers/azureDevOps.ts +0 -1355
- package/src/plus/integrations/providers/bitbucket/bitbucket.ts +0 -904
- package/src/plus/integrations/providers/bitbucket/models.ts +0 -446
- package/src/plus/integrations/providers/bitbucket-server/models.ts +0 -283
- package/src/plus/integrations/providers/bitbucket-server.ts +0 -445
- package/src/plus/integrations/providers/bitbucket.ts +0 -793
- package/src/plus/integrations/providers/github/github.ts +0 -64
- package/src/plus/integrations/providers/github/github.utils.ts +0 -23
- package/src/plus/integrations/providers/github/models.ts +0 -29
- package/src/plus/integrations/providers/github.ts +0 -940
- package/src/plus/integrations/providers/gitlab/gitlab.ts +0 -1320
- package/src/plus/integrations/providers/gitlab/gitlab.utils.ts +0 -80
- package/src/plus/integrations/providers/gitlab/models.ts +0 -271
- package/src/plus/integrations/providers/gitlab.ts +0 -841
- package/src/plus/integrations/providers/issueSorts.ts +0 -89
- package/src/plus/integrations/providers/jira.ts +0 -596
- package/src/plus/integrations/providers/jiraIssueByKey.ts +0 -155
- package/src/plus/integrations/providers/linear.ts +0 -484
- package/src/plus/integrations/providers/models.ts +0 -1833
- package/src/plus/integrations/providers/providerErrors.ts +0 -115
- package/src/plus/integrations/providers/providersApi.ts +0 -1881
- package/src/plus/integrations/providers/pullRequestReviews.ts +0 -122
- package/src/plus/integrations/providers/trello.ts +0 -208
- package/src/plus/integrations/providers/utils/providerPaging.ts +0 -212
- package/src/plus/integrations/providers/utils.ts +0 -419
- package/src/plus/integrations/reads/broaden.ts +0 -704
- package/src/plus/integrations/reads/context.ts +0 -99
- package/src/plus/integrations/reads/counts.ts +0 -610
- package/src/plus/integrations/reads/cursors.ts +0 -224
- package/src/plus/integrations/reads/drains.ts +0 -420
- package/src/plus/integrations/reads/filters.ts +0 -614
- package/src/plus/integrations/reads/hierarchy.ts +0 -486
- package/src/plus/integrations/reads/hierarchy.utils.ts +0 -155
- package/src/plus/integrations/reads/issueBatch.ts +0 -197
- package/src/plus/integrations/reads/issueTracker.ts +0 -556
- package/src/plus/integrations/reads/issues.ts +0 -600
- package/src/plus/integrations/reads/ordering.ts +0 -124
- package/src/plus/integrations/reads/paging.ts +0 -379
- package/src/plus/integrations/reads/pullRequests.ts +0 -260
- package/src/plus/integrations/reads/resolveRepository.ts +0 -275
- package/src/plus/integrations/reads/searchIssues.ts +0 -274
- package/src/plus/integrations/reads/searchPullRequests.ts +0 -235
- package/src/plus/integrations/reads/sweeps.ts +0 -266
- package/src/plus/integrations/reads/trackerIssue.ts +0 -105
- package/src/plus/integrations/reads/warnings.ts +0 -535
- package/src/plus/integrations/results.ts +0 -443
- package/src/plus/integrations/telemetry.ts +0 -29
- package/src/plus/integrations/utils/domain.utils.ts +0 -26
- package/src/plus/integrations/utils/integration.utils.ts +0 -215
- package/src/utils/array.ts +0 -194
- package/src/utils/base64.ts +0 -1
- package/src/utils/brand.ts +0 -7
- package/src/utils/cancellation.ts +0 -199
- package/src/utils/charCode.ts +0 -38
- package/src/utils/coalescedRun.ts +0 -45
- package/src/utils/color.ts +0 -817
- package/src/utils/counter.ts +0 -21
- package/src/utils/crypto.ts +0 -1
- package/src/utils/date.ts +0 -474
- package/src/utils/debounce.ts +0 -303
- package/src/utils/decorators/debounce.ts +0 -31
- package/src/utils/decorators/gate.ts +0 -167
- package/src/utils/decorators/log.ts +0 -320
- package/src/utils/decorators/memoize.ts +0 -98
- package/src/utils/decorators/resolver.ts +0 -95
- package/src/utils/decorators/sequentialize.ts +0 -118
- package/src/utils/decorators/serializable.ts +0 -43
- package/src/utils/dedupedAsyncCache.ts +0 -74
- package/src/utils/diff.ts +0 -61
- package/src/utils/disposable.ts +0 -156
- package/src/utils/encoding.ts +0 -8
- package/src/utils/env/browser/base64.ts +0 -50
- package/src/utils/env/browser/crypto.ts +0 -21
- package/src/utils/env/browser/fs.ts +0 -3
- package/src/utils/env/browser/hex.ts +0 -41
- package/src/utils/env/browser/hrtime.ts +0 -14
- package/src/utils/env/browser/logScope.ts +0 -57
- package/src/utils/env/browser/md5.ts +0 -217
- package/src/utils/env/browser/platform.ts +0 -10
- package/src/utils/env/node/base64.ts +0 -19
- package/src/utils/env/node/crypto.ts +0 -17
- package/src/utils/env/node/exec.ts +0 -488
- package/src/utils/env/node/fs.ts +0 -5
- package/src/utils/env/node/hex.ts +0 -11
- package/src/utils/env/node/hrtime.ts +0 -1
- package/src/utils/env/node/logScope.ts +0 -63
- package/src/utils/env/node/platform.ts +0 -5
- package/src/utils/error.ts +0 -18
- package/src/utils/event.ts +0 -230
- package/src/utils/formatter.ts +0 -198
- package/src/utils/fs.ts +0 -1
- package/src/utils/function.ts +0 -141
- package/src/utils/fuzzy.ts +0 -185
- package/src/utils/hash.ts +0 -60
- package/src/utils/hex.ts +0 -1
- package/src/utils/hrtime.ts +0 -8
- package/src/utils/iterable.ts +0 -797
- package/src/utils/keys/chord.ts +0 -184
- package/src/utils/keys/keybinding.ts +0 -116
- package/src/utils/lazy.ts +0 -39
- package/src/utils/loggable.ts +0 -7
- package/src/utils/logger.scoped.ts +0 -237
- package/src/utils/logger.ts +0 -403
- package/src/utils/lruMap.ts +0 -112
- package/src/utils/markdown.ts +0 -115
- package/src/utils/mru.ts +0 -68
- package/src/utils/object.ts +0 -278
- package/src/utils/paging.ts +0 -97
- package/src/utils/path.ts +0 -204
- package/src/utils/platform.ts +0 -1
- package/src/utils/promise.ts +0 -657
- package/src/utils/promiseCache.ts +0 -908
- package/src/utils/resourceUsage.ts +0 -5
- package/src/utils/searchTree.ts +0 -444
- package/src/utils/stopwatch.ts +0 -125
- package/src/utils/string.ts +0 -1003
- package/src/utils/subscriptionManager.ts +0 -40
- package/src/utils/trie.ts +0 -740
- package/src/utils/types.ts +0 -31
- package/src/utils/uri.ts +0 -118
- package/src/utils/validation.ts +0 -38
- package/src/utils/version.ts +0 -128
|
@@ -1,1931 +0,0 @@
|
|
|
1
|
-
import type { Cache, ConflictDetectionCacheKey, GkConfigInvalidationTarget } from '../../git/cache.js';
|
|
2
|
-
import type { GitServiceContext } from '../../git/context.js';
|
|
3
|
-
import { BranchError } from '../../git/errors.js';
|
|
4
|
-
import type { BranchDisposition, BranchMetadata } from '../../git/models/branch.js';
|
|
5
|
-
import { GitBranch } from '../../git/models/branch.js';
|
|
6
|
-
import type { ConflictDetectionErrorReason, ConflictDetectionResult } from '../../git/models/mergeConflicts.js';
|
|
7
|
-
import type { GitBranchReference } from '../../git/models/reference.js';
|
|
8
|
-
import type {
|
|
9
|
-
BranchContributionsOverview,
|
|
10
|
-
GitBranchesSubProvider,
|
|
11
|
-
GitBranchMergedStatus,
|
|
12
|
-
} from '../../git/providers/branches.js';
|
|
13
|
-
import type { GitCommandPriority } from '../../git/run.types.js';
|
|
14
|
-
import {
|
|
15
|
-
formatDetachedHeadName,
|
|
16
|
-
getBranchId,
|
|
17
|
-
getLocalBranchByUpstream,
|
|
18
|
-
isDetachedHead,
|
|
19
|
-
isRemoteHEAD,
|
|
20
|
-
parseRefName,
|
|
21
|
-
parseUpstream,
|
|
22
|
-
} from '../../git/utils/branch.utils.js';
|
|
23
|
-
import { createConflictDetectionError } from '../../git/utils/mergeConflicts.utils.js';
|
|
24
|
-
import { createReference } from '../../git/utils/reference.utils.js';
|
|
25
|
-
import { createRevisionRange, shortenRevision } from '../../git/utils/revision.utils.js';
|
|
26
|
-
import type { BranchSortOptions } from '../../git/utils/sorting.js';
|
|
27
|
-
import { sortBranches, sortContributors } from '../../git/utils/sorting.js';
|
|
28
|
-
import { ensureArray, filterMap } from '../../utils/array.js';
|
|
29
|
-
import { CancellationError, isCancellationError } from '../../utils/cancellation.js';
|
|
30
|
-
import { debounce } from '../../utils/decorators/debounce.js';
|
|
31
|
-
import { debug } from '../../utils/decorators/log.js';
|
|
32
|
-
import { Logger } from '../../utils/logger.js';
|
|
33
|
-
import { getScopedLogger } from '../../utils/logger.scoped.js';
|
|
34
|
-
import type { PagedResult, PagingOptions } from '../../utils/paging.js';
|
|
35
|
-
import { emptyPagedResult, PageableResult } from '../../utils/paging.js';
|
|
36
|
-
import { normalizePath } from '../../utils/path.js';
|
|
37
|
-
import { getSettledValue } from '../../utils/promise.js';
|
|
38
|
-
import type { CacheController } from '../../utils/promiseCache.js';
|
|
39
|
-
import { maybeStopWatch } from '../../utils/stopwatch.js';
|
|
40
|
-
import type { CliGitProviderInternal } from '../cliGitProvider.js';
|
|
41
|
-
import type { GitResult } from '../exec/exec.types.js';
|
|
42
|
-
import type { Git } from '../exec/git.js';
|
|
43
|
-
import { getGitCommandError, gitConfigsBranch, gitConfigsLog, GitError, GitErrors, GitWarnings } from '../exec/git.js';
|
|
44
|
-
import type { GitMergeConflict } from '../parsers/mergeTreeParser.js';
|
|
45
|
-
import { parseMergeTreeConflict } from '../parsers/mergeTreeParser.js';
|
|
46
|
-
|
|
47
|
-
/** Minimum time between writes to the config for last accessed/modified dates */
|
|
48
|
-
const dateMetadataStaleThresholdMs = 5 * 60 * 1000; // 5 minutes
|
|
49
|
-
|
|
50
|
-
export class BranchesGitSubProvider implements GitBranchesSubProvider {
|
|
51
|
-
constructor(
|
|
52
|
-
private readonly context: GitServiceContext,
|
|
53
|
-
private readonly git: Git,
|
|
54
|
-
private readonly cache: Cache,
|
|
55
|
-
private readonly provider: CliGitProviderInternal,
|
|
56
|
-
) {}
|
|
57
|
-
|
|
58
|
-
@debug()
|
|
59
|
-
async getBranch(repoPath: string, name?: string, cancellation?: AbortSignal): Promise<GitBranch | undefined> {
|
|
60
|
-
if (name != null) {
|
|
61
|
-
const {
|
|
62
|
-
values: [branch],
|
|
63
|
-
} = await this.getBranches(repoPath, { filter: b => b.name === name }, cancellation);
|
|
64
|
-
return branch;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
const branchPromise = this.cache.branch.getOrCreate(
|
|
68
|
-
repoPath,
|
|
69
|
-
async (_cacheable, signal) => {
|
|
70
|
-
const {
|
|
71
|
-
values: [branch],
|
|
72
|
-
} = await this.getBranches(repoPath, { filter: b => b.current }, signal);
|
|
73
|
-
return branch ?? this.getCurrentBranch(repoPath, undefined, undefined, signal);
|
|
74
|
-
},
|
|
75
|
-
cancellation,
|
|
76
|
-
);
|
|
77
|
-
|
|
78
|
-
if (branchPromise == null) {
|
|
79
|
-
const {
|
|
80
|
-
values: [branch],
|
|
81
|
-
} = await this.getBranches(repoPath, { filter: b => b.current }, cancellation);
|
|
82
|
-
return branch ?? this.getCurrentBranch(repoPath, undefined, undefined, cancellation);
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
return branchPromise;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
private async getCurrentBranch(
|
|
89
|
-
repoPath: string,
|
|
90
|
-
metadataMap: Map<string, BranchMetadata> | undefined,
|
|
91
|
-
ordering: string | undefined,
|
|
92
|
-
cancellation?: AbortSignal,
|
|
93
|
-
): Promise<GitBranch | undefined> {
|
|
94
|
-
const ref = await this.getCurrentBranchReferenceCore(repoPath, ordering, cancellation);
|
|
95
|
-
if (ref == null) return undefined;
|
|
96
|
-
|
|
97
|
-
const [pausedOpStatusResult, committerDateResult, defaultWorktreePathResult, metadataMapResult] =
|
|
98
|
-
await Promise.allSettled([
|
|
99
|
-
isDetachedHead(ref.name)
|
|
100
|
-
? this.provider.pausedOps?.getPausedOperationStatus(repoPath, undefined, cancellation)
|
|
101
|
-
: undefined,
|
|
102
|
-
this.git
|
|
103
|
-
.run(
|
|
104
|
-
{
|
|
105
|
-
cwd: repoPath,
|
|
106
|
-
cancellation: cancellation,
|
|
107
|
-
configs: gitConfigsLog,
|
|
108
|
-
errors: 'ignore',
|
|
109
|
-
},
|
|
110
|
-
'log',
|
|
111
|
-
'-n1',
|
|
112
|
-
'--format=%ct',
|
|
113
|
-
ordering ? `--${ordering}-order` : undefined,
|
|
114
|
-
'--',
|
|
115
|
-
)
|
|
116
|
-
.then(result => (result.stdout ? result.stdout.trim() : undefined)),
|
|
117
|
-
this.provider.config.getDefaultWorktreePath?.(repoPath),
|
|
118
|
-
metadataMap != null ? Promise.resolve(metadataMap) : this.getBranchMetadataMap(repoPath),
|
|
119
|
-
]);
|
|
120
|
-
|
|
121
|
-
const committerDate = getSettledValue(committerDateResult);
|
|
122
|
-
const pausedOpStatus = getSettledValue(pausedOpStatusResult);
|
|
123
|
-
const rebaseStatus = pausedOpStatus?.type === 'rebase' ? pausedOpStatus : undefined;
|
|
124
|
-
const defaultWorktreePath = getSettledValue(defaultWorktreePathResult);
|
|
125
|
-
metadataMap ??= getSettledValue(metadataMapResult);
|
|
126
|
-
const metadata = metadataMap?.get(ref.name);
|
|
127
|
-
|
|
128
|
-
if (cancellation?.aborted) throw new CancellationError();
|
|
129
|
-
|
|
130
|
-
const branchRefName = rebaseStatus?.incoming.name ?? `refs/heads/${ref.name}`;
|
|
131
|
-
|
|
132
|
-
const branch = new GitBranch(
|
|
133
|
-
repoPath, // Use worktree-specific path for consistent IDs within each worktree
|
|
134
|
-
branchRefName,
|
|
135
|
-
true,
|
|
136
|
-
committerDate != null ? new Date(Number(committerDate) * 1000) : undefined,
|
|
137
|
-
metadata,
|
|
138
|
-
ref.sha,
|
|
139
|
-
ref.upstream ? { ...ref.upstream, state: { ahead: 0, behind: 0 } } : undefined,
|
|
140
|
-
{ path: repoPath, isDefault: repoPath === defaultWorktreePath },
|
|
141
|
-
undefined,
|
|
142
|
-
rebaseStatus != null,
|
|
143
|
-
);
|
|
144
|
-
|
|
145
|
-
return branch;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
@debug({ args: repoPath => ({ repoPath: repoPath }) })
|
|
149
|
-
async getBranches(
|
|
150
|
-
repoPath: string,
|
|
151
|
-
options?: {
|
|
152
|
-
filter?: (b: GitBranch) => boolean;
|
|
153
|
-
ordering?: 'date' | 'author-date' | 'topo' | null;
|
|
154
|
-
paging?: PagingOptions;
|
|
155
|
-
sort?: boolean | BranchSortOptions;
|
|
156
|
-
},
|
|
157
|
-
cancellation?: AbortSignal,
|
|
158
|
-
): Promise<PagedResult<GitBranch>> {
|
|
159
|
-
if (repoPath == null) return emptyPagedResult;
|
|
160
|
-
|
|
161
|
-
const scope = getScopedLogger();
|
|
162
|
-
|
|
163
|
-
const getCore = async (
|
|
164
|
-
commonPath: string,
|
|
165
|
-
cacheable?: CacheController,
|
|
166
|
-
signal?: AbortSignal,
|
|
167
|
-
): Promise<PagedResult<GitBranch>> => {
|
|
168
|
-
// Prefer the aggregate signal from the cache when present; fall back to the caller's
|
|
169
|
-
// own cancellation when bypassing the cache (e.g. paging-cursor path).
|
|
170
|
-
signal ??= cancellation;
|
|
171
|
-
try {
|
|
172
|
-
const [recordsResult, supportedResult, defaultWorktreePathResult, metadataMapResult] =
|
|
173
|
-
await Promise.allSettled([
|
|
174
|
-
this.provider.refs.getRefs(commonPath, signal),
|
|
175
|
-
this.git.supported('git:for-each-ref'),
|
|
176
|
-
this.provider.config.getDefaultWorktreePath?.(commonPath),
|
|
177
|
-
this.getBranchMetadataMap(commonPath),
|
|
178
|
-
]);
|
|
179
|
-
|
|
180
|
-
const records = getSettledValue(recordsResult) ?? [];
|
|
181
|
-
const supported = getSettledValue(supportedResult) ?? [];
|
|
182
|
-
const metadataMap = getSettledValue(metadataMapResult) ?? new Map<string, BranchMetadata>();
|
|
183
|
-
const defaultWorktreePath = getSettledValue(defaultWorktreePathResult);
|
|
184
|
-
const worktreePathSupported = supported.includes('git:for-each-ref:worktreePath');
|
|
185
|
-
|
|
186
|
-
// If we don't get any data, assume the repo doesn't have any commits yet so check if we have a current branch
|
|
187
|
-
if (!records.length) {
|
|
188
|
-
// Never CACHE that conclusion. `getRefs` reports a failed enumeration the same way as a
|
|
189
|
-
// genuinely ref-less repo — an empty array (it invalidates its own entry but doesn't
|
|
190
|
-
// throw) — so a transient `for-each-ref` failure would otherwise pin this degraded
|
|
191
|
-
// current-branch-only list in a map with no TTL, and every branch consumer would see a
|
|
192
|
-
// one-branch repo for the session. A truly empty repo re-reads cheaply, so refusing the
|
|
193
|
-
// entry costs nothing in the case this is actually meant to serve.
|
|
194
|
-
cacheable?.invalidate();
|
|
195
|
-
|
|
196
|
-
const current = await this.getCurrentBranch(
|
|
197
|
-
commonPath,
|
|
198
|
-
metadataMap,
|
|
199
|
-
options?.ordering ?? this.context.config?.commits.ordering ?? undefined,
|
|
200
|
-
signal,
|
|
201
|
-
);
|
|
202
|
-
return current != null ? { values: [current] } : emptyPagedResult;
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
using sw = maybeStopWatch(scope, { log: { onlyExit: true, level: 'debug' } });
|
|
206
|
-
|
|
207
|
-
const branches: GitBranch[] = [];
|
|
208
|
-
|
|
209
|
-
for (const record of records) {
|
|
210
|
-
const fullName = record.name;
|
|
211
|
-
// Filter to branches and remote-tracking branches; skip tags from the unified records.
|
|
212
|
-
if (!fullName.startsWith('refs/heads/') && !fullName.startsWith('refs/remotes/')) continue;
|
|
213
|
-
// Skip HEAD refs in remote branches
|
|
214
|
-
if (isRemoteHEAD(fullName)) continue;
|
|
215
|
-
|
|
216
|
-
const upstream = parseUpstream(record.upstream, record.upstreamTracking);
|
|
217
|
-
|
|
218
|
-
const metadata = metadataMap.get(parseRefName(fullName).name);
|
|
219
|
-
const worktreePath = record.worktreePath ? normalizePath(record.worktreePath) : undefined;
|
|
220
|
-
|
|
221
|
-
branches.push(
|
|
222
|
-
new GitBranch(
|
|
223
|
-
commonPath,
|
|
224
|
-
fullName,
|
|
225
|
-
false, // Don't trust %(HEAD) for current as it's per-worktree -- we will set it later
|
|
226
|
-
record.committerDate ? new Date(record.committerDate) : undefined,
|
|
227
|
-
metadata,
|
|
228
|
-
record.objectname,
|
|
229
|
-
upstream,
|
|
230
|
-
worktreePathSupported
|
|
231
|
-
? worktreePath
|
|
232
|
-
? { path: worktreePath, isDefault: worktreePath === defaultWorktreePath }
|
|
233
|
-
: false
|
|
234
|
-
: undefined,
|
|
235
|
-
),
|
|
236
|
-
);
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
sw?.stop({ suffix: ` parsed ${branches.length} branches` });
|
|
240
|
-
|
|
241
|
-
// Pre-populate current branch cache for worktrees based on worktreePath info
|
|
242
|
-
// This eliminates the need for rev-parse calls during branch reconstruction
|
|
243
|
-
for (const branch of branches) {
|
|
244
|
-
// oxlint-disable-next-line typescript/prefer-optional-chain
|
|
245
|
-
if (branch.worktree && branch.worktree.path) {
|
|
246
|
-
const { name } = parseRefName(branch.refName);
|
|
247
|
-
const reference = createReference(name, branch.worktree.path, {
|
|
248
|
-
refType: 'branch',
|
|
249
|
-
name: name,
|
|
250
|
-
id: getBranchId(branch.worktree.path, false, name),
|
|
251
|
-
remote: false,
|
|
252
|
-
upstream: branch.upstream?.name
|
|
253
|
-
? { name: branch.upstream.name, missing: branch.upstream.missing }
|
|
254
|
-
: undefined,
|
|
255
|
-
sha: branch.sha,
|
|
256
|
-
});
|
|
257
|
-
this.cache.setCurrentBranchReferenceIfAbsent(branch.worktree.path, reference);
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
return branches.length ? { values: branches } : emptyPagedResult;
|
|
262
|
-
} catch (ex) {
|
|
263
|
-
// Signal cache invalidation so the shared cache entry is cleaned up
|
|
264
|
-
cacheable?.invalidate();
|
|
265
|
-
if (isCancellationError(ex)) throw ex;
|
|
266
|
-
|
|
267
|
-
return emptyPagedResult;
|
|
268
|
-
}
|
|
269
|
-
};
|
|
270
|
-
|
|
271
|
-
// Mapper function that adjusts branches for a specific worktree
|
|
272
|
-
const mapBranches = async (
|
|
273
|
-
shared: PagedResult<GitBranch>,
|
|
274
|
-
targetRepoPath: string,
|
|
275
|
-
commonPath: string,
|
|
276
|
-
mapperSignal?: AbortSignal,
|
|
277
|
-
): Promise<PagedResult<GitBranch>> => {
|
|
278
|
-
if (!shared.values.length) return shared;
|
|
279
|
-
|
|
280
|
-
// Prefer the mapper's per-entry aggregate signal when present; fall back to the
|
|
281
|
-
// caller's own cancellation when bypassing the cache (paging-cursor path).
|
|
282
|
-
mapperSignal ??= cancellation;
|
|
283
|
-
|
|
284
|
-
// Get current branch info and default worktree path for the target worktree
|
|
285
|
-
const [currentRefResult, defaultWorktreePathResult] = await Promise.allSettled([
|
|
286
|
-
this.getCurrentBranchReferenceCore(targetRepoPath, undefined, mapperSignal),
|
|
287
|
-
this.provider.config.getDefaultWorktreePath?.(commonPath),
|
|
288
|
-
]);
|
|
289
|
-
const currentRef = getSettledValue(currentRefResult);
|
|
290
|
-
const defaultWorktreePath = getSettledValue(defaultWorktreePathResult);
|
|
291
|
-
const isDetached = currentRef != null && isDetachedHead(currentRef.name);
|
|
292
|
-
|
|
293
|
-
// Clone branches with correct repoPath and current flag
|
|
294
|
-
const branches: GitBranch[] = shared.values.map(b => {
|
|
295
|
-
// Check if this branch is current in the target worktree
|
|
296
|
-
const isCurrent = !b.remote && b.name === currentRef?.name && !isDetached;
|
|
297
|
-
|
|
298
|
-
// Only create new object if something changed
|
|
299
|
-
if (!isCurrent && targetRepoPath === commonPath) return b;
|
|
300
|
-
|
|
301
|
-
return new GitBranch(
|
|
302
|
-
targetRepoPath, // Use target worktree path
|
|
303
|
-
b.refName,
|
|
304
|
-
isCurrent,
|
|
305
|
-
b.date,
|
|
306
|
-
b.metadata,
|
|
307
|
-
b.sha,
|
|
308
|
-
b.upstream,
|
|
309
|
-
// For current branch, ensure worktree is set (fallback when git doesn't support worktreePath)
|
|
310
|
-
isCurrent
|
|
311
|
-
? (b.worktree ?? { path: targetRepoPath, isDefault: targetRepoPath === defaultWorktreePath })
|
|
312
|
-
: b.worktree,
|
|
313
|
-
false, // detached - only true for detached HEAD branch itself
|
|
314
|
-
false, // rebasing - only true for detached HEAD branch in rebase
|
|
315
|
-
);
|
|
316
|
-
});
|
|
317
|
-
|
|
318
|
-
// Handle detached HEAD - need to create a special branch for it
|
|
319
|
-
if (isDetached || (currentRef != null && !branches.some(b => b.current))) {
|
|
320
|
-
const metadataMap = await this.getBranchMetadataMap(commonPath);
|
|
321
|
-
const current = await this.getCurrentBranch(
|
|
322
|
-
targetRepoPath,
|
|
323
|
-
metadataMap,
|
|
324
|
-
options?.ordering ?? this.context.config?.commits.ordering ?? undefined,
|
|
325
|
-
mapperSignal,
|
|
326
|
-
);
|
|
327
|
-
if (current != null) {
|
|
328
|
-
// Replace if exists (by id), otherwise prepend
|
|
329
|
-
const index = branches.findIndex(b => b.id === current.id);
|
|
330
|
-
if (index !== -1) {
|
|
331
|
-
branches[index] = current;
|
|
332
|
-
} else {
|
|
333
|
-
branches.unshift(current);
|
|
334
|
-
}
|
|
335
|
-
}
|
|
336
|
-
}
|
|
337
|
-
|
|
338
|
-
return { ...shared, values: branches };
|
|
339
|
-
};
|
|
340
|
-
|
|
341
|
-
let result: PagedResult<GitBranch>;
|
|
342
|
-
|
|
343
|
-
// Use paging cursor to bypass cache if paginating
|
|
344
|
-
if (options?.paging?.cursor != null) {
|
|
345
|
-
const commonPath = this.cache.getCommonPath(repoPath);
|
|
346
|
-
const shared = await getCore(commonPath);
|
|
347
|
-
// Still apply the mapper to ensure correct repoPath and current flag for the requesting worktree
|
|
348
|
-
result = await mapBranches(shared, repoPath, commonPath);
|
|
349
|
-
} else {
|
|
350
|
-
result = await this.cache.getBranches(repoPath, getCore, mapBranches, cancellation);
|
|
351
|
-
}
|
|
352
|
-
|
|
353
|
-
if (options?.filter != null) {
|
|
354
|
-
result = {
|
|
355
|
-
...result,
|
|
356
|
-
values: result.values.filter(options.filter),
|
|
357
|
-
};
|
|
358
|
-
}
|
|
359
|
-
|
|
360
|
-
if (options?.sort) {
|
|
361
|
-
sortBranches(result.values, typeof options.sort === 'boolean' ? undefined : options.sort);
|
|
362
|
-
}
|
|
363
|
-
|
|
364
|
-
return result;
|
|
365
|
-
}
|
|
366
|
-
|
|
367
|
-
@debug()
|
|
368
|
-
async getBranchContributionsOverview(
|
|
369
|
-
repoPath: string,
|
|
370
|
-
ref: string,
|
|
371
|
-
options?: {
|
|
372
|
-
associatedPullRequest?: Promise<
|
|
373
|
-
{ refs?: { base?: { branch: string } }; stack?: { position: number } } | undefined
|
|
374
|
-
>;
|
|
375
|
-
priority?: GitCommandPriority;
|
|
376
|
-
},
|
|
377
|
-
cancellation?: AbortSignal,
|
|
378
|
-
): Promise<BranchContributionsOverview | undefined> {
|
|
379
|
-
const scope = getScopedLogger();
|
|
380
|
-
const priority = options?.priority;
|
|
381
|
-
const priorityOpts = priority != null ? { priority: priority } : undefined;
|
|
382
|
-
|
|
383
|
-
// Expensive body — runs only on cache miss. Closes over `mergeTarget` so the cache key
|
|
384
|
-
// (`${ref}|${mergeTarget}`) fully captures every input that affects the result.
|
|
385
|
-
const fetchBody = async (
|
|
386
|
-
mergeTarget: string,
|
|
387
|
-
signal: AbortSignal | undefined,
|
|
388
|
-
): Promise<BranchContributionsOverview | undefined> => {
|
|
389
|
-
const mergeBase = await this.provider.refs.getMergeBase(repoPath, ref, mergeTarget, priorityOpts, signal);
|
|
390
|
-
if (mergeBase == null) return undefined;
|
|
391
|
-
|
|
392
|
-
// Fetch the merge-base commit's dates in parallel with contributors so consumers
|
|
393
|
-
// (e.g. the graph minimap scope window) don't pay a separate round-trip for them.
|
|
394
|
-
// `allSettled` so a transient failure in one side doesn't drop the overview entirely.
|
|
395
|
-
const [contributorsSettled, mergeBaseDatesSettled] = await Promise.allSettled([
|
|
396
|
-
this.provider.contributors.getContributors(
|
|
397
|
-
repoPath,
|
|
398
|
-
createRevisionRange(mergeBase, ref, '..'),
|
|
399
|
-
{ stats: true },
|
|
400
|
-
signal,
|
|
401
|
-
),
|
|
402
|
-
this.provider.commits.getCommitDates(repoPath, mergeBase, signal),
|
|
403
|
-
]);
|
|
404
|
-
|
|
405
|
-
if (signal?.aborted) throw new CancellationError();
|
|
406
|
-
|
|
407
|
-
const result = getSettledValue(contributorsSettled) ?? { contributors: [] };
|
|
408
|
-
const mergeBaseDates = getSettledValue(mergeBaseDatesSettled);
|
|
409
|
-
|
|
410
|
-
sortContributors(result.contributors, { orderBy: 'score:desc' });
|
|
411
|
-
|
|
412
|
-
let totalCommits = 0;
|
|
413
|
-
let totalFiles = 0;
|
|
414
|
-
let totalAdditions = 0;
|
|
415
|
-
let totalDeletions = 0;
|
|
416
|
-
let firstCommitTimestamp;
|
|
417
|
-
let latestCommitTimestamp;
|
|
418
|
-
|
|
419
|
-
for (const c of result.contributors) {
|
|
420
|
-
totalCommits += c.contributionCount;
|
|
421
|
-
totalFiles += c.stats?.files ?? 0;
|
|
422
|
-
totalAdditions += c.stats?.additions ?? 0;
|
|
423
|
-
totalDeletions += c.stats?.deletions ?? 0;
|
|
424
|
-
|
|
425
|
-
const firstTimestamp = c.firstCommitDate?.getTime();
|
|
426
|
-
const latestTimestamp = c.latestCommitDate?.getTime();
|
|
427
|
-
|
|
428
|
-
if (firstTimestamp != null || latestTimestamp != null) {
|
|
429
|
-
firstCommitTimestamp =
|
|
430
|
-
firstCommitTimestamp != null
|
|
431
|
-
? Math.min(firstCommitTimestamp, firstTimestamp ?? Infinity, latestTimestamp ?? Infinity)
|
|
432
|
-
: (firstTimestamp ?? latestTimestamp);
|
|
433
|
-
|
|
434
|
-
latestCommitTimestamp =
|
|
435
|
-
latestCommitTimestamp != null
|
|
436
|
-
? Math.max(latestCommitTimestamp, firstTimestamp ?? -Infinity, latestTimestamp ?? -Infinity)
|
|
437
|
-
: (latestTimestamp ?? firstTimestamp);
|
|
438
|
-
}
|
|
439
|
-
}
|
|
440
|
-
|
|
441
|
-
return {
|
|
442
|
-
repoPath: repoPath,
|
|
443
|
-
branch: ref,
|
|
444
|
-
mergeTarget: mergeTarget,
|
|
445
|
-
mergeBase: mergeBase,
|
|
446
|
-
mergeBaseDate: mergeBaseDates?.committerDate,
|
|
447
|
-
|
|
448
|
-
commits: totalCommits,
|
|
449
|
-
files: totalFiles,
|
|
450
|
-
additions: totalAdditions,
|
|
451
|
-
deletions: totalDeletions,
|
|
452
|
-
|
|
453
|
-
latestCommitDate: latestCommitTimestamp != null ? new Date(latestCommitTimestamp) : undefined,
|
|
454
|
-
firstCommitDate: firstCommitTimestamp != null ? new Date(firstCommitTimestamp) : undefined,
|
|
455
|
-
|
|
456
|
-
contributors: result.contributors,
|
|
457
|
-
};
|
|
458
|
-
};
|
|
459
|
-
|
|
460
|
-
try {
|
|
461
|
-
// Resolve `mergeTarget` through Tier 1 → Tier 2 → Tier 3. The pieces of each tier are
|
|
462
|
-
// already individually cached (`getStoredMergeTargetBranchName`, `getBaseBranchName`,
|
|
463
|
-
// `getDefaultBranchName`), so this resolution path is cheap on warm caches. Only the
|
|
464
|
-
// expensive body below (`getMergeBase` + `getContributors` w/ stats + `getCommitDates`)
|
|
465
|
-
// is wrapped by `cache.getBranchOverview`, keyed on the resolved `mergeTarget` so any
|
|
466
|
-
// caller that resolves to the same target shares; differing targets get independent
|
|
467
|
-
// slots, which is the correctness constraint that previously forced the Tier 2/3 paths
|
|
468
|
-
// to bypass the cache entirely.
|
|
469
|
-
let mergeTarget: string | undefined;
|
|
470
|
-
|
|
471
|
-
// Tier 1: Stored merge target (user-set or previously detected from PR).
|
|
472
|
-
const storedTarget = await this.getStoredMergeTargetBranchName(repoPath, ref);
|
|
473
|
-
if (storedTarget) {
|
|
474
|
-
const validated = await this.provider.refs.getSymbolicReferenceName(
|
|
475
|
-
repoPath,
|
|
476
|
-
storedTarget,
|
|
477
|
-
priorityOpts,
|
|
478
|
-
cancellation,
|
|
479
|
-
);
|
|
480
|
-
mergeTarget = validated || storedTarget;
|
|
481
|
-
}
|
|
482
|
-
|
|
483
|
-
// Tier 2: PR-based lookup. The branch object is only needed here (for `remoteName`),
|
|
484
|
-
// so lazy-load it on the cold path instead of paying for it on every call.
|
|
485
|
-
if (mergeTarget == null && options?.associatedPullRequest != null) {
|
|
486
|
-
const pr = await options.associatedPullRequest;
|
|
487
|
-
if (pr?.refs?.base != null) {
|
|
488
|
-
const branch = await this.getBranch(repoPath, ref, cancellation);
|
|
489
|
-
if (branch == null) return undefined;
|
|
490
|
-
|
|
491
|
-
mergeTarget = `${branch.remoteName}/${pr.refs.base.branch}`;
|
|
492
|
-
// A stacked PR's base is the layer below it, which is deleted when the stack merges.
|
|
493
|
-
// Storing it would leave a stored target naming a branch that no longer exists — and
|
|
494
|
-
// a stored target beats every other tier, so it would keep winning until cleared by
|
|
495
|
-
// hand. Use it for this lookup, but don't persist it.
|
|
496
|
-
if (pr.stack == null) {
|
|
497
|
-
// Store for future reuse — turns the next call into a Tier 1 path. Skip the
|
|
498
|
-
// `branchOverviews` invalidation that the write would otherwise trigger: we're
|
|
499
|
-
// about to populate `${ref}|${mergeTarget}` with this exact target, so evicting
|
|
500
|
-
// it would just force the next caller to redo the body. (gk-merge-target writes
|
|
501
|
-
// do not affect `baseBranchName`, so no need to skip that target.)
|
|
502
|
-
void this.storeMergeTargetBranchName(repoPath, ref, mergeTarget, {
|
|
503
|
-
skipInvalidation: ['branchOverviews'],
|
|
504
|
-
});
|
|
505
|
-
}
|
|
506
|
-
}
|
|
507
|
-
}
|
|
508
|
-
|
|
509
|
-
// Tier 3: Base branch, then default branch.
|
|
510
|
-
mergeTarget ??= await this.getBaseBranchName(repoPath, ref, priorityOpts, cancellation);
|
|
511
|
-
mergeTarget ??= await this.getDefaultBranchName(repoPath, undefined, priorityOpts, cancellation);
|
|
512
|
-
|
|
513
|
-
if (mergeTarget == null) return undefined;
|
|
514
|
-
|
|
515
|
-
const resolvedTarget = mergeTarget;
|
|
516
|
-
return await this.cache.getBranchOverview(
|
|
517
|
-
repoPath,
|
|
518
|
-
`${ref}|${resolvedTarget}`,
|
|
519
|
-
(_commonPath, _cacheable, signal) => fetchBody(resolvedTarget, signal ?? cancellation),
|
|
520
|
-
{ cancellation: cancellation },
|
|
521
|
-
);
|
|
522
|
-
} catch (ex) {
|
|
523
|
-
scope?.error(ex);
|
|
524
|
-
if (isCancellationError(ex)) throw ex;
|
|
525
|
-
|
|
526
|
-
return undefined;
|
|
527
|
-
}
|
|
528
|
-
}
|
|
529
|
-
|
|
530
|
-
@debug()
|
|
531
|
-
async getBranchesWithCommits(
|
|
532
|
-
repoPath: string,
|
|
533
|
-
commits: string[],
|
|
534
|
-
branch?: string,
|
|
535
|
-
options?:
|
|
536
|
-
| { all?: boolean; commitDate?: Date; mode?: 'contains' | 'pointsAt' }
|
|
537
|
-
| { commitDate?: Date; mode?: 'contains' | 'pointsAt'; remotes?: boolean },
|
|
538
|
-
cancellation?: AbortSignal,
|
|
539
|
-
): Promise<string[]> {
|
|
540
|
-
if (branch != null) {
|
|
541
|
-
const result = await this.branchesContainingCore(
|
|
542
|
-
repoPath,
|
|
543
|
-
commits,
|
|
544
|
-
{ mode: 'contains', name: branch },
|
|
545
|
-
cancellation,
|
|
546
|
-
);
|
|
547
|
-
const data = result.stdout.trim();
|
|
548
|
-
return data ? [data] : [];
|
|
549
|
-
}
|
|
550
|
-
|
|
551
|
-
const result = await this.branchesContainingCore(repoPath, commits, options, cancellation);
|
|
552
|
-
if (!result.stdout) return [];
|
|
553
|
-
|
|
554
|
-
return filterMap(result.stdout.split('\n'), b => b.trim() || undefined);
|
|
555
|
-
}
|
|
556
|
-
|
|
557
|
-
private async branchesContainingCore(
|
|
558
|
-
repoPath: string,
|
|
559
|
-
refs: string[],
|
|
560
|
-
options?: {
|
|
561
|
-
all?: boolean;
|
|
562
|
-
mode?: 'contains' | 'pointsAt';
|
|
563
|
-
name?: string;
|
|
564
|
-
remotes?: boolean;
|
|
565
|
-
},
|
|
566
|
-
cancellation?: AbortSignal,
|
|
567
|
-
): Promise<GitResult> {
|
|
568
|
-
const params: string[] = ['branch'];
|
|
569
|
-
if (options?.all) {
|
|
570
|
-
params.push('-a');
|
|
571
|
-
} else if (options?.remotes) {
|
|
572
|
-
params.push('-r');
|
|
573
|
-
}
|
|
574
|
-
|
|
575
|
-
params.push('--format=%(refname:short)');
|
|
576
|
-
|
|
577
|
-
for (const ref of refs) {
|
|
578
|
-
params.push(options?.mode === 'pointsAt' ? `--points-at=${ref}` : `--contains=${ref}`);
|
|
579
|
-
}
|
|
580
|
-
|
|
581
|
-
if (options?.name != null) {
|
|
582
|
-
params.push(options.name);
|
|
583
|
-
}
|
|
584
|
-
|
|
585
|
-
return this.git.run(
|
|
586
|
-
{
|
|
587
|
-
cwd: repoPath,
|
|
588
|
-
cancellation: cancellation,
|
|
589
|
-
configs: gitConfigsBranch,
|
|
590
|
-
errors: 'ignore',
|
|
591
|
-
},
|
|
592
|
-
...params,
|
|
593
|
-
);
|
|
594
|
-
}
|
|
595
|
-
|
|
596
|
-
@debug()
|
|
597
|
-
async getCurrentBranchReference(
|
|
598
|
-
repoPath: string,
|
|
599
|
-
cancellation?: AbortSignal,
|
|
600
|
-
): Promise<GitBranchReference | undefined> {
|
|
601
|
-
let ref = await this.getCurrentBranchReferenceCore(repoPath, undefined, cancellation);
|
|
602
|
-
if (ref != null && isDetachedHead(ref.name)) {
|
|
603
|
-
ref = createReference(ref.sha!, repoPath, {
|
|
604
|
-
refType: 'branch',
|
|
605
|
-
name: formatDetachedHeadName(ref.sha!),
|
|
606
|
-
id: getBranchId(repoPath, ref.remote, ref.sha!),
|
|
607
|
-
remote: ref.remote,
|
|
608
|
-
upstream: ref.upstream,
|
|
609
|
-
sha: ref.sha,
|
|
610
|
-
});
|
|
611
|
-
}
|
|
612
|
-
return ref;
|
|
613
|
-
}
|
|
614
|
-
|
|
615
|
-
private getCurrentBranchReferenceCore(
|
|
616
|
-
repoPath: string,
|
|
617
|
-
ordering?: string,
|
|
618
|
-
cancellation?: AbortSignal,
|
|
619
|
-
): Promise<GitBranchReference | undefined> {
|
|
620
|
-
return this.cache.currentBranchReference.getOrCreate(
|
|
621
|
-
repoPath,
|
|
622
|
-
async (_cacheable, signal) => {
|
|
623
|
-
const commitOrdering = ordering;
|
|
624
|
-
|
|
625
|
-
let data: [string, string | undefined] | undefined;
|
|
626
|
-
let result;
|
|
627
|
-
try {
|
|
628
|
-
result = await this.git.run(
|
|
629
|
-
{ cwd: repoPath, cancellation: signal, errors: 'throw' },
|
|
630
|
-
'rev-parse',
|
|
631
|
-
'--abbrev-ref',
|
|
632
|
-
'--symbolic-full-name',
|
|
633
|
-
'@',
|
|
634
|
-
'@{u}',
|
|
635
|
-
'--',
|
|
636
|
-
);
|
|
637
|
-
data = [result.stdout, undefined];
|
|
638
|
-
} catch (ex) {
|
|
639
|
-
if (isCancellationError(ex)) throw ex;
|
|
640
|
-
|
|
641
|
-
const msg: string = ex?.toString() ?? '';
|
|
642
|
-
if (GitErrors.badRevision.test(msg) || GitWarnings.noUpstream.test(msg)) {
|
|
643
|
-
if (ex.stdout != null && ex.stdout.length !== 0) {
|
|
644
|
-
data = [ex.stdout, undefined];
|
|
645
|
-
} else {
|
|
646
|
-
try {
|
|
647
|
-
result = await this.git.run(
|
|
648
|
-
{ cwd: repoPath, cancellation: signal },
|
|
649
|
-
'symbolic-ref',
|
|
650
|
-
'--short',
|
|
651
|
-
'HEAD',
|
|
652
|
-
);
|
|
653
|
-
if (result.stdout) {
|
|
654
|
-
data = [result.stdout.trim(), undefined];
|
|
655
|
-
}
|
|
656
|
-
} catch {
|
|
657
|
-
if (isCancellationError(ex)) throw ex;
|
|
658
|
-
}
|
|
659
|
-
|
|
660
|
-
if (data == null) {
|
|
661
|
-
const symbolicRef = await this.getDefaultBranchName(
|
|
662
|
-
repoPath,
|
|
663
|
-
'origin',
|
|
664
|
-
undefined,
|
|
665
|
-
signal,
|
|
666
|
-
);
|
|
667
|
-
if (symbolicRef != null) {
|
|
668
|
-
data = [
|
|
669
|
-
symbolicRef.startsWith('origin/')
|
|
670
|
-
? symbolicRef.substring('origin/'.length)
|
|
671
|
-
: symbolicRef,
|
|
672
|
-
undefined,
|
|
673
|
-
];
|
|
674
|
-
}
|
|
675
|
-
}
|
|
676
|
-
|
|
677
|
-
if (data == null) {
|
|
678
|
-
const defaultBranch =
|
|
679
|
-
(await this.provider.config.getConfig(repoPath, 'init.defaultBranch')) ?? 'main';
|
|
680
|
-
const configMap = await this.provider.config.getConfigRegex(
|
|
681
|
-
repoPath,
|
|
682
|
-
`branch\\.${defaultBranch}\\.+`,
|
|
683
|
-
{ runGitLocally: true },
|
|
684
|
-
);
|
|
685
|
-
|
|
686
|
-
const remote = configMap.get(`branch.${defaultBranch}.remote`);
|
|
687
|
-
const merge = configMap.get(`branch.${defaultBranch}.merge`);
|
|
688
|
-
const remoteBranch = merge?.startsWith('refs/heads/')
|
|
689
|
-
? merge.substring('refs/heads/'.length)
|
|
690
|
-
: undefined;
|
|
691
|
-
|
|
692
|
-
data = [
|
|
693
|
-
`${defaultBranch}${remote && remoteBranch ? `\n${remote}/${remoteBranch}` : ''}`,
|
|
694
|
-
undefined,
|
|
695
|
-
];
|
|
696
|
-
}
|
|
697
|
-
}
|
|
698
|
-
} else if (GitWarnings.headNotABranch.test(msg)) {
|
|
699
|
-
result = await this.git.run(
|
|
700
|
-
{
|
|
701
|
-
cwd: repoPath,
|
|
702
|
-
cancellation: signal,
|
|
703
|
-
configs: gitConfigsLog,
|
|
704
|
-
errors: 'ignore',
|
|
705
|
-
},
|
|
706
|
-
'log',
|
|
707
|
-
'-n1',
|
|
708
|
-
'--format=%H',
|
|
709
|
-
commitOrdering ? `--${commitOrdering}-order` : undefined,
|
|
710
|
-
'--',
|
|
711
|
-
);
|
|
712
|
-
|
|
713
|
-
if (result.completion.status === 'cancelled' || signal?.aborted) {
|
|
714
|
-
throw new CancellationError();
|
|
715
|
-
}
|
|
716
|
-
|
|
717
|
-
const sha = result.stdout.trim();
|
|
718
|
-
if (sha) {
|
|
719
|
-
data = [`(HEAD detached at ${shortenRevision(sha)})`, sha];
|
|
720
|
-
}
|
|
721
|
-
} else {
|
|
722
|
-
Logger.warn(`[${repoPath}] Unable to get current branch: ${ex}`);
|
|
723
|
-
}
|
|
724
|
-
}
|
|
725
|
-
|
|
726
|
-
if (data == null) return undefined;
|
|
727
|
-
|
|
728
|
-
const [name, upstream] = data[0].split('\n');
|
|
729
|
-
|
|
730
|
-
return createReference(name, repoPath, {
|
|
731
|
-
refType: 'branch',
|
|
732
|
-
name: name,
|
|
733
|
-
id: getBranchId(repoPath, false, name),
|
|
734
|
-
remote: false,
|
|
735
|
-
upstream: upstream ? { name: upstream, missing: false } : undefined,
|
|
736
|
-
sha: data[1],
|
|
737
|
-
});
|
|
738
|
-
},
|
|
739
|
-
{ cancellation: cancellation },
|
|
740
|
-
);
|
|
741
|
-
}
|
|
742
|
-
|
|
743
|
-
@debug({ exit: true })
|
|
744
|
-
async getDefaultBranchName(
|
|
745
|
-
repoPath: string | undefined,
|
|
746
|
-
remote?: string,
|
|
747
|
-
options?: { priority?: GitCommandPriority; local?: boolean },
|
|
748
|
-
cancellation?: AbortSignal,
|
|
749
|
-
): Promise<string | undefined> {
|
|
750
|
-
if (repoPath == null) return undefined;
|
|
751
|
-
|
|
752
|
-
remote ??= 'origin';
|
|
753
|
-
const priority = options?.priority;
|
|
754
|
-
const priorityOpts = priority != null ? { priority: priority } : undefined;
|
|
755
|
-
|
|
756
|
-
// Local-only: read just the existing local symref, never contacting the remote. Cached under a
|
|
757
|
-
// `${remote}:local` key — a colon can't appear in a refname component, so it can never collide
|
|
758
|
-
// with a real remote name used by the networked variant below. Invalidated by the same
|
|
759
|
-
// remotes/branches cache cascades as the networked lookup.
|
|
760
|
-
if (options?.local) {
|
|
761
|
-
return this.cache.getDefaultBranchName(
|
|
762
|
-
repoPath,
|
|
763
|
-
`${remote}:local`,
|
|
764
|
-
async (commonPath, cacheable, signal) => {
|
|
765
|
-
try {
|
|
766
|
-
// Bind to the aggregate `signal` (fires only when ALL current callers abort), not
|
|
767
|
-
// this-caller's `cancellation` — otherwise a superseded caller's abort would kill the
|
|
768
|
-
// shared command and reject concurrent riders that never cancelled.
|
|
769
|
-
const result = await this.git.run(
|
|
770
|
-
{ cwd: commonPath, cancellation: signal ?? cancellation, ...priorityOpts },
|
|
771
|
-
'symbolic-ref',
|
|
772
|
-
'--short',
|
|
773
|
-
`refs/remotes/${remote}/HEAD`,
|
|
774
|
-
);
|
|
775
|
-
return result.stdout.trim() || undefined;
|
|
776
|
-
} catch (ex) {
|
|
777
|
-
if (isCancellationError(ex)) throw ex;
|
|
778
|
-
|
|
779
|
-
// `symbolic-ref` on an absent `refs/remotes/<remote>/HEAD` exits fatal rather than
|
|
780
|
-
// empty, and that message matches no `GitWarnings` entry, so it arrives here as a
|
|
781
|
-
// throw. It is still an ANSWER — the ref genuinely isn't set — and the overwhelmingly
|
|
782
|
-
// common one, so cache it. Invalidating instead means every caller re-probes and the
|
|
783
|
-
// whole point of caching this lookup is lost.
|
|
784
|
-
const stderr = (ex as { stderr?: string }).stderr ?? '';
|
|
785
|
-
if (stderr.includes('is not a symbolic ref')) return undefined;
|
|
786
|
-
|
|
787
|
-
// Anything else never produced an answer (spawn failure, queue rejection). This entry
|
|
788
|
-
// has no TTL, so caching that would pin "no default branch" for the session.
|
|
789
|
-
cacheable.invalidate();
|
|
790
|
-
return undefined;
|
|
791
|
-
}
|
|
792
|
-
},
|
|
793
|
-
cancellation,
|
|
794
|
-
);
|
|
795
|
-
}
|
|
796
|
-
|
|
797
|
-
return this.cache.getDefaultBranchName(
|
|
798
|
-
repoPath,
|
|
799
|
-
remote,
|
|
800
|
-
async (commonPath, cacheable, signal) => {
|
|
801
|
-
let retried = false;
|
|
802
|
-
while (true) {
|
|
803
|
-
try {
|
|
804
|
-
const result = await this.git.run(
|
|
805
|
-
{ cwd: commonPath, cancellation: signal ?? cancellation, ...priorityOpts },
|
|
806
|
-
'symbolic-ref',
|
|
807
|
-
'--short',
|
|
808
|
-
`refs/remotes/${remote}/HEAD`,
|
|
809
|
-
);
|
|
810
|
-
return result.stdout.trim() || undefined;
|
|
811
|
-
} catch (ex) {
|
|
812
|
-
// Only "no HEAD ref configured" is an ANSWER here; every other throw means the lookup
|
|
813
|
-
// never happened. This entry has no TTL, so caching a failure — an offline `ls-remote`
|
|
814
|
-
// being the likely one — would pin "no default branch" for the session.
|
|
815
|
-
let answered = false;
|
|
816
|
-
if (/is not a symbolic ref/.test(ex.stderr)) {
|
|
817
|
-
try {
|
|
818
|
-
if (!retried) {
|
|
819
|
-
retried = true;
|
|
820
|
-
await this.git.run(
|
|
821
|
-
{ cwd: commonPath, cancellation: signal ?? cancellation, ...priorityOpts },
|
|
822
|
-
'remote',
|
|
823
|
-
'set-head',
|
|
824
|
-
'-a',
|
|
825
|
-
remote,
|
|
826
|
-
);
|
|
827
|
-
// This just created `refs/remotes/<remote>/HEAD`, which the `local` variant
|
|
828
|
-
// may already have cached a miss for. The watcher would also catch the new
|
|
829
|
-
// ref, but evict directly so consumers of this package that don't wire up a
|
|
830
|
-
// watcher aren't stuck with that miss.
|
|
831
|
-
this.cache.deleteDefaultBranchName(commonPath, `${remote}:local`);
|
|
832
|
-
continue;
|
|
833
|
-
}
|
|
834
|
-
|
|
835
|
-
const result = await this.git.run(
|
|
836
|
-
{ cwd: commonPath, cancellation: signal ?? cancellation, ...priorityOpts },
|
|
837
|
-
'ls-remote',
|
|
838
|
-
'--symref',
|
|
839
|
-
remote,
|
|
840
|
-
'HEAD',
|
|
841
|
-
);
|
|
842
|
-
if (result.stdout) {
|
|
843
|
-
const match = /ref:\s(\S+)\s+HEAD/m.exec(result.stdout);
|
|
844
|
-
if (match != null) {
|
|
845
|
-
const [, branch] = match;
|
|
846
|
-
return `${remote}/${branch.substring('refs/heads/'.length).trim()}`;
|
|
847
|
-
}
|
|
848
|
-
}
|
|
849
|
-
|
|
850
|
-
// `ls-remote` ran and the remote advertised no HEAD — a real "none".
|
|
851
|
-
answered = true;
|
|
852
|
-
} catch {
|
|
853
|
-
if (isCancellationError(ex)) throw ex;
|
|
854
|
-
}
|
|
855
|
-
}
|
|
856
|
-
|
|
857
|
-
if (!answered) {
|
|
858
|
-
cacheable.invalidate();
|
|
859
|
-
}
|
|
860
|
-
return undefined;
|
|
861
|
-
}
|
|
862
|
-
}
|
|
863
|
-
},
|
|
864
|
-
cancellation,
|
|
865
|
-
);
|
|
866
|
-
}
|
|
867
|
-
|
|
868
|
-
@debug()
|
|
869
|
-
async createBranch(repoPath: string, name: string, ref: string, options?: { noTracking?: boolean }): Promise<void> {
|
|
870
|
-
const args = ['branch', name, ref];
|
|
871
|
-
if (options?.noTracking) {
|
|
872
|
-
args.push('--no-track');
|
|
873
|
-
}
|
|
874
|
-
try {
|
|
875
|
-
await this.git.run({ cwd: repoPath }, ...args);
|
|
876
|
-
// Evict the cached base so the new branch re-derives its own. The PERSISTED `branch.<ref>.gk-*`
|
|
877
|
-
// keys are left alone: they're dropped when GitLens deletes a branch, never when one is created.
|
|
878
|
-
// Removing them here would mean treating a reused name as proof of a different branch, which
|
|
879
|
-
// nothing can establish — so the trade is that a branch reusing a name deleted outside GitLens
|
|
880
|
-
// inherits the orphaned section.
|
|
881
|
-
this.cache.deleteBaseBranchName(repoPath, name);
|
|
882
|
-
this.context.hooks?.cache?.onReset?.(repoPath, 'branches');
|
|
883
|
-
this.context.hooks?.repository?.onChanged?.(repoPath, ['heads']);
|
|
884
|
-
} catch (ex) {
|
|
885
|
-
throw getGitCommandError(
|
|
886
|
-
'branch',
|
|
887
|
-
ex,
|
|
888
|
-
reason =>
|
|
889
|
-
new BranchError(
|
|
890
|
-
{
|
|
891
|
-
reason: reason ?? 'other',
|
|
892
|
-
action: 'create',
|
|
893
|
-
branch: name,
|
|
894
|
-
gitCommand: { repoPath: repoPath, args: args },
|
|
895
|
-
},
|
|
896
|
-
ex,
|
|
897
|
-
),
|
|
898
|
-
);
|
|
899
|
-
}
|
|
900
|
-
}
|
|
901
|
-
|
|
902
|
-
@debug()
|
|
903
|
-
async deleteLocalBranch(repoPath: string, names: string | string[], options?: { force?: boolean }): Promise<void> {
|
|
904
|
-
const branches = ensureArray(names);
|
|
905
|
-
const args = ['branch', options?.force ? '-D' : '-d', ...branches];
|
|
906
|
-
try {
|
|
907
|
-
await this.git.run({ cwd: repoPath }, ...args);
|
|
908
|
-
for (const branch of branches) {
|
|
909
|
-
this.cache.deleteBaseBranchName(repoPath, branch);
|
|
910
|
-
// Drop the persisted gk metadata too, not just the cached resolution. `getBaseBranchName`
|
|
911
|
-
// reads `branch.<ref>.gk-merge-base` before falling back to the reflog, so leaving it behind
|
|
912
|
-
// would hand a later branch reusing this name its predecessor's base — evicting the cache
|
|
913
|
-
// alone just forces a re-derivation that reads the same stale value back.
|
|
914
|
-
await this.provider.config.removeGkConfigBranchSection(repoPath, branch);
|
|
915
|
-
}
|
|
916
|
-
this.context.hooks?.cache?.onReset?.(repoPath, 'branches');
|
|
917
|
-
this.context.hooks?.repository?.onChanged?.(repoPath, ['heads']);
|
|
918
|
-
} catch (ex) {
|
|
919
|
-
// A multi-name delete partially succeeds: `git branch -d a bad c` removes `a` and `c`, refuses
|
|
920
|
-
// `bad`, and still exits non-zero — so the loop above never ran for the branches that did go.
|
|
921
|
-
// Clean those up here rather than leave persisted gk metadata behind for a name a later branch
|
|
922
|
-
// can reuse.
|
|
923
|
-
const anyDeleted = await this.cleanupDeletedBranchMetadata(repoPath, branches);
|
|
924
|
-
|
|
925
|
-
// The success path's notifications never ran, but some branches DID go — without these the
|
|
926
|
-
// branch caches stay stale and consumers wait on the filesystem watcher (which never fires
|
|
927
|
-
// for a packed ref).
|
|
928
|
-
if (anyDeleted) {
|
|
929
|
-
this.context.hooks?.cache?.onReset?.(repoPath, 'branches');
|
|
930
|
-
this.context.hooks?.repository?.onChanged?.(repoPath, ['heads']);
|
|
931
|
-
}
|
|
932
|
-
|
|
933
|
-
if (ex instanceof BranchError) {
|
|
934
|
-
throw ex.update({
|
|
935
|
-
action: options?.force ? 'force delete' : 'delete',
|
|
936
|
-
branch: branches.join(', '),
|
|
937
|
-
gitCommand: { repoPath: repoPath, args: args },
|
|
938
|
-
});
|
|
939
|
-
}
|
|
940
|
-
|
|
941
|
-
// Classify the failure (e.g. not fully merged) so consumers like the delete wizard can offer a
|
|
942
|
-
// force retry — without this the reason would be undefined and every failure reads as 'other'.
|
|
943
|
-
throw getGitCommandError(
|
|
944
|
-
'branch',
|
|
945
|
-
ex,
|
|
946
|
-
reason =>
|
|
947
|
-
new BranchError(
|
|
948
|
-
{
|
|
949
|
-
reason: reason ?? 'other',
|
|
950
|
-
action: options?.force ? 'force delete' : 'delete',
|
|
951
|
-
branch: branches.join(', '),
|
|
952
|
-
gitCommand: { repoPath: repoPath, args: args },
|
|
953
|
-
},
|
|
954
|
-
ex,
|
|
955
|
-
),
|
|
956
|
-
);
|
|
957
|
-
}
|
|
958
|
-
}
|
|
959
|
-
|
|
960
|
-
/**
|
|
961
|
-
* Drops the cached and persisted per-branch metadata for whichever of `names` no longer exists. Only
|
|
962
|
-
* for the partial-failure path — one extra `for-each-ref` is cheap while already handling an error,
|
|
963
|
-
* and keeps the success path free of it.
|
|
964
|
-
*
|
|
965
|
-
* Returns whether any of `names` is confirmed gone; `false` when the probe couldn't answer, so a
|
|
966
|
-
* spurious notification is never fired on an unrelated failure.
|
|
967
|
-
*/
|
|
968
|
-
private async cleanupDeletedBranchMetadata(repoPath: string, names: string[]): Promise<boolean> {
|
|
969
|
-
try {
|
|
970
|
-
const result = await this.git.run(
|
|
971
|
-
{ cwd: repoPath, errors: 'ignore' },
|
|
972
|
-
'for-each-ref',
|
|
973
|
-
// Full refname, stripped here rather than by git. NOT `%(refname:short)`: that yields the
|
|
974
|
-
// shortest UNAMBIGUOUS name, so a branch with a same-named tag comes back as `heads/<name>`,
|
|
975
|
-
// never matches the requested name, and would read as deleted — wiping a live branch's
|
|
976
|
-
// metadata. `%(refname:strip=2)` also solves that, but `%(refname)` is the oldest, plainest
|
|
977
|
-
// field and needs no assumption about which git version gained `strip`.
|
|
978
|
-
'--format=%(refname)',
|
|
979
|
-
...names.map(n => `refs/heads/${n}`),
|
|
980
|
-
);
|
|
981
|
-
// `errors: 'ignore'` means a failed probe RESOLVES empty, which is indistinguishable from "none
|
|
982
|
-
// of them survived" — and would delete every name's metadata, including user-owned keys like
|
|
983
|
-
// `gk-disposition` and `gk-associated-issues`. Only act on a genuine answer.
|
|
984
|
-
//
|
|
985
|
-
// BOTH conditions: `exitCode !== 0` catches a probe git ran and rejected, `status !== 'exited'`
|
|
986
|
-
// catches one that never produced an answer — a spawn failure or queue rejection (no exit code at
|
|
987
|
-
// all), or a swallowed warning (which carries git's real code, so the exit-code test alone can
|
|
988
|
-
// still read it as "none survived").
|
|
989
|
-
if (result.completion.status !== 'exited' || result.exitCode !== 0) return false;
|
|
990
|
-
|
|
991
|
-
const prefix = 'refs/heads/';
|
|
992
|
-
const surviving = new Set(
|
|
993
|
-
result.stdout
|
|
994
|
-
.split('\n')
|
|
995
|
-
.map(l => l.trim())
|
|
996
|
-
.filter(l => l.startsWith(prefix))
|
|
997
|
-
.map(l => l.substring(prefix.length)),
|
|
998
|
-
);
|
|
999
|
-
|
|
1000
|
-
let anyDeleted = false;
|
|
1001
|
-
for (const name of names) {
|
|
1002
|
-
if (surviving.has(name)) continue;
|
|
1003
|
-
|
|
1004
|
-
anyDeleted = true;
|
|
1005
|
-
this.cache.deleteBaseBranchName(repoPath, name);
|
|
1006
|
-
await this.provider.config.removeGkConfigBranchSection(repoPath, name);
|
|
1007
|
-
}
|
|
1008
|
-
|
|
1009
|
-
return anyDeleted;
|
|
1010
|
-
} catch {
|
|
1011
|
-
// Best-effort bookkeeping while already unwinding a failure — never mask the original error.
|
|
1012
|
-
return false;
|
|
1013
|
-
}
|
|
1014
|
-
}
|
|
1015
|
-
|
|
1016
|
-
@debug()
|
|
1017
|
-
async deleteRemoteBranch(repoPath: string, names: string | string[], remote: string): Promise<void> {
|
|
1018
|
-
const branches = ensureArray(names);
|
|
1019
|
-
const args = ['push', '-d', remote, ...branches];
|
|
1020
|
-
try {
|
|
1021
|
-
await this.git.run({ cwd: repoPath }, ...args);
|
|
1022
|
-
this.context.hooks?.cache?.onReset?.(repoPath, 'branches');
|
|
1023
|
-
this.context.hooks?.repository?.onChanged?.(repoPath, ['remotes']);
|
|
1024
|
-
} catch (ex) {
|
|
1025
|
-
if (ex instanceof BranchError) {
|
|
1026
|
-
throw ex.update({
|
|
1027
|
-
action: 'delete',
|
|
1028
|
-
branch: branches.join(', '),
|
|
1029
|
-
gitCommand: { repoPath: repoPath, args: args },
|
|
1030
|
-
});
|
|
1031
|
-
}
|
|
1032
|
-
|
|
1033
|
-
// Classify against the underlying `git push -d` failure modes; map the "remote ref does not
|
|
1034
|
-
// exist" case onto BranchError's noRemoteReference so consumers get an actionable reason.
|
|
1035
|
-
throw getGitCommandError(
|
|
1036
|
-
'push',
|
|
1037
|
-
ex,
|
|
1038
|
-
reason =>
|
|
1039
|
-
new BranchError(
|
|
1040
|
-
{
|
|
1041
|
-
reason: reason === 'rejectedRefDoesNotExist' ? 'noRemoteReference' : 'other',
|
|
1042
|
-
action: 'delete',
|
|
1043
|
-
branch: branches.join(', '),
|
|
1044
|
-
gitCommand: { repoPath: repoPath, args: args },
|
|
1045
|
-
},
|
|
1046
|
-
ex,
|
|
1047
|
-
),
|
|
1048
|
-
);
|
|
1049
|
-
}
|
|
1050
|
-
}
|
|
1051
|
-
|
|
1052
|
-
@debug()
|
|
1053
|
-
async getBranchMergedStatus(
|
|
1054
|
-
repoPath: string,
|
|
1055
|
-
branch: GitBranchReference,
|
|
1056
|
-
into: GitBranchReference,
|
|
1057
|
-
cancellation?: AbortSignal,
|
|
1058
|
-
): Promise<GitBranchMergedStatus> {
|
|
1059
|
-
if (branch.name === into.name || branch.upstream?.name === into.name) {
|
|
1060
|
-
return { merged: false };
|
|
1061
|
-
}
|
|
1062
|
-
|
|
1063
|
-
// Hoisted so it can feed the cache key below (its tip is a 3rd key input) and the mapper
|
|
1064
|
-
// below reuses it instead of resolving it a second time.
|
|
1065
|
-
const localInto = into.remote
|
|
1066
|
-
? await this.getLocalBranchByUpstream(repoPath, into.name, cancellation)
|
|
1067
|
-
: undefined;
|
|
1068
|
-
|
|
1069
|
-
// Cache key omits repoPath so worktrees of the same common repo share the cached answer.
|
|
1070
|
-
// Content-keyed on the involved tip shas (the result is a pure function of them), so tip
|
|
1071
|
-
// movement mints a new key instead of relying on eviction; falls back to the name-only
|
|
1072
|
-
// identity when a sha is missing (defensive — the sole caller always supplies both tips).
|
|
1073
|
-
const cacheKey =
|
|
1074
|
-
branch.sha != null && into.sha != null
|
|
1075
|
-
? `${branch.remote ? 'r' : 'l'}:${branch.name}@${branch.sha}|${into.remote ? 'r' : 'l'}:${into.name}@${into.sha}${
|
|
1076
|
-
localInto?.sha != null ? `|L:${localInto.name}@${localInto.sha}` : ''
|
|
1077
|
-
}`
|
|
1078
|
-
: `${branch.remote ? 'r' : 'l'}:${branch.name}|${into.remote ? 'r' : 'l'}:${into.name}`;
|
|
1079
|
-
|
|
1080
|
-
return this.cache.getBranchMergedStatus(
|
|
1081
|
-
repoPath,
|
|
1082
|
-
cacheKey,
|
|
1083
|
-
async (commonPath, _cacheable, signal) => {
|
|
1084
|
-
const result = await this.getBranchMergedStatusCore(commonPath, branch, into, signal);
|
|
1085
|
-
if (result.merged) return result;
|
|
1086
|
-
|
|
1087
|
-
// If there is a local branch and it is not the branch we are checking, check if it has been merged into it
|
|
1088
|
-
if (localInto != null && localInto.name !== branch.name) {
|
|
1089
|
-
// Skip the second full merge-check cycle when the local branch points at the same commit as the remote —
|
|
1090
|
-
// the merge-base/cherry/diff/apply pipeline would produce the same answer we already got for `into` above
|
|
1091
|
-
if (localInto.sha != null && localInto.sha === into.sha) {
|
|
1092
|
-
return { merged: false };
|
|
1093
|
-
}
|
|
1094
|
-
|
|
1095
|
-
const result = await this.getBranchMergedStatusCore(commonPath, branch, localInto, signal);
|
|
1096
|
-
if (result.merged) {
|
|
1097
|
-
// `localBranchOnly` is built against `commonPath` here; the cache mapper rewrites
|
|
1098
|
-
// `repoPath`/`id` to the requesting worktree on retrieval.
|
|
1099
|
-
return {
|
|
1100
|
-
...result,
|
|
1101
|
-
localBranchOnly: createReference(localInto.ref, commonPath, {
|
|
1102
|
-
id: getBranchId(commonPath, localInto.remote, localInto.name),
|
|
1103
|
-
refType: 'branch',
|
|
1104
|
-
name: localInto.name,
|
|
1105
|
-
remote: localInto.remote,
|
|
1106
|
-
upstream: localInto.upstream,
|
|
1107
|
-
sha: localInto.sha,
|
|
1108
|
-
}),
|
|
1109
|
-
};
|
|
1110
|
-
}
|
|
1111
|
-
}
|
|
1112
|
-
|
|
1113
|
-
return { merged: false };
|
|
1114
|
-
},
|
|
1115
|
-
cancellation,
|
|
1116
|
-
);
|
|
1117
|
-
}
|
|
1118
|
-
|
|
1119
|
-
private async getBranchMergedStatusCore(
|
|
1120
|
-
repoPath: string,
|
|
1121
|
-
branch: GitBranchReference,
|
|
1122
|
-
into: GitBranchReference,
|
|
1123
|
-
cancellation?: AbortSignal,
|
|
1124
|
-
): Promise<Exclude<GitBranchMergedStatus, 'localBranchOnly'>> {
|
|
1125
|
-
const scope = getScopedLogger();
|
|
1126
|
-
|
|
1127
|
-
try {
|
|
1128
|
-
// Check if branch is direct ancestor (handles FF merges)
|
|
1129
|
-
try {
|
|
1130
|
-
await this.git.run(
|
|
1131
|
-
{ cwd: repoPath, cancellation: cancellation, errors: 'throw' },
|
|
1132
|
-
'merge-base',
|
|
1133
|
-
'--is-ancestor',
|
|
1134
|
-
branch.name,
|
|
1135
|
-
into.name,
|
|
1136
|
-
);
|
|
1137
|
-
return { merged: true, confidence: 'highest' };
|
|
1138
|
-
} catch (ex) {
|
|
1139
|
-
if (isCancellationError(ex)) throw ex;
|
|
1140
|
-
}
|
|
1141
|
-
|
|
1142
|
-
// Cherry-pick detection (handles cherry-picks, rebases, etc)
|
|
1143
|
-
let result = await this.git.run(
|
|
1144
|
-
{ cwd: repoPath, cancellation: cancellation },
|
|
1145
|
-
'cherry',
|
|
1146
|
-
'--abbrev',
|
|
1147
|
-
'-v',
|
|
1148
|
-
into.name,
|
|
1149
|
-
branch.name,
|
|
1150
|
-
);
|
|
1151
|
-
// Check if there are no lines or all lines startwith a `-` (i.e. likely merged)
|
|
1152
|
-
if (
|
|
1153
|
-
!result.stdout ||
|
|
1154
|
-
result.stdout
|
|
1155
|
-
.trim()
|
|
1156
|
-
.split('\n')
|
|
1157
|
-
.every(l => l.startsWith('-'))
|
|
1158
|
-
) {
|
|
1159
|
-
return { merged: true, confidence: 'high' };
|
|
1160
|
-
}
|
|
1161
|
-
|
|
1162
|
-
// Attempt to detect squash merges by checking if the diff of the branch can be cleanly removed from the target
|
|
1163
|
-
const mergeBase = await this.provider.refs.getMergeBase(
|
|
1164
|
-
repoPath,
|
|
1165
|
-
into.name,
|
|
1166
|
-
branch.name,
|
|
1167
|
-
undefined,
|
|
1168
|
-
cancellation,
|
|
1169
|
-
);
|
|
1170
|
-
result = await this.git.run({ cwd: repoPath, cancellation: cancellation }, 'diff', mergeBase, branch.name);
|
|
1171
|
-
if (result.stdout) {
|
|
1172
|
-
// Create a temporary index file
|
|
1173
|
-
await using disposableIndex = await this.provider.staging.createTemporaryIndex(
|
|
1174
|
-
repoPath,
|
|
1175
|
-
'ref',
|
|
1176
|
-
into.name,
|
|
1177
|
-
);
|
|
1178
|
-
const { env } = disposableIndex;
|
|
1179
|
-
|
|
1180
|
-
result = await this.git.run(
|
|
1181
|
-
{
|
|
1182
|
-
cwd: repoPath,
|
|
1183
|
-
cancellation: cancellation,
|
|
1184
|
-
env: env,
|
|
1185
|
-
errors: 'ignore',
|
|
1186
|
-
stdin: result.stdout,
|
|
1187
|
-
},
|
|
1188
|
-
'apply',
|
|
1189
|
-
'--cached',
|
|
1190
|
-
'--reverse',
|
|
1191
|
-
'--check',
|
|
1192
|
-
'-',
|
|
1193
|
-
);
|
|
1194
|
-
|
|
1195
|
-
if (result.exitCode === 0 && !result.stdout.trim() && !result.stderr?.trim()) {
|
|
1196
|
-
return { merged: true, confidence: 'medium' };
|
|
1197
|
-
}
|
|
1198
|
-
}
|
|
1199
|
-
|
|
1200
|
-
return { merged: false };
|
|
1201
|
-
} catch (ex) {
|
|
1202
|
-
if (Logger.enabled('trace')) {
|
|
1203
|
-
scope?.error(ex);
|
|
1204
|
-
}
|
|
1205
|
-
if (isCancellationError(ex)) throw ex;
|
|
1206
|
-
|
|
1207
|
-
return { merged: false };
|
|
1208
|
-
}
|
|
1209
|
-
}
|
|
1210
|
-
|
|
1211
|
-
@debug()
|
|
1212
|
-
async getLocalBranchByUpstream(
|
|
1213
|
-
repoPath: string,
|
|
1214
|
-
remoteBranchName: string,
|
|
1215
|
-
cancellation?: AbortSignal,
|
|
1216
|
-
): Promise<GitBranch | undefined> {
|
|
1217
|
-
const branches = new PageableResult<GitBranch>(p =>
|
|
1218
|
-
this.getBranches(repoPath, p != null ? { paging: p } : undefined, cancellation),
|
|
1219
|
-
);
|
|
1220
|
-
return getLocalBranchByUpstream(remoteBranchName, branches);
|
|
1221
|
-
}
|
|
1222
|
-
|
|
1223
|
-
/** Detects potential conflicts when applying commits onto a target branch (git rebase and cherry-pick) */
|
|
1224
|
-
@debug()
|
|
1225
|
-
async getPotentialApplyConflicts(
|
|
1226
|
-
repoPath: string,
|
|
1227
|
-
targetBranch: string,
|
|
1228
|
-
shas: string[],
|
|
1229
|
-
options?: { stopOnFirstConflict?: boolean },
|
|
1230
|
-
cancellation?: AbortSignal,
|
|
1231
|
-
): Promise<ConflictDetectionResult> {
|
|
1232
|
-
if (!shas.length) return { status: 'clean' };
|
|
1233
|
-
|
|
1234
|
-
const cacheKey: ConflictDetectionCacheKey = `apply:${targetBranch}:${shas.join(',')}:${options?.stopOnFirstConflict ?? false}`;
|
|
1235
|
-
return this.cache.conflictDetection.getOrCreate(
|
|
1236
|
-
repoPath,
|
|
1237
|
-
cacheKey,
|
|
1238
|
-
async (_cacheable, signal) => {
|
|
1239
|
-
// Resolve all parent refs in a single call - fails if any commit is a root commit (no parent)
|
|
1240
|
-
const parentRefs = shas.map(c => `${c}^`);
|
|
1241
|
-
let parentShas: string[];
|
|
1242
|
-
try {
|
|
1243
|
-
const result = await this.git.run(
|
|
1244
|
-
{ cwd: repoPath, cancellation: signal, errors: 'throw' },
|
|
1245
|
-
'rev-parse',
|
|
1246
|
-
...parentRefs,
|
|
1247
|
-
);
|
|
1248
|
-
parentShas = result.stdout.trim().split('\n');
|
|
1249
|
-
} catch (ex) {
|
|
1250
|
-
if (isCancellationError(ex)) throw ex;
|
|
1251
|
-
// If any commit doesn't have a parent (root commit), we can't do conflict detection
|
|
1252
|
-
return createConflictDetectionError('noParent');
|
|
1253
|
-
}
|
|
1254
|
-
|
|
1255
|
-
if (parentShas.length !== shas.length) {
|
|
1256
|
-
return createConflictDetectionError('refNotFound');
|
|
1257
|
-
}
|
|
1258
|
-
|
|
1259
|
-
const commitsWithParents = shas.map((c, i) => ({ sha: c, parent: parentShas[i] }));
|
|
1260
|
-
return this.checkForPotentialConflicts(repoPath, commitsWithParents, targetBranch, signal, options);
|
|
1261
|
-
},
|
|
1262
|
-
{ cancellation: cancellation },
|
|
1263
|
-
);
|
|
1264
|
-
}
|
|
1265
|
-
|
|
1266
|
-
/** Detects potential conflict when merge a branch into a target branch (git merge) */
|
|
1267
|
-
@debug()
|
|
1268
|
-
async getPotentialMergeConflicts(
|
|
1269
|
-
repoPath: string,
|
|
1270
|
-
branch: string,
|
|
1271
|
-
targetBranch: string,
|
|
1272
|
-
cancellation?: AbortSignal,
|
|
1273
|
-
): Promise<ConflictDetectionResult> {
|
|
1274
|
-
const scope = getScopedLogger();
|
|
1275
|
-
|
|
1276
|
-
const cacheKey: ConflictDetectionCacheKey = `merge:${branch}:${targetBranch}`;
|
|
1277
|
-
return this.cache.conflictDetection.getOrCreate(
|
|
1278
|
-
repoPath,
|
|
1279
|
-
cacheKey,
|
|
1280
|
-
async (_cacheable, signal) => {
|
|
1281
|
-
// Requires Git v2.33+
|
|
1282
|
-
if (!(await this.git.supports('git:merge-tree'))) {
|
|
1283
|
-
return createConflictDetectionError('unsupported');
|
|
1284
|
-
}
|
|
1285
|
-
|
|
1286
|
-
let data;
|
|
1287
|
-
try {
|
|
1288
|
-
const result = await this.git.run(
|
|
1289
|
-
{ cwd: repoPath, cancellation: signal, errors: 'throw' },
|
|
1290
|
-
'merge-tree',
|
|
1291
|
-
'-z',
|
|
1292
|
-
'--name-only',
|
|
1293
|
-
'--no-messages',
|
|
1294
|
-
branch,
|
|
1295
|
-
targetBranch,
|
|
1296
|
-
);
|
|
1297
|
-
data = result.stdout;
|
|
1298
|
-
} catch (ex) {
|
|
1299
|
-
if (isCancellationError(ex)) throw ex;
|
|
1300
|
-
|
|
1301
|
-
const msg: string = ex?.toString() ?? '';
|
|
1302
|
-
if (GitErrors.notAValidObjectName.test(msg)) {
|
|
1303
|
-
scope?.error(
|
|
1304
|
-
ex,
|
|
1305
|
-
`'${targetBranch}' or '${branch}' not found - ensure the branches exist and are fully qualified (e.g. 'refs/heads/main')`,
|
|
1306
|
-
);
|
|
1307
|
-
return createConflictDetectionError('refNotFound');
|
|
1308
|
-
} else if (GitErrors.badRevision.test(msg)) {
|
|
1309
|
-
scope?.error(ex, `Invalid branch name: ${msg.slice(msg.indexOf("'"))}`);
|
|
1310
|
-
return createConflictDetectionError('refNotFound');
|
|
1311
|
-
} else if (GitErrors.noMergeBase.test(msg)) {
|
|
1312
|
-
scope?.error(
|
|
1313
|
-
ex,
|
|
1314
|
-
`Unable to merge '${branch}' and '${targetBranch}' as they have no common ancestor`,
|
|
1315
|
-
);
|
|
1316
|
-
return createConflictDetectionError('noMergeBase');
|
|
1317
|
-
} else if (ex instanceof GitError) {
|
|
1318
|
-
data = ex.stdout;
|
|
1319
|
-
} else {
|
|
1320
|
-
scope?.error(ex);
|
|
1321
|
-
return createConflictDetectionError('other');
|
|
1322
|
-
}
|
|
1323
|
-
}
|
|
1324
|
-
if (!data) return { status: 'clean' };
|
|
1325
|
-
|
|
1326
|
-
const mergeConflict = parseMergeTreeConflict(data);
|
|
1327
|
-
if (!mergeConflict.conflicts.length) return { status: 'clean', treeOid: mergeConflict.treeOid };
|
|
1328
|
-
|
|
1329
|
-
return {
|
|
1330
|
-
status: 'conflicts',
|
|
1331
|
-
conflict: {
|
|
1332
|
-
repoPath: repoPath,
|
|
1333
|
-
branch: branch,
|
|
1334
|
-
target: targetBranch,
|
|
1335
|
-
files: mergeConflict.conflicts,
|
|
1336
|
-
shas: undefined, // Merge conflicts don't have a specific commit SHA
|
|
1337
|
-
},
|
|
1338
|
-
treeOid: mergeConflict.treeOid,
|
|
1339
|
-
};
|
|
1340
|
-
},
|
|
1341
|
-
{ cancellation: cancellation },
|
|
1342
|
-
);
|
|
1343
|
-
}
|
|
1344
|
-
|
|
1345
|
-
/** Detects conflicts when an autostash is reapplied onto the tree an integration produced */
|
|
1346
|
-
@debug()
|
|
1347
|
-
async getPotentialStashReapplyConflicts(
|
|
1348
|
-
repoPath: string,
|
|
1349
|
-
ontoTreeOid: string,
|
|
1350
|
-
cancellation?: AbortSignal,
|
|
1351
|
-
): Promise<ConflictDetectionResult> {
|
|
1352
|
-
// Requires Git v2.38+ for --write-tree with 3-arg form
|
|
1353
|
-
if (!(await this.git.supports('git:merge-tree:write-tree'))) {
|
|
1354
|
-
return createConflictDetectionError('unsupported');
|
|
1355
|
-
}
|
|
1356
|
-
|
|
1357
|
-
// git stash create writes commit objects but touches neither the working tree nor the stash ref, and
|
|
1358
|
-
// captures tracked changes only — which is exactly what autostash does
|
|
1359
|
-
let stashSha: string;
|
|
1360
|
-
try {
|
|
1361
|
-
const result = await this.git.run(
|
|
1362
|
-
{ cwd: repoPath, cancellation: cancellation, errors: 'throw' },
|
|
1363
|
-
'stash',
|
|
1364
|
-
'create',
|
|
1365
|
-
);
|
|
1366
|
-
stashSha = result.stdout.trim();
|
|
1367
|
-
} catch (ex) {
|
|
1368
|
-
if (isCancellationError(ex)) throw ex;
|
|
1369
|
-
|
|
1370
|
-
return createConflictDetectionError('other');
|
|
1371
|
-
}
|
|
1372
|
-
|
|
1373
|
-
if (!stashSha) return { status: 'clean' };
|
|
1374
|
-
|
|
1375
|
-
// Key on what the simulation actually consumes — the stash's tree and its first parent (the HEAD it was
|
|
1376
|
-
// taken against, and so the merge base). The stash SHA itself embeds a commit timestamp, so two runs over
|
|
1377
|
-
// an identical tree produce different SHAs and a SHA-keyed entry could never be hit.
|
|
1378
|
-
let stashTree: string;
|
|
1379
|
-
let stashParent: string;
|
|
1380
|
-
try {
|
|
1381
|
-
const result = await this.git.run(
|
|
1382
|
-
{ cwd: repoPath, cancellation: cancellation, errors: 'throw' },
|
|
1383
|
-
'rev-parse',
|
|
1384
|
-
`${stashSha}^{tree}`,
|
|
1385
|
-
`${stashSha}^`,
|
|
1386
|
-
);
|
|
1387
|
-
[stashTree, stashParent] = result.stdout.trim().split('\n');
|
|
1388
|
-
} catch (ex) {
|
|
1389
|
-
if (isCancellationError(ex)) throw ex;
|
|
1390
|
-
|
|
1391
|
-
return createConflictDetectionError('other');
|
|
1392
|
-
}
|
|
1393
|
-
|
|
1394
|
-
const cacheKey: ConflictDetectionCacheKey = `reapply:${ontoTreeOid}:${stashTree}.${stashParent}`;
|
|
1395
|
-
return this.cache.conflictDetection.getOrCreate(
|
|
1396
|
-
repoPath,
|
|
1397
|
-
cacheKey,
|
|
1398
|
-
async (_cacheable, signal) => {
|
|
1399
|
-
// The stash commit's first parent is the HEAD it was taken against, which is the correct merge
|
|
1400
|
-
// base for a reapply — ours is the post-integration tree, theirs is the stash
|
|
1401
|
-
const step = await this.runMergeTreeStep(repoPath, `${stashSha}^`, ontoTreeOid, stashSha, signal);
|
|
1402
|
-
if (!step.ok) return createConflictDetectionError(step.reason);
|
|
1403
|
-
|
|
1404
|
-
if (!step.result.conflicts.length) return { status: 'clean', treeOid: step.result.treeOid };
|
|
1405
|
-
|
|
1406
|
-
return {
|
|
1407
|
-
status: 'conflicts',
|
|
1408
|
-
conflict: {
|
|
1409
|
-
repoPath: repoPath,
|
|
1410
|
-
branch: stashSha,
|
|
1411
|
-
target: ontoTreeOid,
|
|
1412
|
-
files: step.result.conflicts,
|
|
1413
|
-
shas: undefined,
|
|
1414
|
-
},
|
|
1415
|
-
treeOid: step.result.treeOid,
|
|
1416
|
-
};
|
|
1417
|
-
},
|
|
1418
|
-
{ cancellation: cancellation },
|
|
1419
|
-
);
|
|
1420
|
-
}
|
|
1421
|
-
|
|
1422
|
-
private async runMergeTreeStep(
|
|
1423
|
-
repoPath: string,
|
|
1424
|
-
base: string,
|
|
1425
|
-
ours: string,
|
|
1426
|
-
theirs: string,
|
|
1427
|
-
cancellation?: AbortSignal,
|
|
1428
|
-
): Promise<{ ok: true; result: GitMergeConflict } | { ok: false; reason: ConflictDetectionErrorReason }> {
|
|
1429
|
-
const scope = getScopedLogger();
|
|
1430
|
-
|
|
1431
|
-
let data;
|
|
1432
|
-
try {
|
|
1433
|
-
const result = await this.git.run(
|
|
1434
|
-
{ cwd: repoPath, cancellation: cancellation, errors: 'throw' },
|
|
1435
|
-
'merge-tree',
|
|
1436
|
-
'--write-tree',
|
|
1437
|
-
'-z',
|
|
1438
|
-
'--name-only',
|
|
1439
|
-
'--no-messages',
|
|
1440
|
-
`--merge-base=${base}`,
|
|
1441
|
-
ours,
|
|
1442
|
-
theirs,
|
|
1443
|
-
);
|
|
1444
|
-
data = result.stdout;
|
|
1445
|
-
} catch (ex) {
|
|
1446
|
-
if (isCancellationError(ex)) throw ex;
|
|
1447
|
-
|
|
1448
|
-
const msg: string = ex?.toString() ?? '';
|
|
1449
|
-
if (GitErrors.notAValidObjectName.test(msg)) {
|
|
1450
|
-
scope?.error(ex, `'${ours}' or '${theirs}' not found - ensure the branches/commits exist`);
|
|
1451
|
-
return { ok: false, reason: 'refNotFound' };
|
|
1452
|
-
} else if (GitErrors.badRevision.test(msg)) {
|
|
1453
|
-
scope?.error(ex, `Invalid revision: ${msg.slice(msg.indexOf("'"))}`);
|
|
1454
|
-
return { ok: false, reason: 'refNotFound' };
|
|
1455
|
-
} else if (GitErrors.noMergeBase.test(msg)) {
|
|
1456
|
-
scope?.error(ex, `Unable to merge '${ours}' and '${theirs}' as they have no common ancestor`);
|
|
1457
|
-
return { ok: false, reason: 'noMergeBase' };
|
|
1458
|
-
} else if (ex instanceof GitError) {
|
|
1459
|
-
data = ex.stdout;
|
|
1460
|
-
} else {
|
|
1461
|
-
scope?.error(ex, 'Failed to execute merge-tree for conflict check');
|
|
1462
|
-
return { ok: false, reason: 'other' };
|
|
1463
|
-
}
|
|
1464
|
-
}
|
|
1465
|
-
|
|
1466
|
-
return { ok: true, result: parseMergeTreeConflict(data ?? '') };
|
|
1467
|
-
}
|
|
1468
|
-
|
|
1469
|
-
private async checkForPotentialConflicts(
|
|
1470
|
-
repoPath: string,
|
|
1471
|
-
commits: Iterable<{ sha: string; parent: string }>,
|
|
1472
|
-
targetBranch: string,
|
|
1473
|
-
cancellation?: AbortSignal,
|
|
1474
|
-
options?: { stopOnFirstConflict?: boolean },
|
|
1475
|
-
): Promise<ConflictDetectionResult> {
|
|
1476
|
-
const scope = getScopedLogger();
|
|
1477
|
-
|
|
1478
|
-
// Requires Git v2.38+ for --write-tree with 3-arg form
|
|
1479
|
-
if (!(await this.git.supports('git:merge-tree:write-tree'))) {
|
|
1480
|
-
return createConflictDetectionError('unsupported');
|
|
1481
|
-
}
|
|
1482
|
-
|
|
1483
|
-
let currentTreeOid: string;
|
|
1484
|
-
try {
|
|
1485
|
-
// Get the initial target branch tree OID
|
|
1486
|
-
const treeResult = await this.git.run(
|
|
1487
|
-
{ cwd: repoPath, cancellation: cancellation, errors: 'throw' },
|
|
1488
|
-
'rev-parse',
|
|
1489
|
-
`${targetBranch}^{tree}`,
|
|
1490
|
-
);
|
|
1491
|
-
currentTreeOid = treeResult.stdout.trim();
|
|
1492
|
-
} catch (ex) {
|
|
1493
|
-
if (isCancellationError(ex)) throw ex;
|
|
1494
|
-
|
|
1495
|
-
scope?.error(ex, `Failed to resolve target branch '${targetBranch}'`);
|
|
1496
|
-
return createConflictDetectionError('refNotFound');
|
|
1497
|
-
}
|
|
1498
|
-
|
|
1499
|
-
const conflictingShas: string[] = [];
|
|
1500
|
-
const conflictingFilePaths = new Set<string>();
|
|
1501
|
-
|
|
1502
|
-
for (const commit of commits) {
|
|
1503
|
-
if (cancellation?.aborted) throw new CancellationError();
|
|
1504
|
-
|
|
1505
|
-
// Use merge-tree --write-tree with --merge-base to simulate cherry-pick:
|
|
1506
|
-
// merge-tree --write-tree --merge-base=<commit-parent> <current-tree> <commit>
|
|
1507
|
-
// This performs a 3-way merge where:
|
|
1508
|
-
// - base = commit.parent (where the commit started)
|
|
1509
|
-
// - ours = currentTreeOid (current state of the target)
|
|
1510
|
-
// - theirs = commit.sha (what we're cherry-picking)
|
|
1511
|
-
const step = await this.runMergeTreeStep(repoPath, commit.parent, currentTreeOid, commit.sha, cancellation);
|
|
1512
|
-
if (!step.ok) return createConflictDetectionError(step.reason);
|
|
1513
|
-
|
|
1514
|
-
const mergeConflict = step.result;
|
|
1515
|
-
|
|
1516
|
-
if (mergeConflict.conflicts.length) {
|
|
1517
|
-
conflictingShas.push(commit.sha);
|
|
1518
|
-
for (const file of mergeConflict.conflicts) {
|
|
1519
|
-
conflictingFilePaths.add(file.path);
|
|
1520
|
-
}
|
|
1521
|
-
|
|
1522
|
-
if (options?.stopOnFirstConflict) {
|
|
1523
|
-
return {
|
|
1524
|
-
status: 'conflicts',
|
|
1525
|
-
conflict: {
|
|
1526
|
-
repoPath: repoPath,
|
|
1527
|
-
branch: commit.sha,
|
|
1528
|
-
target: targetBranch,
|
|
1529
|
-
files: mergeConflict.conflicts,
|
|
1530
|
-
shas: [commit.sha],
|
|
1531
|
-
},
|
|
1532
|
-
stoppedOnFirstConflict: true,
|
|
1533
|
-
treeOid: mergeConflict.treeOid || undefined,
|
|
1534
|
-
};
|
|
1535
|
-
}
|
|
1536
|
-
}
|
|
1537
|
-
|
|
1538
|
-
// Update currentTreeOid to the result tree OID for the next iteration
|
|
1539
|
-
// This works even when there are conflicts - the tree contains conflict markers
|
|
1540
|
-
if (mergeConflict.treeOid) {
|
|
1541
|
-
currentTreeOid = mergeConflict.treeOid;
|
|
1542
|
-
}
|
|
1543
|
-
}
|
|
1544
|
-
|
|
1545
|
-
if (conflictingShas.length) {
|
|
1546
|
-
return {
|
|
1547
|
-
status: 'conflicts',
|
|
1548
|
-
conflict: {
|
|
1549
|
-
repoPath: repoPath,
|
|
1550
|
-
branch: conflictingShas[0],
|
|
1551
|
-
target: targetBranch,
|
|
1552
|
-
files: Array.from(conflictingFilePaths, path => ({ path: path })),
|
|
1553
|
-
shas: conflictingShas,
|
|
1554
|
-
},
|
|
1555
|
-
stoppedOnFirstConflict: false,
|
|
1556
|
-
treeOid: currentTreeOid,
|
|
1557
|
-
};
|
|
1558
|
-
}
|
|
1559
|
-
|
|
1560
|
-
return { status: 'clean', treeOid: currentTreeOid };
|
|
1561
|
-
}
|
|
1562
|
-
|
|
1563
|
-
@debug({ exit: true })
|
|
1564
|
-
getBaseBranchName(
|
|
1565
|
-
repoPath: string,
|
|
1566
|
-
ref: string,
|
|
1567
|
-
options?: { priority?: GitCommandPriority },
|
|
1568
|
-
cancellation?: AbortSignal,
|
|
1569
|
-
): Promise<string | undefined> {
|
|
1570
|
-
const priority = options?.priority;
|
|
1571
|
-
const priorityOpts = priority != null ? { priority: priority } : undefined;
|
|
1572
|
-
|
|
1573
|
-
return this.cache.getBaseBranchName(
|
|
1574
|
-
repoPath,
|
|
1575
|
-
ref,
|
|
1576
|
-
async (commonPath, cacheable, signal) => {
|
|
1577
|
-
try {
|
|
1578
|
-
// getGkConfig has built-in fallback to regular config for backward compatibility
|
|
1579
|
-
let mergeBase = await this.provider.config.getGkConfig(commonPath, `branch.${ref}.gk-merge-base`);
|
|
1580
|
-
let update = false;
|
|
1581
|
-
|
|
1582
|
-
// Also check vscode-merge-base in regular config (VS Code compatibility)
|
|
1583
|
-
if (mergeBase == null) {
|
|
1584
|
-
mergeBase = await this.provider.config.getConfig(commonPath, `branch.${ref}.vscode-merge-base`);
|
|
1585
|
-
update = mergeBase != null;
|
|
1586
|
-
}
|
|
1587
|
-
|
|
1588
|
-
if (mergeBase != null) {
|
|
1589
|
-
const branch = await this.provider.refs.getSymbolicReferenceName(
|
|
1590
|
-
commonPath,
|
|
1591
|
-
mergeBase,
|
|
1592
|
-
priorityOpts,
|
|
1593
|
-
);
|
|
1594
|
-
if (branch != null) {
|
|
1595
|
-
if (update) {
|
|
1596
|
-
// Self-write: the value we're storing is exactly what this factory is
|
|
1597
|
-
// returning, so any in-flight `branchOverviews` or `baseBranchName` entry
|
|
1598
|
-
// being populated against this resolution should NOT be evicted.
|
|
1599
|
-
void this.storeBaseBranchName(commonPath, ref, branch, {
|
|
1600
|
-
skipInvalidation: ['branchOverviews', 'baseBranchName'],
|
|
1601
|
-
});
|
|
1602
|
-
}
|
|
1603
|
-
return branch;
|
|
1604
|
-
}
|
|
1605
|
-
}
|
|
1606
|
-
} catch {}
|
|
1607
|
-
|
|
1608
|
-
const reflog = await this.getBaseBranchFromReflog(
|
|
1609
|
-
commonPath,
|
|
1610
|
-
ref,
|
|
1611
|
-
{ upstream: true, priority: priority },
|
|
1612
|
-
signal,
|
|
1613
|
-
);
|
|
1614
|
-
if (reflog.branch != null) {
|
|
1615
|
-
// Self-write: see comment on the migration path above.
|
|
1616
|
-
void this.storeBaseBranchName(commonPath, ref, reflog.branch, {
|
|
1617
|
-
skipInvalidation: ['branchOverviews', 'baseBranchName'],
|
|
1618
|
-
});
|
|
1619
|
-
return reflog.branch;
|
|
1620
|
-
}
|
|
1621
|
-
|
|
1622
|
-
// This entry has no TTL and the `'branches'` cascade no longer clears it (a tip move can't
|
|
1623
|
-
// change a base), so a failed read cached as `undefined` would read as "no base branch" for
|
|
1624
|
-
// the rest of the session. Only a reflog that actually RAN and found nothing is an answer.
|
|
1625
|
-
if (reflog.failed) {
|
|
1626
|
-
cacheable.invalidate();
|
|
1627
|
-
}
|
|
1628
|
-
|
|
1629
|
-
return undefined;
|
|
1630
|
-
},
|
|
1631
|
-
cancellation,
|
|
1632
|
-
);
|
|
1633
|
-
}
|
|
1634
|
-
|
|
1635
|
-
/**
|
|
1636
|
-
* `failed` separates "the reflog ran and had no answer" from "the read never happened" — the caller
|
|
1637
|
-
* caches the former forever and must not cache the latter.
|
|
1638
|
-
*/
|
|
1639
|
-
private async getBaseBranchFromReflog(
|
|
1640
|
-
repoPath: string,
|
|
1641
|
-
ref: string,
|
|
1642
|
-
options?: { upstream: true; priority?: GitCommandPriority },
|
|
1643
|
-
cancellation?: AbortSignal,
|
|
1644
|
-
): Promise<{ branch: string | undefined; failed: boolean }> {
|
|
1645
|
-
const priority = options?.priority;
|
|
1646
|
-
const priorityOpts = priority != null ? { priority: priority } : undefined;
|
|
1647
|
-
|
|
1648
|
-
try {
|
|
1649
|
-
let result = await this.git.run(
|
|
1650
|
-
{ cwd: repoPath, cancellation: cancellation, ...priorityOpts },
|
|
1651
|
-
'reflog',
|
|
1652
|
-
ref,
|
|
1653
|
-
'--grep-reflog=branch: Created from *.',
|
|
1654
|
-
);
|
|
1655
|
-
|
|
1656
|
-
let entries = result.stdout.split('\n').filter(entry => Boolean(entry));
|
|
1657
|
-
if (entries.length !== 1) return { branch: undefined, failed: false };
|
|
1658
|
-
|
|
1659
|
-
// Check if branch created from an explicit branch
|
|
1660
|
-
let match = entries[0].match(/branch: Created from (.*)$/);
|
|
1661
|
-
if (match?.length === 2) {
|
|
1662
|
-
let name: string | undefined = match[1];
|
|
1663
|
-
if (name !== 'HEAD') {
|
|
1664
|
-
if (options?.upstream) {
|
|
1665
|
-
const upstream = await this.provider.refs.getSymbolicReferenceName(
|
|
1666
|
-
repoPath,
|
|
1667
|
-
`${name}@{u}`,
|
|
1668
|
-
priorityOpts,
|
|
1669
|
-
);
|
|
1670
|
-
if (upstream) return { branch: upstream, failed: false };
|
|
1671
|
-
}
|
|
1672
|
-
|
|
1673
|
-
name = await this.provider.refs.getSymbolicReferenceName(repoPath, name, priorityOpts);
|
|
1674
|
-
if (name) return { branch: name, failed: false };
|
|
1675
|
-
}
|
|
1676
|
-
}
|
|
1677
|
-
|
|
1678
|
-
// Check if branch was created from HEAD
|
|
1679
|
-
result = await this.git.run(
|
|
1680
|
-
{ cwd: repoPath, cancellation: cancellation, ...priorityOpts },
|
|
1681
|
-
'reflog',
|
|
1682
|
-
'HEAD',
|
|
1683
|
-
`--grep-reflog=checkout: moving from .* to ${ref.replace('refs/heads/', '')}`,
|
|
1684
|
-
);
|
|
1685
|
-
|
|
1686
|
-
entries = result.stdout.split('\n').filter(entry => Boolean(entry));
|
|
1687
|
-
if (!entries.length) return { branch: undefined, failed: false };
|
|
1688
|
-
|
|
1689
|
-
match = entries.at(-1)!.match(/checkout: moving from ([^\s]+)\s/);
|
|
1690
|
-
if (match?.length === 2) {
|
|
1691
|
-
let name: string | undefined = match[1];
|
|
1692
|
-
if (options?.upstream) {
|
|
1693
|
-
const upstream = await this.provider.refs.getSymbolicReferenceName(
|
|
1694
|
-
repoPath,
|
|
1695
|
-
`${name}@{u}`,
|
|
1696
|
-
priorityOpts,
|
|
1697
|
-
);
|
|
1698
|
-
if (upstream) return { branch: upstream, failed: false };
|
|
1699
|
-
}
|
|
1700
|
-
|
|
1701
|
-
name = await this.provider.refs.getSymbolicReferenceName(repoPath, name, priorityOpts);
|
|
1702
|
-
if (name) return { branch: name, failed: false };
|
|
1703
|
-
}
|
|
1704
|
-
} catch (ex) {
|
|
1705
|
-
if (isCancellationError(ex)) throw ex;
|
|
1706
|
-
|
|
1707
|
-
// The reads use default error handling, so a spawn failure, queue rejection or swallowed
|
|
1708
|
-
// `GitWarnings` match lands here rather than producing an empty answer.
|
|
1709
|
-
return { branch: undefined, failed: true };
|
|
1710
|
-
}
|
|
1711
|
-
|
|
1712
|
-
return { branch: undefined, failed: false };
|
|
1713
|
-
}
|
|
1714
|
-
|
|
1715
|
-
@debug({ exit: true })
|
|
1716
|
-
async getStoredMergeTargetBranchName(repoPath: string, ref: string): Promise<string | undefined> {
|
|
1717
|
-
const target =
|
|
1718
|
-
(await this.getStoredUserMergeTargetBranchName?.(repoPath, ref)) ??
|
|
1719
|
-
(await this.getStoredDetectedMergeTargetBranchName?.(repoPath, ref));
|
|
1720
|
-
return target?.trim() || undefined;
|
|
1721
|
-
}
|
|
1722
|
-
|
|
1723
|
-
@debug({ exit: true })
|
|
1724
|
-
async getStoredDetectedMergeTargetBranchName(repoPath: string, ref: string): Promise<string | undefined> {
|
|
1725
|
-
const target =
|
|
1726
|
-
(await this.provider.config.getGkConfig(repoPath, `branch.${ref}.gk-merge-target`)) ??
|
|
1727
|
-
(await this.provider.config.getGkConfig(repoPath, `branch.${ref}.gk-target-base`)); // legacy key
|
|
1728
|
-
return target?.trim() || undefined;
|
|
1729
|
-
}
|
|
1730
|
-
|
|
1731
|
-
@debug()
|
|
1732
|
-
async getStoredUserMergeTargetBranchName(repoPath: string, ref: string): Promise<string | undefined> {
|
|
1733
|
-
const target = await this.provider.config.getGkConfig(repoPath, `branch.${ref}.gk-merge-target-user`);
|
|
1734
|
-
return target?.trim() || undefined;
|
|
1735
|
-
}
|
|
1736
|
-
|
|
1737
|
-
/** Updates the last accessed timestamp for the current branch */
|
|
1738
|
-
@debounce(2.5 * 60 * 1000)
|
|
1739
|
-
@debug()
|
|
1740
|
-
async onCurrentBranchAccessed(repoPath: string): Promise<void> {
|
|
1741
|
-
const branch = await this.getBranch(repoPath);
|
|
1742
|
-
if (branch == null || branch.remote || branch.detached) return;
|
|
1743
|
-
|
|
1744
|
-
await this.storeBranchMetadata(repoPath, 'gk-last-accessed', branch.name, new Date());
|
|
1745
|
-
}
|
|
1746
|
-
|
|
1747
|
-
/** Updates the last accessed and modified timestamp for the current branch */
|
|
1748
|
-
@debounce(2.5 * 60 * 1000)
|
|
1749
|
-
@debug()
|
|
1750
|
-
async onCurrentBranchModified(repoPath: string): Promise<void> {
|
|
1751
|
-
const branch = await this.getBranch(repoPath);
|
|
1752
|
-
if (branch == null || branch.remote || branch.detached) return;
|
|
1753
|
-
|
|
1754
|
-
const now = new Date();
|
|
1755
|
-
await this.storeBranchMetadata(repoPath, 'gk-last-accessed', branch.name, now);
|
|
1756
|
-
await this.storeBranchMetadata(repoPath, 'gk-last-modified', branch.name, now);
|
|
1757
|
-
}
|
|
1758
|
-
|
|
1759
|
-
/** Updates the agent last activity timestamp for the current branch */
|
|
1760
|
-
@debounce(2.5 * 60 * 1000)
|
|
1761
|
-
@debug()
|
|
1762
|
-
async onCurrentBranchAgentActivity(repoPath: string): Promise<void> {
|
|
1763
|
-
const branch = await this.getBranch(repoPath);
|
|
1764
|
-
if (branch == null || branch.remote || branch.detached) return;
|
|
1765
|
-
|
|
1766
|
-
await this.storeBranchMetadata(repoPath, 'gk-agent-last-activity', branch.name, new Date());
|
|
1767
|
-
}
|
|
1768
|
-
|
|
1769
|
-
@debug()
|
|
1770
|
-
async renameBranch(repoPath: string, oldName: string, newName: string): Promise<void> {
|
|
1771
|
-
const args = ['branch', '-m', oldName, newName];
|
|
1772
|
-
try {
|
|
1773
|
-
await this.git.run({ cwd: repoPath }, ...args);
|
|
1774
|
-
// The branch keeps its identity across a rename, so move its stored gk metadata with it —
|
|
1775
|
-
// otherwise the new name re-derives a base it already had, and the old name is left holding
|
|
1776
|
-
// metadata for a branch that no longer exists under it.
|
|
1777
|
-
await this.provider.config.renameGkConfigBranchSection(repoPath, oldName, newName);
|
|
1778
|
-
// Old name's entry is now orphaned; the new name must not inherit a predecessor's base
|
|
1779
|
-
this.cache.deleteBaseBranchName(repoPath, oldName);
|
|
1780
|
-
this.cache.deleteBaseBranchName(repoPath, newName);
|
|
1781
|
-
this.context.hooks?.cache?.onReset?.(repoPath, 'branches');
|
|
1782
|
-
this.context.hooks?.repository?.onChanged?.(repoPath, ['heads']);
|
|
1783
|
-
} catch (ex) {
|
|
1784
|
-
throw getGitCommandError(
|
|
1785
|
-
'branch',
|
|
1786
|
-
ex,
|
|
1787
|
-
reason =>
|
|
1788
|
-
new BranchError(
|
|
1789
|
-
{
|
|
1790
|
-
reason: reason ?? 'other',
|
|
1791
|
-
action: 'rename',
|
|
1792
|
-
branch: oldName,
|
|
1793
|
-
gitCommand: { repoPath: repoPath, args: args },
|
|
1794
|
-
},
|
|
1795
|
-
ex,
|
|
1796
|
-
),
|
|
1797
|
-
);
|
|
1798
|
-
}
|
|
1799
|
-
}
|
|
1800
|
-
|
|
1801
|
-
@debug()
|
|
1802
|
-
async setUpstreamBranch(repoPath: string, name: string, upstream: string | undefined): Promise<void> {
|
|
1803
|
-
const args =
|
|
1804
|
-
upstream == null ? ['branch', '--unset-upstream', name] : ['branch', '--set-upstream-to', upstream, name];
|
|
1805
|
-
try {
|
|
1806
|
-
await this.git.run({ cwd: repoPath }, ...args);
|
|
1807
|
-
this.context.hooks?.cache?.onReset?.(repoPath, 'branches');
|
|
1808
|
-
this.context.hooks?.repository?.onChanged?.(repoPath, ['heads']);
|
|
1809
|
-
} catch (ex) {
|
|
1810
|
-
throw getGitCommandError(
|
|
1811
|
-
'branch',
|
|
1812
|
-
ex,
|
|
1813
|
-
reason =>
|
|
1814
|
-
new BranchError(
|
|
1815
|
-
{
|
|
1816
|
-
reason: reason ?? 'other',
|
|
1817
|
-
action: upstream == null ? 'unset upstream of' : `set upstream to '${upstream}' for`,
|
|
1818
|
-
branch: name,
|
|
1819
|
-
gitCommand: { repoPath: repoPath, args: args },
|
|
1820
|
-
},
|
|
1821
|
-
ex,
|
|
1822
|
-
),
|
|
1823
|
-
);
|
|
1824
|
-
}
|
|
1825
|
-
}
|
|
1826
|
-
|
|
1827
|
-
@debug()
|
|
1828
|
-
async storeBaseBranchName(
|
|
1829
|
-
repoPath: string,
|
|
1830
|
-
ref: string,
|
|
1831
|
-
base: string,
|
|
1832
|
-
options?: { skipInvalidation?: readonly GkConfigInvalidationTarget[] },
|
|
1833
|
-
): Promise<void> {
|
|
1834
|
-
await this.provider.config.setGkConfig(repoPath, `branch.${ref}.gk-merge-base`, base, options);
|
|
1835
|
-
}
|
|
1836
|
-
|
|
1837
|
-
@debug()
|
|
1838
|
-
async storeMergeTargetBranchName(
|
|
1839
|
-
repoPath: string,
|
|
1840
|
-
ref: string,
|
|
1841
|
-
target: string,
|
|
1842
|
-
options?: { skipInvalidation?: readonly GkConfigInvalidationTarget[] },
|
|
1843
|
-
): Promise<void> {
|
|
1844
|
-
await this.provider.config.setGkConfig(repoPath, `branch.${ref}.gk-merge-target`, target, options);
|
|
1845
|
-
}
|
|
1846
|
-
|
|
1847
|
-
@debug()
|
|
1848
|
-
async storeUserMergeTargetBranchName(repoPath: string, ref: string, target: string | undefined): Promise<void> {
|
|
1849
|
-
await this.provider.config.setGkConfig(repoPath, `branch.${ref}.gk-merge-target-user`, target);
|
|
1850
|
-
}
|
|
1851
|
-
|
|
1852
|
-
/**
|
|
1853
|
-
* Gets all branch metadata (dates and disposition) from git config in a single batch operation.
|
|
1854
|
-
* @returns A map of branch name to metadata.
|
|
1855
|
-
*/
|
|
1856
|
-
private getBranchMetadataMap(repoPath: string): Promise<Map<string, BranchMetadata>> {
|
|
1857
|
-
return this.cache.getBranchMetadataMap(repoPath, async commonPath => {
|
|
1858
|
-
const scope = getScopedLogger();
|
|
1859
|
-
const metadataMap = new Map<string, BranchMetadata>();
|
|
1860
|
-
|
|
1861
|
-
try {
|
|
1862
|
-
// Use git config --get-regexp to load all gk-* branch metadata in one call
|
|
1863
|
-
const configMap = await this.provider.config.getGkConfigRegex(
|
|
1864
|
-
commonPath,
|
|
1865
|
-
'^branch\\..*\\.gk-(last-(accessed|modified)|disposition|agent-last-activity)$',
|
|
1866
|
-
);
|
|
1867
|
-
if (!configMap.size) return metadataMap;
|
|
1868
|
-
|
|
1869
|
-
for (const [key, value] of configMap) {
|
|
1870
|
-
// Extract branch name and metadata key from "branch.{name}.gk-{key}"
|
|
1871
|
-
if (!key.startsWith('branch.')) continue;
|
|
1872
|
-
|
|
1873
|
-
const keyParts = key.split('.');
|
|
1874
|
-
if (keyParts.length < 3) continue;
|
|
1875
|
-
|
|
1876
|
-
// Branch name is everything between "branch." and the last ".gk-*"
|
|
1877
|
-
const metaKey = keyParts.at(-1);
|
|
1878
|
-
const branchName = keyParts.slice(1, -1).join('.');
|
|
1879
|
-
|
|
1880
|
-
let metadata = metadataMap.get(branchName);
|
|
1881
|
-
if (metadata == null) {
|
|
1882
|
-
metadata = {};
|
|
1883
|
-
metadataMap.set(branchName, metadata);
|
|
1884
|
-
}
|
|
1885
|
-
|
|
1886
|
-
if (metaKey === 'gk-last-accessed') {
|
|
1887
|
-
metadata.lastAccessedAt = value;
|
|
1888
|
-
} else if (metaKey === 'gk-last-modified') {
|
|
1889
|
-
metadata.lastModifiedAt = value;
|
|
1890
|
-
} else if (metaKey === 'gk-agent-last-activity') {
|
|
1891
|
-
metadata.agentLastActivityAt = value;
|
|
1892
|
-
} else if (metaKey === 'gk-disposition') {
|
|
1893
|
-
if (value === 'starred' || value === 'archived') {
|
|
1894
|
-
metadata.disposition = value;
|
|
1895
|
-
}
|
|
1896
|
-
}
|
|
1897
|
-
}
|
|
1898
|
-
} catch (ex) {
|
|
1899
|
-
debugger;
|
|
1900
|
-
scope?.error(ex);
|
|
1901
|
-
}
|
|
1902
|
-
|
|
1903
|
-
return metadataMap;
|
|
1904
|
-
});
|
|
1905
|
-
}
|
|
1906
|
-
|
|
1907
|
-
private async storeBranchMetadata(
|
|
1908
|
-
repoPath: string,
|
|
1909
|
-
key: 'gk-last-accessed' | 'gk-last-modified' | 'gk-agent-last-activity',
|
|
1910
|
-
ref: string,
|
|
1911
|
-
date: Date,
|
|
1912
|
-
): Promise<void> {
|
|
1913
|
-
const value = await this.provider.config.getGkConfig(repoPath, `branch.${ref}.${key}`);
|
|
1914
|
-
// Skip if incoming date is not at least 5 minutes newer than stored date
|
|
1915
|
-
if (value != null && date.getTime() - new Date(value).getTime() < dateMetadataStaleThresholdMs) {
|
|
1916
|
-
return;
|
|
1917
|
-
}
|
|
1918
|
-
|
|
1919
|
-
return this.provider.config.setGkConfig(repoPath, `branch.${ref}.${key}`, date.toISOString());
|
|
1920
|
-
}
|
|
1921
|
-
|
|
1922
|
-
async setBranchDisposition(
|
|
1923
|
-
repoPath: string,
|
|
1924
|
-
branchName: string,
|
|
1925
|
-
disposition: BranchDisposition | undefined,
|
|
1926
|
-
): Promise<void> {
|
|
1927
|
-
await this.provider.config.setGkConfig(repoPath, `branch.${branchName}.gk-disposition`, disposition);
|
|
1928
|
-
this.context.hooks?.cache?.onReset?.(repoPath, 'branches');
|
|
1929
|
-
this.context.hooks?.repository?.onChanged?.(repoPath, ['starred']);
|
|
1930
|
-
}
|
|
1931
|
-
}
|