@gitkraken/core-gitlens 0.1.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 +16 -0
- package/LICENSE +30 -0
- package/LICENSE.plus +40 -0
- package/README.md +54 -0
- package/dist/git/cache.d.ts +140 -0
- package/dist/git/cache.d.ts.map +1 -0
- package/dist/git/cache.js +765 -0
- package/dist/git/cache.js.map +1 -0
- package/dist/git/context.d.ts +238 -0
- package/dist/git/context.d.ts.map +1 -0
- package/dist/git/context.js +11 -0
- package/dist/git/context.js.map +1 -0
- package/dist/git/errors.d.ts +419 -0
- package/dist/git/errors.d.ts.map +1 -0
- package/dist/git/errors.js +681 -0
- package/dist/git/errors.js.map +1 -0
- package/dist/git/exec.types.d.ts +66 -0
- package/dist/git/exec.types.d.ts.map +1 -0
- package/dist/git/exec.types.js +2 -0
- package/dist/git/exec.types.js.map +1 -0
- package/dist/git/features.d.ts +8 -0
- package/dist/git/features.d.ts.map +1 -0
- package/dist/git/features.js +18 -0
- package/dist/git/features.js.map +1 -0
- package/dist/git/models/author.d.ts +17 -0
- package/dist/git/models/author.d.ts.map +1 -0
- package/dist/git/models/author.js +2 -0
- package/dist/git/models/author.js.map +1 -0
- package/dist/git/models/autolink.d.ts +51 -0
- package/dist/git/models/autolink.d.ts.map +1 -0
- package/dist/git/models/autolink.js +2 -0
- package/dist/git/models/autolink.js.map +1 -0
- package/dist/git/models/blame.d.ts +41 -0
- package/dist/git/models/blame.d.ts.map +1 -0
- package/dist/git/models/blame.js +2 -0
- package/dist/git/models/blame.js.map +1 -0
- package/dist/git/models/branch.d.ts +85 -0
- package/dist/git/models/branch.d.ts.map +1 -0
- package/dist/git/models/branch.js +174 -0
- package/dist/git/models/branch.js.map +1 -0
- package/dist/git/models/commit.d.ts +163 -0
- package/dist/git/models/commit.d.ts.map +1 -0
- package/dist/git/models/commit.js +496 -0
- package/dist/git/models/commit.js.map +1 -0
- package/dist/git/models/contributor.d.ts +40 -0
- package/dist/git/models/contributor.d.ts.map +1 -0
- package/dist/git/models/contributor.js +67 -0
- package/dist/git/models/contributor.js.map +1 -0
- package/dist/git/models/defaultBranch.d.ts +6 -0
- package/dist/git/models/defaultBranch.d.ts.map +1 -0
- package/dist/git/models/defaultBranch.js +2 -0
- package/dist/git/models/defaultBranch.js.map +1 -0
- package/dist/git/models/diff.d.ts +73 -0
- package/dist/git/models/diff.d.ts.map +1 -0
- package/dist/git/models/diff.js +2 -0
- package/dist/git/models/diff.js.map +1 -0
- package/dist/git/models/file.d.ts +23 -0
- package/dist/git/models/file.d.ts.map +1 -0
- package/dist/git/models/file.js +2 -0
- package/dist/git/models/file.js.map +1 -0
- package/dist/git/models/fileChange.d.ts +50 -0
- package/dist/git/models/fileChange.d.ts.map +1 -0
- package/dist/git/models/fileChange.js +69 -0
- package/dist/git/models/fileChange.js.map +1 -0
- package/dist/git/models/fileStatus.d.ts +33 -0
- package/dist/git/models/fileStatus.d.ts.map +1 -0
- package/dist/git/models/fileStatus.js +29 -0
- package/dist/git/models/fileStatus.js.map +1 -0
- package/dist/git/models/graph.d.ts +171 -0
- package/dist/git/models/graph.d.ts.map +1 -0
- package/dist/git/models/graph.js +2 -0
- package/dist/git/models/graph.js.map +1 -0
- package/dist/git/models/graphSearch.d.ts +48 -0
- package/dist/git/models/graphSearch.d.ts.map +1 -0
- package/dist/git/models/graphSearch.js +2 -0
- package/dist/git/models/graphSearch.js.map +1 -0
- package/dist/git/models/issue.d.ts +69 -0
- package/dist/git/models/issue.d.ts.map +1 -0
- package/dist/git/models/issue.js +68 -0
- package/dist/git/models/issue.js.map +1 -0
- package/dist/git/models/issueOrPullRequest.d.ts +19 -0
- package/dist/git/models/issueOrPullRequest.d.ts.map +1 -0
- package/dist/git/models/issueOrPullRequest.js +2 -0
- package/dist/git/models/issueOrPullRequest.js.map +1 -0
- package/dist/git/models/lineRange.d.ts +8 -0
- package/dist/git/models/lineRange.d.ts.map +1 -0
- package/dist/git/models/lineRange.js +2 -0
- package/dist/git/models/lineRange.js.map +1 -0
- package/dist/git/models/log.d.ts +19 -0
- package/dist/git/models/log.d.ts.map +1 -0
- package/dist/git/models/log.js +2 -0
- package/dist/git/models/log.js.map +1 -0
- package/dist/git/models/mergeConflicts.d.ts +23 -0
- package/dist/git/models/mergeConflicts.d.ts.map +1 -0
- package/dist/git/models/mergeConflicts.js +2 -0
- package/dist/git/models/mergeConflicts.js.map +1 -0
- package/dist/git/models/patch.d.ts +22 -0
- package/dist/git/models/patch.d.ts.map +1 -0
- package/dist/git/models/patch.js +2 -0
- package/dist/git/models/patch.js.map +1 -0
- package/dist/git/models/pausedOperationStatus.d.ts +52 -0
- package/dist/git/models/pausedOperationStatus.d.ts.map +1 -0
- package/dist/git/models/pausedOperationStatus.js +2 -0
- package/dist/git/models/pausedOperationStatus.js.map +1 -0
- package/dist/git/models/pullRequest.d.ts +125 -0
- package/dist/git/models/pullRequest.d.ts.map +1 -0
- package/dist/git/models/pullRequest.js +127 -0
- package/dist/git/models/pullRequest.js.map +1 -0
- package/dist/git/models/rebase.d.ts +51 -0
- package/dist/git/models/rebase.d.ts.map +1 -0
- package/dist/git/models/rebase.js +2 -0
- package/dist/git/models/rebase.js.map +1 -0
- package/dist/git/models/reference.d.ts +48 -0
- package/dist/git/models/reference.d.ts.map +1 -0
- package/dist/git/models/reference.js +2 -0
- package/dist/git/models/reference.js.map +1 -0
- package/dist/git/models/reflog.d.ts +33 -0
- package/dist/git/models/reflog.d.ts.map +1 -0
- package/dist/git/models/reflog.js +85 -0
- package/dist/git/models/reflog.js.map +1 -0
- package/dist/git/models/remote.d.ts +37 -0
- package/dist/git/models/remote.d.ts.map +1 -0
- package/dist/git/models/remote.js +98 -0
- package/dist/git/models/remote.js.map +1 -0
- package/dist/git/models/remoteProvider.d.ts +112 -0
- package/dist/git/models/remoteProvider.d.ts.map +1 -0
- package/dist/git/models/remoteProvider.js +154 -0
- package/dist/git/models/remoteProvider.js.map +1 -0
- package/dist/git/models/remoteResource.d.ts +78 -0
- package/dist/git/models/remoteResource.d.ts.map +1 -0
- package/dist/git/models/remoteResource.js +13 -0
- package/dist/git/models/remoteResource.js.map +1 -0
- package/dist/git/models/repository.d.ts +106 -0
- package/dist/git/models/repository.d.ts.map +1 -0
- package/dist/git/models/repository.js +324 -0
- package/dist/git/models/repository.js.map +1 -0
- package/dist/git/models/repositoryChangeEvent.d.ts +17 -0
- package/dist/git/models/repositoryChangeEvent.d.ts.map +1 -0
- package/dist/git/models/repositoryChangeEvent.js +26 -0
- package/dist/git/models/repositoryChangeEvent.js.map +1 -0
- package/dist/git/models/repositoryIdentities.d.ts +72 -0
- package/dist/git/models/repositoryIdentities.d.ts.map +1 -0
- package/dist/git/models/repositoryIdentities.js +7 -0
- package/dist/git/models/repositoryIdentities.js.map +1 -0
- package/dist/git/models/repositoryMetadata.d.ts +12 -0
- package/dist/git/models/repositoryMetadata.d.ts.map +1 -0
- package/dist/git/models/repositoryMetadata.js +2 -0
- package/dist/git/models/repositoryMetadata.js.map +1 -0
- package/dist/git/models/resourceDescriptor.d.ts +12 -0
- package/dist/git/models/resourceDescriptor.d.ts.map +1 -0
- package/dist/git/models/resourceDescriptor.js +2 -0
- package/dist/git/models/resourceDescriptor.js.map +1 -0
- package/dist/git/models/revision.d.ts +7 -0
- package/dist/git/models/revision.d.ts.map +1 -0
- package/dist/git/models/revision.js +6 -0
- package/dist/git/models/revision.js.map +1 -0
- package/dist/git/models/search.d.ts +66 -0
- package/dist/git/models/search.d.ts.map +1 -0
- package/dist/git/models/search.js +48 -0
- package/dist/git/models/search.js.map +1 -0
- package/dist/git/models/shortlog.d.ts +6 -0
- package/dist/git/models/shortlog.d.ts.map +1 -0
- package/dist/git/models/shortlog.js +2 -0
- package/dist/git/models/shortlog.js.map +1 -0
- package/dist/git/models/signature.d.ts +26 -0
- package/dist/git/models/signature.d.ts.map +1 -0
- package/dist/git/models/signature.js +2 -0
- package/dist/git/models/signature.js.map +1 -0
- package/dist/git/models/staging.d.ts +24 -0
- package/dist/git/models/staging.d.ts.map +1 -0
- package/dist/git/models/staging.js +2 -0
- package/dist/git/models/staging.js.map +1 -0
- package/dist/git/models/stash.d.ts +6 -0
- package/dist/git/models/stash.d.ts.map +1 -0
- package/dist/git/models/stash.js +2 -0
- package/dist/git/models/stash.js.map +1 -0
- package/dist/git/models/status.d.ts +55 -0
- package/dist/git/models/status.d.ts.map +1 -0
- package/dist/git/models/status.js +208 -0
- package/dist/git/models/status.js.map +1 -0
- package/dist/git/models/statusFile.d.ts +28 -0
- package/dist/git/models/statusFile.d.ts.map +1 -0
- package/dist/git/models/statusFile.js +114 -0
- package/dist/git/models/statusFile.js.map +1 -0
- package/dist/git/models/tag.d.ts +26 -0
- package/dist/git/models/tag.d.ts.map +1 -0
- package/dist/git/models/tag.js +73 -0
- package/dist/git/models/tag.js.map +1 -0
- package/dist/git/models/tree.d.ts +10 -0
- package/dist/git/models/tree.d.ts.map +1 -0
- package/dist/git/models/tree.js +2 -0
- package/dist/git/models/tree.js.map +1 -0
- package/dist/git/models/user.d.ts +7 -0
- package/dist/git/models/user.d.ts.map +1 -0
- package/dist/git/models/user.js +2 -0
- package/dist/git/models/user.js.map +1 -0
- package/dist/git/models/worktree.d.ts +51 -0
- package/dist/git/models/worktree.d.ts.map +1 -0
- package/dist/git/models/worktree.js +136 -0
- package/dist/git/models/worktree.js.map +1 -0
- package/dist/git/parsers/diffParser.d.ts +45 -0
- package/dist/git/parsers/diffParser.d.ts.map +1 -0
- package/dist/git/parsers/diffParser.js +628 -0
- package/dist/git/parsers/diffParser.js.map +1 -0
- package/dist/git/parsers/rebaseTodoParser.d.ts +15 -0
- package/dist/git/parsers/rebaseTodoParser.d.ts.map +1 -0
- package/dist/git/parsers/rebaseTodoParser.js +215 -0
- package/dist/git/parsers/rebaseTodoParser.js.map +1 -0
- package/dist/git/providers/blame.d.ts +15 -0
- package/dist/git/providers/blame.d.ts.map +1 -0
- package/dist/git/providers/blame.js +2 -0
- package/dist/git/providers/blame.js.map +1 -0
- package/dist/git/providers/branches.d.ts +80 -0
- package/dist/git/providers/branches.d.ts.map +1 -0
- package/dist/git/providers/branches.js +2 -0
- package/dist/git/providers/branches.js.map +1 -0
- package/dist/git/providers/commits.d.ts +102 -0
- package/dist/git/providers/commits.d.ts.map +1 -0
- package/dist/git/providers/commits.js +2 -0
- package/dist/git/providers/commits.js.map +1 -0
- package/dist/git/providers/config.d.ts +64 -0
- package/dist/git/providers/config.d.ts.map +1 -0
- package/dist/git/providers/config.js +2 -0
- package/dist/git/providers/config.js.map +1 -0
- package/dist/git/providers/contributors.d.ts +26 -0
- package/dist/git/providers/contributors.d.ts.map +1 -0
- package/dist/git/providers/contributors.js +2 -0
- package/dist/git/providers/contributors.js.map +1 -0
- package/dist/git/providers/diff.d.ts +73 -0
- package/dist/git/providers/diff.d.ts.map +1 -0
- package/dist/git/providers/diff.js +2 -0
- package/dist/git/providers/diff.js.map +1 -0
- package/dist/git/providers/graph.d.ts +20 -0
- package/dist/git/providers/graph.d.ts.map +1 -0
- package/dist/git/providers/graph.js +2 -0
- package/dist/git/providers/graph.js.map +1 -0
- package/dist/git/providers/operations.d.ts +65 -0
- package/dist/git/providers/operations.d.ts.map +1 -0
- package/dist/git/providers/operations.js +2 -0
- package/dist/git/providers/operations.js.map +1 -0
- package/dist/git/providers/patch.d.ts +27 -0
- package/dist/git/providers/patch.d.ts.map +1 -0
- package/dist/git/providers/patch.js +2 -0
- package/dist/git/providers/patch.js.map +1 -0
- package/dist/git/providers/pausedOperations.d.ts +11 -0
- package/dist/git/providers/pausedOperations.d.ts.map +1 -0
- package/dist/git/providers/pausedOperations.js +2 -0
- package/dist/git/providers/pausedOperations.js.map +1 -0
- package/dist/git/providers/provider.d.ts +57 -0
- package/dist/git/providers/provider.d.ts.map +1 -0
- package/dist/git/providers/provider.js +2 -0
- package/dist/git/providers/provider.js.map +1 -0
- package/dist/git/providers/refs.d.ts +22 -0
- package/dist/git/providers/refs.d.ts.map +1 -0
- package/dist/git/providers/refs.js +2 -0
- package/dist/git/providers/refs.js.map +1 -0
- package/dist/git/providers/remotes.d.ts +25 -0
- package/dist/git/providers/remotes.d.ts.map +1 -0
- package/dist/git/providers/remotes.js +2 -0
- package/dist/git/providers/remotes.js.map +1 -0
- package/dist/git/providers/revision.d.ts +28 -0
- package/dist/git/providers/revision.d.ts.map +1 -0
- package/dist/git/providers/revision.js +2 -0
- package/dist/git/providers/revision.js.map +1 -0
- package/dist/git/providers/shared/remotes.d.ts +25 -0
- package/dist/git/providers/shared/remotes.d.ts.map +1 -0
- package/dist/git/providers/shared/remotes.js +79 -0
- package/dist/git/providers/shared/remotes.js.map +1 -0
- package/dist/git/providers/staging.d.ts +22 -0
- package/dist/git/providers/staging.d.ts.map +1 -0
- package/dist/git/providers/staging.js +2 -0
- package/dist/git/providers/staging.js.map +1 -0
- package/dist/git/providers/stash.d.ts +41 -0
- package/dist/git/providers/stash.d.ts.map +1 -0
- package/dist/git/providers/stash.js +2 -0
- package/dist/git/providers/stash.js.map +1 -0
- package/dist/git/providers/status.d.ts +30 -0
- package/dist/git/providers/status.d.ts.map +1 -0
- package/dist/git/providers/status.js +2 -0
- package/dist/git/providers/status.js.map +1 -0
- package/dist/git/providers/tags.d.ts +18 -0
- package/dist/git/providers/tags.d.ts.map +1 -0
- package/dist/git/providers/tags.js +2 -0
- package/dist/git/providers/tags.js.map +1 -0
- package/dist/git/providers/types.d.ts +28 -0
- package/dist/git/providers/types.d.ts.map +1 -0
- package/dist/git/providers/types.js +2 -0
- package/dist/git/providers/types.js.map +1 -0
- package/dist/git/providers/worktrees.d.ts +23 -0
- package/dist/git/providers/worktrees.d.ts.map +1 -0
- package/dist/git/providers/worktrees.js +2 -0
- package/dist/git/providers/worktrees.js.map +1 -0
- package/dist/git/remotes/azure-devops.d.ts +43 -0
- package/dist/git/remotes/azure-devops.d.ts.map +1 -0
- package/dist/git/remotes/azure-devops.js +248 -0
- package/dist/git/remotes/azure-devops.js.map +1 -0
- package/dist/git/remotes/bitbucket-server.d.ts +32 -0
- package/dist/git/remotes/bitbucket-server.d.ts.map +1 -0
- package/dist/git/remotes/bitbucket-server.js +145 -0
- package/dist/git/remotes/bitbucket-server.js.map +1 -0
- package/dist/git/remotes/bitbucket.d.ts +29 -0
- package/dist/git/remotes/bitbucket.d.ts.map +1 -0
- package/dist/git/remotes/bitbucket.js +114 -0
- package/dist/git/remotes/bitbucket.js.map +1 -0
- package/dist/git/remotes/custom.d.ts +26 -0
- package/dist/git/remotes/custom.d.ts.map +1 -0
- package/dist/git/remotes/custom.js +111 -0
- package/dist/git/remotes/custom.js.map +1 -0
- package/dist/git/remotes/gerrit.d.ts +31 -0
- package/dist/git/remotes/gerrit.d.ts.map +1 -0
- package/dist/git/remotes/gerrit.js +146 -0
- package/dist/git/remotes/gerrit.js.map +1 -0
- package/dist/git/remotes/gitea.d.ts +30 -0
- package/dist/git/remotes/gitea.d.ts.map +1 -0
- package/dist/git/remotes/gitea.js +148 -0
- package/dist/git/remotes/gitea.js.map +1 -0
- package/dist/git/remotes/github.d.ts +41 -0
- package/dist/git/remotes/github.d.ts.map +1 -0
- package/dist/git/remotes/github.js +198 -0
- package/dist/git/remotes/github.js.map +1 -0
- package/dist/git/remotes/gitlab.d.ts +35 -0
- package/dist/git/remotes/gitlab.d.ts.map +1 -0
- package/dist/git/remotes/gitlab.js +232 -0
- package/dist/git/remotes/gitlab.js.map +1 -0
- package/dist/git/remotes/google-source.d.ts +17 -0
- package/dist/git/remotes/google-source.d.ts.map +1 -0
- package/dist/git/remotes/google-source.js +32 -0
- package/dist/git/remotes/google-source.js.map +1 -0
- package/dist/git/remotes/matcher.d.ts +35 -0
- package/dist/git/remotes/matcher.d.ts.map +1 -0
- package/dist/git/remotes/matcher.js +140 -0
- package/dist/git/remotes/matcher.js.map +1 -0
- package/dist/git/repositoryService.d.ts +127 -0
- package/dist/git/repositoryService.d.ts.map +1 -0
- package/dist/git/repositoryService.js +54 -0
- package/dist/git/repositoryService.js.map +1 -0
- package/dist/git/service.d.ts +112 -0
- package/dist/git/service.d.ts.map +1 -0
- package/dist/git/service.js +303 -0
- package/dist/git/service.js.map +1 -0
- package/dist/git/utils/autolink.utils.d.ts +13 -0
- package/dist/git/utils/autolink.utils.d.ts.map +1 -0
- package/dist/git/utils/autolink.utils.js +147 -0
- package/dist/git/utils/autolink.utils.js.map +1 -0
- package/dist/git/utils/blame.utils.d.ts +47 -0
- package/dist/git/utils/blame.utils.d.ts.map +1 -0
- package/dist/git/utils/blame.utils.js +239 -0
- package/dist/git/utils/blame.utils.js.map +1 -0
- package/dist/git/utils/branch.utils.d.ts +22 -0
- package/dist/git/utils/branch.utils.d.ts.map +1 -0
- package/dist/git/utils/branch.utils.js +122 -0
- package/dist/git/utils/branch.utils.js.map +1 -0
- package/dist/git/utils/commit.utils.d.ts +26 -0
- package/dist/git/utils/commit.utils.d.ts.map +1 -0
- package/dist/git/utils/commit.utils.js +54 -0
- package/dist/git/utils/commit.utils.js.map +1 -0
- package/dist/git/utils/contributor.utils.d.ts +15 -0
- package/dist/git/utils/contributor.utils.d.ts.map +1 -0
- package/dist/git/utils/contributor.utils.js +55 -0
- package/dist/git/utils/contributor.utils.js.map +1 -0
- package/dist/git/utils/fetch.utils.d.ts +20 -0
- package/dist/git/utils/fetch.utils.d.ts.map +1 -0
- package/dist/git/utils/fetch.utils.js +47 -0
- package/dist/git/utils/fetch.utils.js.map +1 -0
- package/dist/git/utils/fileStatus.utils.d.ts +24 -0
- package/dist/git/utils/fileStatus.utils.d.ts.map +1 -0
- package/dist/git/utils/fileStatus.utils.js +45 -0
- package/dist/git/utils/fileStatus.utils.js.map +1 -0
- package/dist/git/utils/issue.utils.d.ts +4 -0
- package/dist/git/utils/issue.utils.d.ts.map +1 -0
- package/dist/git/utils/issue.utils.js +76 -0
- package/dist/git/utils/issue.utils.js.map +1 -0
- package/dist/git/utils/issueOrPullRequest.utils.d.ts +3 -0
- package/dist/git/utils/issueOrPullRequest.utils.d.ts.map +1 -0
- package/dist/git/utils/issueOrPullRequest.utils.js +22 -0
- package/dist/git/utils/issueOrPullRequest.utils.js.map +1 -0
- package/dist/git/utils/mergeConflicts.utils.d.ts +3 -0
- package/dist/git/utils/mergeConflicts.utils.d.ts.map +1 -0
- package/dist/git/utils/mergeConflicts.utils.js +19 -0
- package/dist/git/utils/mergeConflicts.utils.js.map +1 -0
- package/dist/git/utils/pausedOperationStatus.utils.d.ts +58 -0
- package/dist/git/utils/pausedOperationStatus.utils.d.ts.map +1 -0
- package/dist/git/utils/pausedOperationStatus.utils.js +133 -0
- package/dist/git/utils/pausedOperationStatus.utils.js.map +1 -0
- package/dist/git/utils/pullRequest.utils.d.ts +12 -0
- package/dist/git/utils/pullRequest.utils.d.ts.map +1 -0
- package/dist/git/utils/pullRequest.utils.js +124 -0
- package/dist/git/utils/pullRequest.utils.js.map +1 -0
- package/dist/git/utils/rebase.utils.d.ts +19 -0
- package/dist/git/utils/rebase.utils.d.ts.map +1 -0
- package/dist/git/utils/rebase.utils.js +93 -0
- package/dist/git/utils/rebase.utils.js.map +1 -0
- package/dist/git/utils/reference.utils.d.ts +56 -0
- package/dist/git/utils/reference.utils.d.ts.map +1 -0
- package/dist/git/utils/reference.utils.js +191 -0
- package/dist/git/utils/reference.utils.js.map +1 -0
- package/dist/git/utils/remote.utils.d.ts +17 -0
- package/dist/git/utils/remote.utils.d.ts.map +1 -0
- package/dist/git/utils/remote.utils.js +124 -0
- package/dist/git/utils/remote.utils.js.map +1 -0
- package/dist/git/utils/repository.utils.d.ts +5 -0
- package/dist/git/utils/repository.utils.d.ts.map +1 -0
- package/dist/git/utils/repository.utils.js +15 -0
- package/dist/git/utils/repository.utils.js.map +1 -0
- package/dist/git/utils/resourceDescriptor.utils.d.ts +4 -0
- package/dist/git/utils/resourceDescriptor.utils.d.ts.map +1 -0
- package/dist/git/utils/resourceDescriptor.utils.js +17 -0
- package/dist/git/utils/resourceDescriptor.utils.js.map +1 -0
- package/dist/git/utils/revision.utils.d.ts +36 -0
- package/dist/git/utils/revision.utils.d.ts.map +1 -0
- package/dist/git/utils/revision.utils.js +114 -0
- package/dist/git/utils/revision.utils.js.map +1 -0
- package/dist/git/utils/search.utils.d.ts +15 -0
- package/dist/git/utils/search.utils.d.ts.map +1 -0
- package/dist/git/utils/search.utils.js +422 -0
- package/dist/git/utils/search.utils.js.map +1 -0
- package/dist/git/utils/sorting.d.ts +34 -0
- package/dist/git/utils/sorting.d.ts.map +1 -0
- package/dist/git/utils/sorting.js +203 -0
- package/dist/git/utils/sorting.js.map +1 -0
- package/dist/git/utils/status.utils.d.ts +20 -0
- package/dist/git/utils/status.utils.d.ts.map +1 -0
- package/dist/git/utils/status.utils.js +82 -0
- package/dist/git/utils/status.utils.js.map +1 -0
- package/dist/git/utils/statusFile.utils.d.ts +8 -0
- package/dist/git/utils/statusFile.utils.d.ts.map +1 -0
- package/dist/git/utils/statusFile.utils.js +76 -0
- package/dist/git/utils/statusFile.utils.js.map +1 -0
- package/dist/git/utils/tag.utils.d.ts +7 -0
- package/dist/git/utils/tag.utils.d.ts.map +1 -0
- package/dist/git/utils/tag.utils.js +13 -0
- package/dist/git/utils/tag.utils.js.map +1 -0
- package/dist/git/utils/tooltip.utils.d.ts +14 -0
- package/dist/git/utils/tooltip.utils.d.ts.map +1 -0
- package/dist/git/utils/tooltip.utils.js +29 -0
- package/dist/git/utils/tooltip.utils.js.map +1 -0
- package/dist/git/utils/uriAuthority.d.ts +16 -0
- package/dist/git/utils/uriAuthority.d.ts.map +1 -0
- package/dist/git/utils/uriAuthority.js +20 -0
- package/dist/git/utils/uriAuthority.js.map +1 -0
- package/dist/git/utils/user.utils.d.ts +3 -0
- package/dist/git/utils/user.utils.d.ts.map +1 -0
- package/dist/git/utils/user.utils.js +12 -0
- package/dist/git/utils/user.utils.js.map +1 -0
- package/dist/git/utils/worktree.utils.d.ts +7 -0
- package/dist/git/utils/worktree.utils.d.ts.map +1 -0
- package/dist/git/utils/worktree.utils.js +15 -0
- package/dist/git/utils/worktree.utils.js.map +1 -0
- package/dist/git/watching/changeEvent.d.ts +47 -0
- package/dist/git/watching/changeEvent.d.ts.map +1 -0
- package/dist/git/watching/changeEvent.js +69 -0
- package/dist/git/watching/changeEvent.js.map +1 -0
- package/dist/git/watching/classifyChange.d.ts +16 -0
- package/dist/git/watching/classifyChange.d.ts.map +1 -0
- package/dist/git/watching/classifyChange.js +61 -0
- package/dist/git/watching/classifyChange.js.map +1 -0
- package/dist/git/watching/gitIgnoreFilter.d.ts +58 -0
- package/dist/git/watching/gitIgnoreFilter.d.ts.map +1 -0
- package/dist/git/watching/gitIgnoreFilter.js +109 -0
- package/dist/git/watching/gitIgnoreFilter.js.map +1 -0
- package/dist/git/watching/initWatcher.d.ts +33 -0
- package/dist/git/watching/initWatcher.d.ts.map +1 -0
- package/dist/git/watching/initWatcher.js +59 -0
- package/dist/git/watching/initWatcher.js.map +1 -0
- package/dist/git/watching/provider.d.ts +23 -0
- package/dist/git/watching/provider.d.ts.map +1 -0
- package/dist/git/watching/provider.js +2 -0
- package/dist/git/watching/provider.js.map +1 -0
- package/dist/git/watching/watchGroup.d.ts +54 -0
- package/dist/git/watching/watchGroup.d.ts.map +1 -0
- package/dist/git/watching/watchGroup.js +139 -0
- package/dist/git/watching/watchGroup.js.map +1 -0
- package/dist/git/watching/watchService.d.ts +79 -0
- package/dist/git/watching/watchService.d.ts.map +1 -0
- package/dist/git/watching/watchService.js +282 -0
- package/dist/git/watching/watchService.js.map +1 -0
- package/dist/git/watching/watchSession.d.ts +118 -0
- package/dist/git/watching/watchSession.d.ts.map +1 -0
- package/dist/git/watching/watchSession.js +274 -0
- package/dist/git/watching/watchSession.js.map +1 -0
- package/dist/git/watching/watcherPatterns.d.ts +21 -0
- package/dist/git/watching/watcherPatterns.d.ts.map +1 -0
- package/dist/git/watching/watcherPatterns.js +36 -0
- package/dist/git/watching/watcherPatterns.js.map +1 -0
- package/dist/git-cli/cliGitProvider.d.ts +133 -0
- package/dist/git-cli/cliGitProvider.d.ts.map +1 -0
- package/dist/git-cli/cliGitProvider.js +273 -0
- package/dist/git-cli/cliGitProvider.js.map +1 -0
- package/dist/git-cli/exec/exec.d.ts +4 -0
- package/dist/git-cli/exec/exec.d.ts.map +1 -0
- package/dist/git-cli/exec/exec.errors.d.ts +2 -0
- package/dist/git-cli/exec/exec.errors.d.ts.map +1 -0
- package/dist/git-cli/exec/exec.errors.js +2 -0
- package/dist/git-cli/exec/exec.errors.js.map +1 -0
- package/dist/git-cli/exec/exec.js +3 -0
- package/dist/git-cli/exec/exec.js.map +1 -0
- package/dist/git-cli/exec/exec.types.d.ts +2 -0
- package/dist/git-cli/exec/exec.types.d.ts.map +1 -0
- package/dist/git-cli/exec/exec.types.js +2 -0
- package/dist/git-cli/exec/exec.types.js.map +1 -0
- package/dist/git-cli/exec/features.d.ts +3 -0
- package/dist/git-cli/exec/features.d.ts.map +1 -0
- package/dist/git-cli/exec/features.js +2 -0
- package/dist/git-cli/exec/features.js.map +1 -0
- package/dist/git-cli/exec/git.d.ts +228 -0
- package/dist/git-cli/exec/git.d.ts.map +1 -0
- package/dist/git-cli/exec/git.js +823 -0
- package/dist/git-cli/exec/git.js.map +1 -0
- package/dist/git-cli/exec/gitQueue.d.ts +68 -0
- package/dist/git-cli/exec/gitQueue.d.ts.map +1 -0
- package/dist/git-cli/exec/gitQueue.js +207 -0
- package/dist/git-cli/exec/gitQueue.js.map +1 -0
- package/dist/git-cli/exec/locator.d.ts +14 -0
- package/dist/git-cli/exec/locator.d.ts.map +1 -0
- package/dist/git-cli/exec/locator.js +133 -0
- package/dist/git-cli/exec/locator.js.map +1 -0
- package/dist/git-cli/parsers/blameParser.d.ts +30 -0
- package/dist/git-cli/parsers/blameParser.d.ts.map +1 -0
- package/dist/git-cli/parsers/blameParser.js +339 -0
- package/dist/git-cli/parsers/blameParser.js.map +1 -0
- package/dist/git-cli/parsers/indexParser.d.ts +4 -0
- package/dist/git-cli/parsers/indexParser.d.ts.map +1 -0
- package/dist/git-cli/parsers/indexParser.js +226 -0
- package/dist/git-cli/parsers/indexParser.js.map +1 -0
- package/dist/git-cli/parsers/logParser.d.ts +178 -0
- package/dist/git-cli/parsers/logParser.d.ts.map +1 -0
- package/dist/git-cli/parsers/logParser.js +1166 -0
- package/dist/git-cli/parsers/logParser.js.map +1 -0
- package/dist/git-cli/parsers/mergeTreeParser.d.ts +7 -0
- package/dist/git-cli/parsers/mergeTreeParser.d.ts.map +1 -0
- package/dist/git-cli/parsers/mergeTreeParser.js +74 -0
- package/dist/git-cli/parsers/mergeTreeParser.js.map +1 -0
- package/dist/git-cli/parsers/refParser.d.ts +34 -0
- package/dist/git-cli/parsers/refParser.d.ts.map +1 -0
- package/dist/git-cli/parsers/refParser.js +148 -0
- package/dist/git-cli/parsers/refParser.js.map +1 -0
- package/dist/git-cli/parsers/reflogParser.d.ts +12 -0
- package/dist/git-cli/parsers/reflogParser.d.ts.map +1 -0
- package/dist/git-cli/parsers/reflogParser.js +181 -0
- package/dist/git-cli/parsers/reflogParser.js.map +1 -0
- package/dist/git-cli/parsers/remoteParser.d.ts +4 -0
- package/dist/git-cli/parsers/remoteParser.d.ts.map +1 -0
- package/dist/git-cli/parsers/remoteParser.js +128 -0
- package/dist/git-cli/parsers/remoteParser.js.map +1 -0
- package/dist/git-cli/parsers/shortlogParser.d.ts +4 -0
- package/dist/git-cli/parsers/shortlogParser.d.ts.map +1 -0
- package/dist/git-cli/parsers/shortlogParser.js +51 -0
- package/dist/git-cli/parsers/shortlogParser.js.map +1 -0
- package/dist/git-cli/parsers/signatureParser.d.ts +21 -0
- package/dist/git-cli/parsers/signatureParser.d.ts.map +1 -0
- package/dist/git-cli/parsers/signatureParser.js +139 -0
- package/dist/git-cli/parsers/signatureParser.js.map +1 -0
- package/dist/git-cli/parsers/statusParser.d.ts +4 -0
- package/dist/git-cli/parsers/statusParser.d.ts.map +1 -0
- package/dist/git-cli/parsers/statusParser.js +216 -0
- package/dist/git-cli/parsers/statusParser.js.map +1 -0
- package/dist/git-cli/parsers/treeParser.d.ts +3 -0
- package/dist/git-cli/parsers/treeParser.d.ts.map +1 -0
- package/dist/git-cli/parsers/treeParser.js +110 -0
- package/dist/git-cli/parsers/treeParser.js.map +1 -0
- package/dist/git-cli/parsers/worktreeParser.d.ts +5 -0
- package/dist/git-cli/parsers/worktreeParser.d.ts.map +1 -0
- package/dist/git-cli/parsers/worktreeParser.js +136 -0
- package/dist/git-cli/parsers/worktreeParser.js.map +1 -0
- package/dist/git-cli/providers/blame.d.ts +26 -0
- package/dist/git-cli/providers/blame.d.ts.map +1 -0
- package/dist/git-cli/providers/blame.js +426 -0
- package/dist/git-cli/providers/blame.js.map +1 -0
- package/dist/git-cli/providers/branches.d.ts +87 -0
- package/dist/git-cli/providers/branches.d.ts.map +1 -0
- package/dist/git-cli/providers/branches.js +1153 -0
- package/dist/git-cli/providers/branches.js.map +1 -0
- package/dist/git-cli/providers/commitFilesetUtils.d.ts +4 -0
- package/dist/git-cli/providers/commitFilesetUtils.d.ts.map +1 -0
- package/dist/git-cli/providers/commitFilesetUtils.js +20 -0
- package/dist/git-cli/providers/commitFilesetUtils.js.map +1 -0
- package/dist/git-cli/providers/commits.d.ts +49 -0
- package/dist/git-cli/providers/commits.d.ts.map +1 -0
- package/dist/git-cli/providers/commits.js +1151 -0
- package/dist/git-cli/providers/commits.js.map +1 -0
- package/dist/git-cli/providers/config.d.ts +74 -0
- package/dist/git-cli/providers/config.d.ts.map +1 -0
- package/dist/git-cli/providers/config.js +588 -0
- package/dist/git-cli/providers/config.js.map +1 -0
- package/dist/git-cli/providers/contributors.d.ts +31 -0
- package/dist/git-cli/providers/contributors.d.ts.map +1 -0
- package/dist/git-cli/providers/contributors.js +350 -0
- package/dist/git-cli/providers/contributors.js.map +1 -0
- package/dist/git-cli/providers/diff.d.ts +99 -0
- package/dist/git-cli/providers/diff.d.ts.map +1 -0
- package/dist/git-cli/providers/diff.js +786 -0
- package/dist/git-cli/providers/diff.js.map +1 -0
- package/dist/git-cli/providers/graph.d.ts +31 -0
- package/dist/git-cli/providers/graph.d.ts.map +1 -0
- package/dist/git-cli/providers/graph.js +703 -0
- package/dist/git-cli/providers/graph.js.map +1 -0
- package/dist/git-cli/providers/operations.d.ts +75 -0
- package/dist/git-cli/providers/operations.d.ts.map +1 -0
- package/dist/git-cli/providers/operations.js +564 -0
- package/dist/git-cli/providers/operations.js.map +1 -0
- package/dist/git-cli/providers/patch.d.ts +38 -0
- package/dist/git-cli/providers/patch.d.ts.map +1 -0
- package/dist/git-cli/providers/patch.js +324 -0
- package/dist/git-cli/providers/patch.js.map +1 -0
- package/dist/git-cli/providers/pausedOperations.d.ts +22 -0
- package/dist/git-cli/providers/pausedOperations.d.ts.map +1 -0
- package/dist/git-cli/providers/pausedOperations.js +411 -0
- package/dist/git-cli/providers/pausedOperations.js.map +1 -0
- package/dist/git-cli/providers/refs.d.ts +32 -0
- package/dist/git-cli/providers/refs.d.ts.map +1 -0
- package/dist/git-cli/providers/refs.js +149 -0
- package/dist/git-cli/providers/refs.js.map +1 -0
- package/dist/git-cli/providers/remotes.d.ts +24 -0
- package/dist/git-cli/providers/remotes.d.ts.map +1 -0
- package/dist/git-cli/providers/remotes.js +94 -0
- package/dist/git-cli/providers/remotes.js.map +1 -0
- package/dist/git-cli/providers/revision.d.ts +27 -0
- package/dist/git-cli/providers/revision.d.ts.map +1 -0
- package/dist/git-cli/providers/revision.js +269 -0
- package/dist/git-cli/providers/revision.js.map +1 -0
- package/dist/git-cli/providers/staging.d.ts +24 -0
- package/dist/git-cli/providers/staging.d.ts.map +1 -0
- package/dist/git-cli/providers/staging.js +138 -0
- package/dist/git-cli/providers/staging.js.map +1 -0
- package/dist/git-cli/providers/stash.d.ts +55 -0
- package/dist/git-cli/providers/stash.d.ts.map +1 -0
- package/dist/git-cli/providers/stash.js +430 -0
- package/dist/git-cli/providers/stash.js.map +1 -0
- package/dist/git-cli/providers/status.d.ts +38 -0
- package/dist/git-cli/providers/status.d.ts.map +1 -0
- package/dist/git-cli/providers/status.js +352 -0
- package/dist/git-cli/providers/status.js.map +1 -0
- package/dist/git-cli/providers/tags.d.ts +29 -0
- package/dist/git-cli/providers/tags.d.ts.map +1 -0
- package/dist/git-cli/providers/tags.js +190 -0
- package/dist/git-cli/providers/tags.js.map +1 -0
- package/dist/git-cli/providers/worktrees.d.ts +33 -0
- package/dist/git-cli/providers/worktrees.d.ts.map +1 -0
- package/dist/git-cli/providers/worktrees.js +175 -0
- package/dist/git-cli/providers/worktrees.js.map +1 -0
- package/dist/git-cli/service.d.ts +52 -0
- package/dist/git-cli/service.d.ts.map +1 -0
- package/dist/git-cli/service.js +35 -0
- package/dist/git-cli/service.js.map +1 -0
- package/dist/plus/ai/constants.d.ts +21 -0
- package/dist/plus/ai/constants.d.ts.map +1 -0
- package/dist/plus/ai/constants.js +99 -0
- package/dist/plus/ai/constants.js.map +1 -0
- package/dist/plus/ai/errors.d.ts +25 -0
- package/dist/plus/ai/errors.d.ts.map +1 -0
- package/dist/plus/ai/errors.js +76 -0
- package/dist/plus/ai/errors.js.map +1 -0
- package/dist/plus/ai/models/conversation.d.ts +12 -0
- package/dist/plus/ai/models/conversation.d.ts.map +1 -0
- package/dist/plus/ai/models/conversation.js +27 -0
- package/dist/plus/ai/models/conversation.js.map +1 -0
- package/dist/plus/ai/models/model.d.ts +34 -0
- package/dist/plus/ai/models/model.d.ts.map +1 -0
- package/dist/plus/ai/models/model.js +379 -0
- package/dist/plus/ai/models/model.js.map +1 -0
- package/dist/plus/ai/models/promptTemplates.d.ts +74 -0
- package/dist/plus/ai/models/promptTemplates.d.ts.map +1 -0
- package/dist/plus/ai/models/promptTemplates.js +2 -0
- package/dist/plus/ai/models/promptTemplates.js.map +1 -0
- package/dist/plus/ai/models/provider.d.ts +46 -0
- package/dist/plus/ai/models/provider.d.ts.map +1 -0
- package/dist/plus/ai/models/provider.js +2 -0
- package/dist/plus/ai/models/provider.js.map +1 -0
- package/dist/plus/ai/models/results.d.ts +5 -0
- package/dist/plus/ai/models/results.d.ts.map +1 -0
- package/dist/plus/ai/models/results.js +2 -0
- package/dist/plus/ai/models/results.js.map +1 -0
- package/dist/plus/ai/prompts.d.ts +13 -0
- package/dist/plus/ai/prompts.d.ts.map +1 -0
- package/dist/plus/ai/prompts.js +517 -0
- package/dist/plus/ai/prompts.js.map +1 -0
- package/dist/plus/ai/providers/anthropicProvider.d.ts +21 -0
- package/dist/plus/ai/providers/anthropicProvider.d.ts.map +1 -0
- package/dist/plus/ai/providers/anthropicProvider.js +257 -0
- package/dist/plus/ai/providers/anthropicProvider.js.map +1 -0
- package/dist/plus/ai/providers/azureProvider.d.ts +18 -0
- package/dist/plus/ai/providers/azureProvider.d.ts.map +1 -0
- package/dist/plus/ai/providers/azureProvider.js +54 -0
- package/dist/plus/ai/providers/azureProvider.js.map +1 -0
- package/dist/plus/ai/providers/context.d.ts +23 -0
- package/dist/plus/ai/providers/context.d.ts.map +1 -0
- package/dist/plus/ai/providers/context.js +2 -0
- package/dist/plus/ai/providers/context.js.map +1 -0
- package/dist/plus/ai/providers/deepSeekProvider.d.ts +15 -0
- package/dist/plus/ai/providers/deepSeekProvider.d.ts.map +1 -0
- package/dist/plus/ai/providers/deepSeekProvider.js +35 -0
- package/dist/plus/ai/providers/deepSeekProvider.js.map +1 -0
- package/dist/plus/ai/providers/geminiProvider.d.ts +15 -0
- package/dist/plus/ai/providers/geminiProvider.d.ts.map +1 -0
- package/dist/plus/ai/providers/geminiProvider.js +195 -0
- package/dist/plus/ai/providers/geminiProvider.js.map +1 -0
- package/dist/plus/ai/providers/githubModelsProvider.d.ts +19 -0
- package/dist/plus/ai/providers/githubModelsProvider.d.ts.map +1 -0
- package/dist/plus/ai/providers/githubModelsProvider.js +51 -0
- package/dist/plus/ai/providers/githubModelsProvider.js.map +1 -0
- package/dist/plus/ai/providers/gitkrakenProvider.d.ts +18 -0
- package/dist/plus/ai/providers/gitkrakenProvider.d.ts.map +1 -0
- package/dist/plus/ai/providers/gitkrakenProvider.js +151 -0
- package/dist/plus/ai/providers/gitkrakenProvider.js.map +1 -0
- package/dist/plus/ai/providers/huggingFaceProvider.d.ts +15 -0
- package/dist/plus/ai/providers/huggingFaceProvider.d.ts.map +1 -0
- package/dist/plus/ai/providers/huggingFaceProvider.js +39 -0
- package/dist/plus/ai/providers/huggingFaceProvider.js.map +1 -0
- package/dist/plus/ai/providers/mistralProvider.d.ts +20 -0
- package/dist/plus/ai/providers/mistralProvider.d.ts.map +1 -0
- package/dist/plus/ai/providers/mistralProvider.js +118 -0
- package/dist/plus/ai/providers/mistralProvider.js.map +1 -0
- package/dist/plus/ai/providers/ollamaProvider.d.ts +25 -0
- package/dist/plus/ai/providers/ollamaProvider.d.ts.map +1 -0
- package/dist/plus/ai/providers/ollamaProvider.js +155 -0
- package/dist/plus/ai/providers/ollamaProvider.js.map +1 -0
- package/dist/plus/ai/providers/openAICompatibleProvider.d.ts +17 -0
- package/dist/plus/ai/providers/openAICompatibleProvider.d.ts.map +1 -0
- package/dist/plus/ai/providers/openAICompatibleProvider.js +47 -0
- package/dist/plus/ai/providers/openAICompatibleProvider.js.map +1 -0
- package/dist/plus/ai/providers/openAICompatibleProviderBase.d.ts +39 -0
- package/dist/plus/ai/providers/openAICompatibleProviderBase.d.ts.map +1 -0
- package/dist/plus/ai/providers/openAICompatibleProviderBase.js +218 -0
- package/dist/plus/ai/providers/openAICompatibleProviderBase.js.map +1 -0
- package/dist/plus/ai/providers/openRouterProvider.d.ts +17 -0
- package/dist/plus/ai/providers/openRouterProvider.d.ts.map +1 -0
- package/dist/plus/ai/providers/openRouterProvider.js +57 -0
- package/dist/plus/ai/providers/openRouterProvider.js.map +1 -0
- package/dist/plus/ai/providers/openaiProvider.d.ts +16 -0
- package/dist/plus/ai/providers/openaiProvider.d.ts.map +1 -0
- package/dist/plus/ai/providers/openaiProvider.js +34 -0
- package/dist/plus/ai/providers/openaiProvider.js.map +1 -0
- package/dist/plus/ai/providers/xaiProvider.d.ts +15 -0
- package/dist/plus/ai/providers/xaiProvider.d.ts.map +1 -0
- package/dist/plus/ai/providers/xaiProvider.js +27 -0
- package/dist/plus/ai/providers/xaiProvider.js.map +1 -0
- package/dist/plus/ai/utils/ai.utils.d.ts +18 -0
- package/dist/plus/ai/utils/ai.utils.d.ts.map +1 -0
- package/dist/plus/ai/utils/ai.utils.js +70 -0
- package/dist/plus/ai/utils/ai.utils.js.map +1 -0
- package/dist/plus/ai/utils/results.utils.d.ts +9 -0
- package/dist/plus/ai/utils/results.utils.d.ts.map +1 -0
- package/dist/plus/ai/utils/results.utils.js +44 -0
- package/dist/plus/ai/utils/results.utils.js.map +1 -0
- package/dist/plus/ai/utils/truncation.utils.d.ts +13 -0
- package/dist/plus/ai/utils/truncation.utils.d.ts.map +1 -0
- package/dist/plus/ai/utils/truncation.utils.js +228 -0
- package/dist/plus/ai/utils/truncation.utils.js.map +1 -0
- package/dist/plus/git-github/api/config.d.ts +66 -0
- package/dist/plus/git-github/api/config.d.ts.map +1 -0
- package/dist/plus/git-github/api/config.js +2 -0
- package/dist/plus/git-github/api/config.js.map +1 -0
- package/dist/plus/git-github/api/github.d.ts +178 -0
- package/dist/plus/git-github/api/github.d.ts.map +1 -0
- package/dist/plus/git-github/api/github.js +2360 -0
- package/dist/plus/git-github/api/github.js.map +1 -0
- package/dist/plus/git-github/api/github.utils.d.ts +9 -0
- package/dist/plus/git-github/api/github.utils.d.ts.map +1 -0
- package/dist/plus/git-github/api/github.utils.js +22 -0
- package/dist/plus/git-github/api/github.utils.js.map +1 -0
- package/dist/plus/git-github/api/token.d.ts +16 -0
- package/dist/plus/git-github/api/token.d.ts.map +1 -0
- package/dist/plus/git-github/api/token.js +2 -0
- package/dist/plus/git-github/api/token.js.map +1 -0
- package/dist/plus/git-github/api/tokenUtils.d.ts +7 -0
- package/dist/plus/git-github/api/tokenUtils.d.ts.map +1 -0
- package/dist/plus/git-github/api/tokenUtils.js +13 -0
- package/dist/plus/git-github/api/tokenUtils.js.map +1 -0
- package/dist/plus/git-github/api/types.d.ts +100 -0
- package/dist/plus/git-github/api/types.d.ts.map +1 -0
- package/dist/plus/git-github/api/types.js +2 -0
- package/dist/plus/git-github/api/types.js.map +1 -0
- package/dist/plus/git-github/context.d.ts +102 -0
- package/dist/plus/git-github/context.d.ts.map +1 -0
- package/dist/plus/git-github/context.js +12 -0
- package/dist/plus/git-github/context.js.map +1 -0
- package/dist/plus/git-github/models.d.ts +204 -0
- package/dist/plus/git-github/models.d.ts.map +1 -0
- package/dist/plus/git-github/models.js +229 -0
- package/dist/plus/git-github/models.js.map +1 -0
- package/dist/plus/git-github/providers/github/blame.d.ts +34 -0
- package/dist/plus/git-github/providers/github/blame.d.ts.map +1 -0
- package/dist/plus/git-github/providers/github/blame.js +155 -0
- package/dist/plus/git-github/providers/github/blame.js.map +1 -0
- package/dist/plus/git-github/providers/github/branches.d.ts +38 -0
- package/dist/plus/git-github/providers/github/branches.d.ts.map +1 -0
- package/dist/plus/git-github/providers/github/branches.js +234 -0
- package/dist/plus/git-github/providers/github/branches.js.map +1 -0
- package/dist/plus/git-github/providers/github/commits.d.ts +36 -0
- package/dist/plus/git-github/providers/github/commits.d.ts.map +1 -0
- package/dist/plus/git-github/providers/github/commits.js +560 -0
- package/dist/plus/git-github/providers/github/commits.js.map +1 -0
- package/dist/plus/git-github/providers/github/config.d.ts +11 -0
- package/dist/plus/git-github/providers/github/config.d.ts.map +1 -0
- package/dist/plus/git-github/providers/github/config.js +47 -0
- package/dist/plus/git-github/providers/github/config.js.map +1 -0
- package/dist/plus/git-github/providers/github/contributors.d.ts +27 -0
- package/dist/plus/git-github/providers/github/contributors.d.ts.map +1 -0
- package/dist/plus/git-github/providers/github/contributors.js +218 -0
- package/dist/plus/git-github/providers/github/contributors.js.map +1 -0
- package/dist/plus/git-github/providers/github/diff.d.ts +33 -0
- package/dist/plus/git-github/providers/github/diff.d.ts.map +1 -0
- package/dist/plus/git-github/providers/github/diff.js +184 -0
- package/dist/plus/git-github/providers/github/diff.js.map +1 -0
- package/dist/plus/git-github/providers/github/graph.d.ts +25 -0
- package/dist/plus/git-github/providers/github/graph.d.ts.map +1 -0
- package/dist/plus/git-github/providers/github/graph.js +372 -0
- package/dist/plus/git-github/providers/github/graph.js.map +1 -0
- package/dist/plus/git-github/providers/github/refs.d.ts +26 -0
- package/dist/plus/git-github/providers/github/refs.d.ts.map +1 -0
- package/dist/plus/git-github/providers/github/refs.js +108 -0
- package/dist/plus/git-github/providers/github/refs.js.map +1 -0
- package/dist/plus/git-github/providers/github/remotes.d.ts +9 -0
- package/dist/plus/git-github/providers/github/remotes.d.ts.map +1 -0
- package/dist/plus/git-github/providers/github/remotes.js +37 -0
- package/dist/plus/git-github/providers/github/remotes.js.map +1 -0
- package/dist/plus/git-github/providers/github/revision.d.ts +14 -0
- package/dist/plus/git-github/providers/github/revision.d.ts.map +1 -0
- package/dist/plus/git-github/providers/github/revision.js +132 -0
- package/dist/plus/git-github/providers/github/revision.js.map +1 -0
- package/dist/plus/git-github/providers/github/status.d.ts +21 -0
- package/dist/plus/git-github/providers/github/status.d.ts.map +1 -0
- package/dist/plus/git-github/providers/github/status.js +49 -0
- package/dist/plus/git-github/providers/github/status.js.map +1 -0
- package/dist/plus/git-github/providers/github/tags.d.ts +22 -0
- package/dist/plus/git-github/providers/github/tags.d.ts.map +1 -0
- package/dist/plus/git-github/providers/github/tags.js +104 -0
- package/dist/plus/git-github/providers/github/tags.js.map +1 -0
- package/dist/plus/git-github/providers/githubGitProvider.d.ts +85 -0
- package/dist/plus/git-github/providers/githubGitProvider.d.ts.map +1 -0
- package/dist/plus/git-github/providers/githubGitProvider.js +130 -0
- package/dist/plus/git-github/providers/githubGitProvider.js.map +1 -0
- package/dist/plus/git-github/providers/githubProvider.d.ts +55 -0
- package/dist/plus/git-github/providers/githubProvider.d.ts.map +1 -0
- package/dist/plus/git-github/providers/githubProvider.js +2 -0
- package/dist/plus/git-github/providers/githubProvider.js.map +1 -0
- package/dist/utils/array.d.ts +27 -0
- package/dist/utils/array.d.ts.map +1 -0
- package/dist/utils/array.js +142 -0
- package/dist/utils/array.js.map +1 -0
- package/dist/utils/base64.d.ts +2 -0
- package/dist/utils/base64.d.ts.map +1 -0
- package/dist/utils/base64.js +2 -0
- package/dist/utils/base64.js.map +1 -0
- package/dist/utils/brand.d.ts +11 -0
- package/dist/utils/brand.d.ts.map +1 -0
- package/dist/utils/brand.js +2 -0
- package/dist/utils/brand.js.map +1 -0
- package/dist/utils/cancellation.d.ts +54 -0
- package/dist/utils/cancellation.d.ts.map +1 -0
- package/dist/utils/cancellation.js +133 -0
- package/dist/utils/cancellation.js.map +1 -0
- package/dist/utils/charCode.d.ts +39 -0
- package/dist/utils/charCode.d.ts.map +1 -0
- package/dist/utils/charCode.js +39 -0
- package/dist/utils/charCode.js.map +1 -0
- package/dist/utils/color.d.ts +177 -0
- package/dist/utils/color.d.ts.map +1 -0
- package/dist/utils/color.js +693 -0
- package/dist/utils/color.js.map +1 -0
- package/dist/utils/counter.d.ts +7 -0
- package/dist/utils/counter.d.ts.map +1 -0
- package/dist/utils/counter.js +19 -0
- package/dist/utils/counter.js.map +1 -0
- package/dist/utils/crypto.d.ts +2 -0
- package/dist/utils/crypto.d.ts.map +1 -0
- package/dist/utils/crypto.js +2 -0
- package/dist/utils/crypto.js.map +1 -0
- package/dist/utils/date.d.ts +20 -0
- package/dist/utils/date.d.ts.map +1 -0
- package/dist/utils/date.js +313 -0
- package/dist/utils/date.js.map +1 -0
- package/dist/utils/debounce.d.ts +108 -0
- package/dist/utils/debounce.d.ts.map +1 -0
- package/dist/utils/debounce.js +209 -0
- package/dist/utils/debounce.js.map +1 -0
- package/dist/utils/decorators/debounce.d.ts +3 -0
- package/dist/utils/decorators/debounce.d.ts.map +1 -0
- package/dist/utils/decorators/debounce.js +21 -0
- package/dist/utils/decorators/debounce.js.map +1 -0
- package/dist/utils/decorators/gate.d.ts +15 -0
- package/dist/utils/decorators/gate.d.ts.map +1 -0
- package/dist/utils/decorators/gate.js +129 -0
- package/dist/utils/decorators/gate.js.map +1 -0
- package/dist/utils/decorators/log.d.ts +46 -0
- package/dist/utils/decorators/log.d.ts.map +1 -0
- package/dist/utils/decorators/log.js +238 -0
- package/dist/utils/decorators/log.js.map +1 -0
- package/dist/utils/decorators/memoize.d.ts +17 -0
- package/dist/utils/decorators/memoize.d.ts.map +1 -0
- package/dist/utils/decorators/memoize.js +63 -0
- package/dist/utils/decorators/memoize.js.map +1 -0
- package/dist/utils/decorators/resolver.d.ts +12 -0
- package/dist/utils/decorators/resolver.d.ts.map +1 -0
- package/dist/utils/decorators/resolver.js +85 -0
- package/dist/utils/decorators/resolver.js.map +1 -0
- package/dist/utils/decorators/sequentialize.d.ts +29 -0
- package/dist/utils/decorators/sequentialize.d.ts.map +1 -0
- package/dist/utils/decorators/sequentialize.js +81 -0
- package/dist/utils/decorators/sequentialize.js.map +1 -0
- package/dist/utils/decorators/serializable.d.ts +13 -0
- package/dist/utils/decorators/serializable.d.ts.map +1 -0
- package/dist/utils/decorators/serializable.js +42 -0
- package/dist/utils/decorators/serializable.js.map +1 -0
- package/dist/utils/disposable.d.ts +40 -0
- package/dist/utils/disposable.d.ts.map +1 -0
- package/dist/utils/disposable.js +87 -0
- package/dist/utils/disposable.js.map +1 -0
- package/dist/utils/encoding.d.ts +3 -0
- package/dist/utils/encoding.d.ts.map +1 -0
- package/dist/utils/encoding.js +7 -0
- package/dist/utils/encoding.js.map +1 -0
- package/dist/utils/env/browser/base64.d.ts +9 -0
- package/dist/utils/env/browser/base64.d.ts.map +1 -0
- package/dist/utils/env/browser/base64.js +42 -0
- package/dist/utils/env/browser/base64.js.map +1 -0
- package/dist/utils/env/browser/crypto.d.ts +5 -0
- package/dist/utils/env/browser/crypto.d.ts.map +1 -0
- package/dist/utils/env/browser/crypto.js +18 -0
- package/dist/utils/env/browser/crypto.js.map +1 -0
- package/dist/utils/env/browser/fs.d.ts +2 -0
- package/dist/utils/env/browser/fs.d.ts.map +1 -0
- package/dist/utils/env/browser/fs.js +4 -0
- package/dist/utils/env/browser/fs.js.map +1 -0
- package/dist/utils/env/browser/hex.d.ts +4 -0
- package/dist/utils/env/browser/hex.d.ts.map +1 -0
- package/dist/utils/env/browser/hex.js +38 -0
- package/dist/utils/env/browser/hex.js.map +1 -0
- package/dist/utils/env/browser/hrtime.d.ts +2 -0
- package/dist/utils/env/browser/hrtime.d.ts.map +1 -0
- package/dist/utils/env/browser/hrtime.js +15 -0
- package/dist/utils/env/browser/hrtime.js.map +1 -0
- package/dist/utils/env/browser/logScope.d.ts +25 -0
- package/dist/utils/env/browser/logScope.d.ts.map +1 -0
- package/dist/utils/env/browser/logScope.js +53 -0
- package/dist/utils/env/browser/logScope.js.map +1 -0
- package/dist/utils/env/browser/md5.d.ts +2 -0
- package/dist/utils/env/browser/md5.d.ts.map +1 -0
- package/dist/utils/env/browser/md5.js +199 -0
- package/dist/utils/env/browser/md5.js.map +1 -0
- package/dist/utils/env/browser/platform.d.ts +4 -0
- package/dist/utils/env/browser/platform.d.ts.map +1 -0
- package/dist/utils/env/browser/platform.js +6 -0
- package/dist/utils/env/browser/platform.js.map +1 -0
- package/dist/utils/env/node/base64.d.ts +9 -0
- package/dist/utils/env/node/base64.d.ts.map +1 -0
- package/dist/utils/env/node/base64.js +14 -0
- package/dist/utils/env/node/base64.js.map +1 -0
- package/dist/utils/env/node/crypto.d.ts +5 -0
- package/dist/utils/env/node/crypto.d.ts.map +1 -0
- package/dist/utils/env/node/crypto.js +14 -0
- package/dist/utils/env/node/crypto.js.map +1 -0
- package/dist/utils/env/node/exec.d.ts +89 -0
- package/dist/utils/env/node/exec.d.ts.map +1 -0
- package/dist/utils/env/node/exec.js +277 -0
- package/dist/utils/env/node/exec.js.map +1 -0
- package/dist/utils/env/node/fs.d.ts +2 -0
- package/dist/utils/env/node/fs.d.ts.map +1 -0
- package/dist/utils/env/node/fs.js +5 -0
- package/dist/utils/env/node/fs.js.map +1 -0
- package/dist/utils/env/node/hex.d.ts +4 -0
- package/dist/utils/env/node/hex.d.ts.map +1 -0
- package/dist/utils/env/node/hex.js +10 -0
- package/dist/utils/env/node/hex.js.map +1 -0
- package/dist/utils/env/node/hrtime.d.ts +2 -0
- package/dist/utils/env/node/hrtime.d.ts.map +1 -0
- package/dist/utils/env/node/hrtime.js +2 -0
- package/dist/utils/env/node/hrtime.js.map +1 -0
- package/dist/utils/env/node/logScope.d.ts +34 -0
- package/dist/utils/env/node/logScope.d.ts.map +1 -0
- package/dist/utils/env/node/logScope.js +52 -0
- package/dist/utils/env/node/logScope.js.map +1 -0
- package/dist/utils/env/node/platform.d.ts +4 -0
- package/dist/utils/env/node/platform.d.ts.map +1 -0
- package/dist/utils/env/node/platform.js +5 -0
- package/dist/utils/env/node/platform.js.map +1 -0
- package/dist/utils/error.d.ts +18 -0
- package/dist/utils/error.d.ts.map +1 -0
- package/dist/utils/error.js +19 -0
- package/dist/utils/error.js.map +1 -0
- package/dist/utils/event.d.ts +59 -0
- package/dist/utils/event.d.ts.map +1 -0
- package/dist/utils/event.js +183 -0
- package/dist/utils/event.js.map +1 -0
- package/dist/utils/formatter.d.ts +21 -0
- package/dist/utils/formatter.d.ts.map +1 -0
- package/dist/utils/formatter.js +139 -0
- package/dist/utils/formatter.js.map +1 -0
- package/dist/utils/fs.d.ts +2 -0
- package/dist/utils/fs.d.ts.map +1 -0
- package/dist/utils/fs.js +2 -0
- package/dist/utils/fs.js.map +1 -0
- package/dist/utils/function.d.ts +24 -0
- package/dist/utils/function.d.ts.map +1 -0
- package/dist/utils/function.js +103 -0
- package/dist/utils/function.js.map +1 -0
- package/dist/utils/fuzzy.d.ts +68 -0
- package/dist/utils/fuzzy.d.ts.map +1 -0
- package/dist/utils/fuzzy.js +134 -0
- package/dist/utils/fuzzy.js.map +1 -0
- package/dist/utils/hash.d.ts +32 -0
- package/dist/utils/hash.d.ts.map +1 -0
- package/dist/utils/hash.js +53 -0
- package/dist/utils/hash.js.map +1 -0
- package/dist/utils/hex.d.ts +2 -0
- package/dist/utils/hex.d.ts.map +1 -0
- package/dist/utils/hex.js +2 -0
- package/dist/utils/hex.js.map +1 -0
- package/dist/utils/hrtime.d.ts +4 -0
- package/dist/utils/hrtime.d.ts.map +1 -0
- package/dist/utils/hrtime.js +7 -0
- package/dist/utils/hrtime.js.map +1 -0
- package/dist/utils/iterable.d.ts +65 -0
- package/dist/utils/iterable.d.ts.map +1 -0
- package/dist/utils/iterable.js +635 -0
- package/dist/utils/iterable.js.map +1 -0
- package/dist/utils/lazy.d.ts +18 -0
- package/dist/utils/lazy.d.ts.map +1 -0
- package/dist/utils/lazy.js +40 -0
- package/dist/utils/lazy.js.map +1 -0
- package/dist/utils/loggable.d.ts +5 -0
- package/dist/utils/loggable.d.ts.map +1 -0
- package/dist/utils/loggable.js +4 -0
- package/dist/utils/loggable.js.map +1 -0
- package/dist/utils/logger.d.ts +63 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +316 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/utils/logger.scoped.d.ts +56 -0
- package/dist/utils/logger.scoped.d.ts.map +1 -0
- package/dist/utils/logger.scoped.js +166 -0
- package/dist/utils/logger.scoped.js.map +1 -0
- package/dist/utils/markdown.d.ts +9 -0
- package/dist/utils/markdown.d.ts.map +1 -0
- package/dist/utils/markdown.js +100 -0
- package/dist/utils/markdown.js.map +1 -0
- package/dist/utils/mru.d.ts +14 -0
- package/dist/utils/mru.d.ts.map +1 -0
- package/dist/utils/mru.js +63 -0
- package/dist/utils/mru.js.map +1 -0
- package/dist/utils/object.d.ts +62 -0
- package/dist/utils/object.d.ts.map +1 -0
- package/dist/utils/object.js +151 -0
- package/dist/utils/object.js.map +1 -0
- package/dist/utils/paging.d.ts +19 -0
- package/dist/utils/paging.d.ts.map +1 -0
- package/dist/utils/paging.js +32 -0
- package/dist/utils/paging.js.map +1 -0
- package/dist/utils/path.d.ts +17 -0
- package/dist/utils/path.d.ts.map +1 -0
- package/dist/utils/path.js +156 -0
- package/dist/utils/path.js.map +1 -0
- package/dist/utils/platform.d.ts +2 -0
- package/dist/utils/platform.d.ts.map +1 -0
- package/dist/utils/platform.js +2 -0
- package/dist/utils/platform.js.map +1 -0
- package/dist/utils/promise.d.ts +61 -0
- package/dist/utils/promise.d.ts.map +1 -0
- package/dist/utils/promise.js +337 -0
- package/dist/utils/promise.js.map +1 -0
- package/dist/utils/promiseCache.d.ts +337 -0
- package/dist/utils/promiseCache.d.ts.map +1 -0
- package/dist/utils/promiseCache.js +634 -0
- package/dist/utils/promiseCache.js.map +1 -0
- package/dist/utils/searchTree.d.ts +58 -0
- package/dist/utils/searchTree.d.ts.map +1 -0
- package/dist/utils/searchTree.js +394 -0
- package/dist/utils/searchTree.js.map +1 -0
- package/dist/utils/stopwatch.d.ts +41 -0
- package/dist/utils/stopwatch.d.ts.map +1 -0
- package/dist/utils/stopwatch.js +83 -0
- package/dist/utils/stopwatch.js.map +1 -0
- package/dist/utils/string.d.ts +91 -0
- package/dist/utils/string.d.ts.map +1 -0
- package/dist/utils/string.js +803 -0
- package/dist/utils/string.js.map +1 -0
- package/dist/utils/subscriptionManager.d.ts +18 -0
- package/dist/utils/subscriptionManager.d.ts.map +1 -0
- package/dist/utils/subscriptionManager.js +34 -0
- package/dist/utils/subscriptionManager.js.map +1 -0
- package/dist/utils/trie.d.ts +76 -0
- package/dist/utils/trie.d.ts.map +1 -0
- package/dist/utils/trie.js +584 -0
- package/dist/utils/trie.js.map +1 -0
- package/dist/utils/types.d.ts +21 -0
- package/dist/utils/types.d.ts.map +1 -0
- package/dist/utils/types.js +2 -0
- package/dist/utils/types.js.map +1 -0
- package/dist/utils/uri.d.ts +69 -0
- package/dist/utils/uri.d.ts.map +1 -0
- package/dist/utils/uri.js +66 -0
- package/dist/utils/uri.js.map +1 -0
- package/dist/utils/validation.d.ts +14 -0
- package/dist/utils/validation.d.ts.map +1 -0
- package/dist/utils/validation.js +26 -0
- package/dist/utils/validation.js.map +1 -0
- package/dist/utils/version.d.ts +15 -0
- package/dist/utils/version.d.ts.map +1 -0
- package/dist/utils/version.js +66 -0
- package/dist/utils/version.js.map +1 -0
- package/package.json +161 -0
- package/src/git/cache.ts +1152 -0
- package/src/git/context.ts +248 -0
- package/src/git/errors.ts +1121 -0
- package/src/git/exec.types.ts +78 -0
- package/src/git/features.ts +45 -0
- package/src/git/models/author.ts +19 -0
- package/src/git/models/autolink.ts +59 -0
- package/src/git/models/blame.ts +46 -0
- package/src/git/models/branch.ts +236 -0
- package/src/git/models/commit.ts +688 -0
- package/src/git/models/contributor.ts +84 -0
- package/src/git/models/defaultBranch.ts +6 -0
- package/src/git/models/diff.ts +74 -0
- package/src/git/models/file.ts +29 -0
- package/src/git/models/fileChange.ts +82 -0
- package/src/git/models/fileStatus.ts +35 -0
- package/src/git/models/graph.ts +184 -0
- package/src/git/models/graphSearch.ts +53 -0
- package/src/git/models/issue.ts +88 -0
- package/src/git/models/issueOrPullRequest.ts +20 -0
- package/src/git/models/lineRange.ts +7 -0
- package/src/git/models/log.ts +21 -0
- package/src/git/models/mergeConflicts.ts +18 -0
- package/src/git/models/patch.ts +25 -0
- package/src/git/models/pausedOperationStatus.ts +63 -0
- package/src/git/models/pullRequest.ts +161 -0
- package/src/git/models/rebase.ts +60 -0
- package/src/git/models/reference.ts +47 -0
- package/src/git/models/reflog.ts +88 -0
- package/src/git/models/remote.ts +99 -0
- package/src/git/models/remoteProvider.ts +290 -0
- package/src/git/models/remoteResource.ts +87 -0
- package/src/git/models/repository.ts +417 -0
- package/src/git/models/repositoryChangeEvent.ts +30 -0
- package/src/git/models/repositoryIdentities.ts +99 -0
- package/src/git/models/repositoryMetadata.ts +12 -0
- package/src/git/models/resourceDescriptor.ts +11 -0
- package/src/git/models/revision.ts +12 -0
- package/src/git/models/search.ts +123 -0
- package/src/git/models/shortlog.ts +6 -0
- package/src/git/models/signature.ts +29 -0
- package/src/git/models/staging.ts +27 -0
- package/src/git/models/stash.ts +6 -0
- package/src/git/models/status.ts +246 -0
- package/src/git/models/statusFile.ts +116 -0
- package/src/git/models/tag.ts +71 -0
- package/src/git/models/tree.ts +10 -0
- package/src/git/models/user.ts +7 -0
- package/src/git/models/worktree.ts +152 -0
- package/src/git/parsers/diffParser.ts +660 -0
- package/src/git/parsers/rebaseTodoParser.ts +169 -0
- package/src/git/providers/blame.ts +40 -0
- package/src/git/providers/branches.ts +111 -0
- package/src/git/providers/commits.ts +147 -0
- package/src/git/providers/config.ts +104 -0
- package/src/git/providers/contributors.ts +34 -0
- package/src/git/providers/diff.ts +127 -0
- package/src/git/providers/graph.ts +30 -0
- package/src/git/providers/operations.ts +82 -0
- package/src/git/providers/patch.ts +31 -0
- package/src/git/providers/pausedOperations.ts +10 -0
- package/src/git/providers/provider.ts +62 -0
- package/src/git/providers/refs.ts +39 -0
- package/src/git/providers/remotes.ts +33 -0
- package/src/git/providers/revision.ts +28 -0
- package/src/git/providers/shared/remotes.ts +95 -0
- package/src/git/providers/staging.ts +22 -0
- package/src/git/providers/stash.ts +51 -0
- package/src/git/providers/status.ts +42 -0
- package/src/git/providers/tags.ts +28 -0
- package/src/git/providers/types.ts +33 -0
- package/src/git/providers/worktrees.ts +23 -0
- package/src/git/remotes/azure-devops.ts +309 -0
- package/src/git/remotes/bitbucket-server.ts +191 -0
- package/src/git/remotes/bitbucket.ts +144 -0
- package/src/git/remotes/custom.ts +139 -0
- package/src/git/remotes/gerrit.ts +188 -0
- package/src/git/remotes/gitea.ts +186 -0
- package/src/git/remotes/github.ts +238 -0
- package/src/git/remotes/gitlab.ts +272 -0
- package/src/git/remotes/google-source.ts +51 -0
- package/src/git/remotes/matcher.ts +215 -0
- package/src/git/repositoryService.ts +179 -0
- package/src/git/service.ts +365 -0
- package/src/git/utils/autolink.utils.ts +201 -0
- package/src/git/utils/blame.utils.ts +296 -0
- package/src/git/utils/branch.utils.ts +154 -0
- package/src/git/utils/commit.utils.ts +89 -0
- package/src/git/utils/contributor.utils.ts +81 -0
- package/src/git/utils/fetch.utils.ts +48 -0
- package/src/git/utils/fileStatus.utils.ts +49 -0
- package/src/git/utils/issue.utils.ts +81 -0
- package/src/git/utils/issueOrPullRequest.utils.ts +23 -0
- package/src/git/utils/mergeConflicts.utils.ts +21 -0
- package/src/git/utils/pausedOperationStatus.utils.ts +156 -0
- package/src/git/utils/pullRequest.utils.ts +149 -0
- package/src/git/utils/rebase.utils.ts +128 -0
- package/src/git/utils/reference.utils.ts +267 -0
- package/src/git/utils/remote.utils.ts +140 -0
- package/src/git/utils/repository.utils.ts +18 -0
- package/src/git/utils/resourceDescriptor.utils.ts +26 -0
- package/src/git/utils/revision.utils.ts +149 -0
- package/src/git/utils/search.utils.ts +498 -0
- package/src/git/utils/sorting.ts +291 -0
- package/src/git/utils/status.utils.ts +114 -0
- package/src/git/utils/statusFile.utils.ts +182 -0
- package/src/git/utils/tag.utils.ts +17 -0
- package/src/git/utils/tooltip.utils.ts +37 -0
- package/src/git/utils/uriAuthority.ts +34 -0
- package/src/git/utils/user.utils.ts +20 -0
- package/src/git/utils/worktree.utils.ts +21 -0
- package/src/git/watching/changeEvent.ts +90 -0
- package/src/git/watching/classifyChange.ts +81 -0
- package/src/git/watching/gitIgnoreFilter.ts +134 -0
- package/src/git/watching/initWatcher.ts +79 -0
- package/src/git/watching/provider.ts +24 -0
- package/src/git/watching/watchGroup.ts +182 -0
- package/src/git/watching/watchService.ts +350 -0
- package/src/git/watching/watchSession.ts +370 -0
- package/src/git/watching/watcherPatterns.ts +51 -0
- package/src/git-cli/cliGitProvider.ts +436 -0
- package/src/git-cli/exec/exec.errors.ts +1 -0
- package/src/git-cli/exec/exec.ts +11 -0
- package/src/git-cli/exec/exec.types.ts +8 -0
- package/src/git-cli/exec/features.ts +2 -0
- package/src/git-cli/exec/git.ts +1092 -0
- package/src/git-cli/exec/gitQueue.ts +251 -0
- package/src/git-cli/exec/locator.ts +157 -0
- package/src/git-cli/parsers/blameParser.ts +373 -0
- package/src/git-cli/parsers/indexParser.ts +192 -0
- package/src/git-cli/parsers/logParser.ts +1275 -0
- package/src/git-cli/parsers/mergeTreeParser.ts +22 -0
- package/src/git-cli/parsers/refParser.ts +111 -0
- package/src/git-cli/parsers/reflogParser.ts +153 -0
- package/src/git-cli/parsers/remoteParser.ts +95 -0
- package/src/git-cli/parsers/shortlogParser.ts +59 -0
- package/src/git-cli/parsers/signatureParser.ts +162 -0
- package/src/git-cli/parsers/statusParser.ts +209 -0
- package/src/git-cli/parsers/treeParser.ts +61 -0
- package/src/git-cli/parsers/worktreeParser.ts +113 -0
- package/src/git-cli/providers/blame.ts +602 -0
- package/src/git-cli/providers/branches.ts +1491 -0
- package/src/git-cli/providers/commitFilesetUtils.ts +45 -0
- package/src/git-cli/providers/commits.ts +1517 -0
- package/src/git-cli/providers/config.ts +724 -0
- package/src/git-cli/providers/contributors.ts +361 -0
- package/src/git-cli/providers/diff.ts +1084 -0
- package/src/git-cli/providers/graph.ts +799 -0
- package/src/git-cli/providers/operations.ts +776 -0
- package/src/git-cli/providers/patch.ts +326 -0
- package/src/git-cli/providers/pausedOperations.ts +538 -0
- package/src/git-cli/providers/refs.ts +193 -0
- package/src/git-cli/providers/remotes.ts +115 -0
- package/src/git-cli/providers/revision.ts +334 -0
- package/src/git-cli/providers/staging.ts +160 -0
- package/src/git-cli/providers/stash.ts +626 -0
- package/src/git-cli/providers/status.ts +373 -0
- package/src/git-cli/providers/tags.ts +188 -0
- package/src/git-cli/providers/worktrees.ts +229 -0
- package/src/git-cli/service.ts +74 -0
- package/src/plus/ai/constants.ts +121 -0
- package/src/plus/ai/errors.ts +82 -0
- package/src/plus/ai/models/conversation.ts +35 -0
- package/src/plus/ai/models/model.ts +425 -0
- package/src/plus/ai/models/promptTemplates.ts +122 -0
- package/src/plus/ai/models/provider.ts +52 -0
- package/src/plus/ai/models/results.ts +1 -0
- package/src/plus/ai/prompts.ts +528 -0
- package/src/plus/ai/providers/anthropicProvider.ts +308 -0
- package/src/plus/ai/providers/azureProvider.ts +74 -0
- package/src/plus/ai/providers/context.ts +29 -0
- package/src/plus/ai/providers/deepSeekProvider.ts +40 -0
- package/src/plus/ai/providers/geminiProvider.ts +207 -0
- package/src/plus/ai/providers/githubModelsProvider.ts +92 -0
- package/src/plus/ai/providers/gitkrakenProvider.ts +218 -0
- package/src/plus/ai/providers/huggingFaceProvider.ts +51 -0
- package/src/plus/ai/providers/mistralProvider.ts +160 -0
- package/src/plus/ai/providers/ollamaProvider.ts +241 -0
- package/src/plus/ai/providers/openAICompatibleProvider.ts +59 -0
- package/src/plus/ai/providers/openAICompatibleProviderBase.ts +279 -0
- package/src/plus/ai/providers/openRouterProvider.ts +84 -0
- package/src/plus/ai/providers/openaiProvider.ts +46 -0
- package/src/plus/ai/providers/xaiProvider.ts +32 -0
- package/src/plus/ai/utils/ai.utils.ts +79 -0
- package/src/plus/ai/utils/results.utils.ts +50 -0
- package/src/plus/ai/utils/truncation.utils.ts +295 -0
- package/src/plus/git-github/api/config.ts +78 -0
- package/src/plus/git-github/api/github.ts +3424 -0
- package/src/plus/git-github/api/github.utils.ts +36 -0
- package/src/plus/git-github/api/token.ts +15 -0
- package/src/plus/git-github/api/tokenUtils.ts +15 -0
- package/src/plus/git-github/api/types.ts +182 -0
- package/src/plus/git-github/context.ts +107 -0
- package/src/plus/git-github/models.ts +524 -0
- package/src/plus/git-github/providers/github/blame.ts +222 -0
- package/src/plus/git-github/providers/github/branches.ts +356 -0
- package/src/plus/git-github/providers/github/commits.ts +858 -0
- package/src/plus/git-github/providers/github/config.ts +47 -0
- package/src/plus/git-github/providers/github/contributors.ts +313 -0
- package/src/plus/git-github/providers/github/diff.ts +267 -0
- package/src/plus/git-github/providers/github/graph.ts +511 -0
- package/src/plus/git-github/providers/github/refs.ts +137 -0
- package/src/plus/git-github/providers/github/remotes.ts +44 -0
- package/src/plus/git-github/providers/github/revision.ts +141 -0
- package/src/plus/git-github/providers/github/status.ts +63 -0
- package/src/plus/git-github/providers/github/tags.ts +147 -0
- package/src/plus/git-github/providers/githubGitProvider.ts +167 -0
- package/src/plus/git-github/providers/githubProvider.ts +65 -0
- package/src/utils/array.ts +194 -0
- package/src/utils/base64.ts +1 -0
- package/src/utils/brand.ts +9 -0
- package/src/utils/cancellation.ts +150 -0
- package/src/utils/charCode.ts +38 -0
- package/src/utils/color.ts +815 -0
- package/src/utils/counter.ts +21 -0
- package/src/utils/crypto.ts +1 -0
- package/src/utils/date.ts +394 -0
- package/src/utils/debounce.ts +303 -0
- package/src/utils/decorators/debounce.ts +31 -0
- package/src/utils/decorators/gate.ts +167 -0
- package/src/utils/decorators/log.ts +320 -0
- package/src/utils/decorators/memoize.ts +98 -0
- package/src/utils/decorators/resolver.ts +95 -0
- package/src/utils/decorators/sequentialize.ts +116 -0
- package/src/utils/decorators/serializable.ts +42 -0
- package/src/utils/disposable.ts +141 -0
- package/src/utils/encoding.ts +8 -0
- package/src/utils/env/browser/base64.ts +50 -0
- package/src/utils/env/browser/crypto.ts +21 -0
- package/src/utils/env/browser/fs.ts +3 -0
- package/src/utils/env/browser/hex.ts +41 -0
- package/src/utils/env/browser/hrtime.ts +14 -0
- package/src/utils/env/browser/logScope.ts +57 -0
- package/src/utils/env/browser/md5.ts +217 -0
- package/src/utils/env/browser/platform.ts +10 -0
- package/src/utils/env/node/base64.ts +17 -0
- package/src/utils/env/node/crypto.ts +17 -0
- package/src/utils/env/node/exec.ts +471 -0
- package/src/utils/env/node/fs.ts +5 -0
- package/src/utils/env/node/hex.ts +11 -0
- package/src/utils/env/node/hrtime.ts +1 -0
- package/src/utils/env/node/logScope.ts +63 -0
- package/src/utils/env/node/platform.ts +5 -0
- package/src/utils/error.ts +17 -0
- package/src/utils/event.ts +236 -0
- package/src/utils/formatter.ts +205 -0
- package/src/utils/fs.ts +1 -0
- package/src/utils/function.ts +141 -0
- package/src/utils/fuzzy.ts +185 -0
- package/src/utils/hash.ts +60 -0
- package/src/utils/hex.ts +1 -0
- package/src/utils/hrtime.ts +8 -0
- package/src/utils/iterable.ts +787 -0
- package/src/utils/lazy.ts +39 -0
- package/src/utils/loggable.ts +7 -0
- package/src/utils/logger.scoped.ts +237 -0
- package/src/utils/logger.ts +402 -0
- package/src/utils/markdown.ts +114 -0
- package/src/utils/mru.ts +66 -0
- package/src/utils/object.ts +227 -0
- package/src/utils/paging.ts +51 -0
- package/src/utils/path.ts +189 -0
- package/src/utils/platform.ts +1 -0
- package/src/utils/promise.ts +590 -0
- package/src/utils/promiseCache.ts +803 -0
- package/src/utils/searchTree.ts +442 -0
- package/src/utils/stopwatch.ts +125 -0
- package/src/utils/string.ts +964 -0
- package/src/utils/subscriptionManager.ts +40 -0
- package/src/utils/trie.ts +739 -0
- package/src/utils/types.ts +31 -0
- package/src/utils/uri.ts +117 -0
- package/src/utils/validation.ts +38 -0
- package/src/utils/version.ts +79 -0
|
@@ -0,0 +1,823 @@
|
|
|
1
|
+
import { spawn } from 'child_process';
|
|
2
|
+
import * as process from 'process';
|
|
3
|
+
import { WorkspaceUntrustedError } from '../../git/errors.js';
|
|
4
|
+
import { CancellationError, getAbortSignalId, isCancellationError } from '../../utils/cancellation.js';
|
|
5
|
+
import { getScopedCounter } from '../../utils/counter.js';
|
|
6
|
+
import { getDurationMilliseconds, hrtime } from '../../utils/hrtime.js';
|
|
7
|
+
import { Logger } from '../../utils/logger.js';
|
|
8
|
+
import { formatLoggableScopeBlock } from '../../utils/logger.scoped.js';
|
|
9
|
+
import { dirname, isAbsolute, joinPaths, normalizePath } from '../../utils/path.js';
|
|
10
|
+
import { defer } from '../../utils/promise.js';
|
|
11
|
+
import { compare, fromString } from '../../utils/version.js';
|
|
12
|
+
import { CancelledRunError, RunError } from './exec.errors.js';
|
|
13
|
+
import { fsExists, runSpawn } from './exec.js';
|
|
14
|
+
import { gitFeaturesByVersion } from './features.js';
|
|
15
|
+
import { GitQueue, inferGitCommandPriority } from './gitQueue.js';
|
|
16
|
+
const slowCallWarningThreshold = 2000;
|
|
17
|
+
export const maxGitCliLength = 30000;
|
|
18
|
+
export const gitConfigsBranch = ['-c', 'color.branch=false'];
|
|
19
|
+
export const gitConfigsDiff = ['-c', 'color.diff=false', '-c', 'diff.mnemonicPrefix=false'];
|
|
20
|
+
export const gitConfigsLog = ['-c', 'log.showSignature=false'];
|
|
21
|
+
export const gitConfigsLogWithFiles = ['-c', 'log.showSignature=false', '-c', 'diff.renameLimit=0'];
|
|
22
|
+
export const gitConfigsLogWithSignatures = ['-c', 'log.showSignature=true'];
|
|
23
|
+
export const gitConfigsPull = ['-c', 'merge.autoStash=true', '-c', 'rebase.autoStash=true'];
|
|
24
|
+
export const gitConfigsStatus = ['-c', 'color.status=false'];
|
|
25
|
+
export const GitErrors = {
|
|
26
|
+
alreadyCheckedOut: /already checked out/i,
|
|
27
|
+
alreadyExists: /already exists/i,
|
|
28
|
+
ambiguousArgument: /fatal:\s*ambiguous argument ['"].+['"]: unknown revision or path not in the working tree/i,
|
|
29
|
+
badObject: /fatal:\s*bad object (.*?)/i,
|
|
30
|
+
badRevision: /bad revision '(.*?)'/i,
|
|
31
|
+
branchAlreadyExists: /fatal:\s*A branch named '.+?' already exists/i,
|
|
32
|
+
notFullyMerged: /error:\s*The branch '.+?' is not fully merged/i,
|
|
33
|
+
cantLockRef: /cannot lock ref|unable to update local ref/i,
|
|
34
|
+
changesWouldBeOverwritten: /Your local changes to the following files would be overwritten|Your local changes would be overwritten|overwritten by checkout/i,
|
|
35
|
+
cherryPickAborted: /cherry-pick.*aborted/i,
|
|
36
|
+
cherryPickEmptyPrevious: /The previous cherry-pick is now empty/i,
|
|
37
|
+
cherryPickInProgress: /cherry-pick is already in progress|You have not concluded your cherry-pick/i,
|
|
38
|
+
commitChangesFirst: /Please, commit your changes before you can/i,
|
|
39
|
+
conflict: /^CONFLICT \([^)]+\): \b/m,
|
|
40
|
+
detachedHead: /You are in 'detached HEAD' state/i,
|
|
41
|
+
entryNotUpToDate: /error:\s*Entry ['"].+['"] not uptodate\. Cannot merge\./i,
|
|
42
|
+
failedToDeleteDirectoryNotEmpty: /failed to delete '(.*?)': Directory not empty/i,
|
|
43
|
+
invalidName: /fatal:\s*'.+?' is not a valid branch name/i,
|
|
44
|
+
invalidLineCount: /file .+? has only (\d+) lines/i,
|
|
45
|
+
invalidObjectName: /invalid object name: (.*)\s/i,
|
|
46
|
+
invalidObjectNameList: /could not open object name list: (.*)\s/i,
|
|
47
|
+
invalidTagName: /invalid tag name/i,
|
|
48
|
+
mainWorkingTree: /is a main working tree/i,
|
|
49
|
+
mergeAborted: /merge.*aborted/i,
|
|
50
|
+
mergeInProgress: /^fatal:\s*You have not concluded your merge/i,
|
|
51
|
+
noFastForward: /\(non-fast-forward\)/i,
|
|
52
|
+
noMergeBase: /no merge base/i,
|
|
53
|
+
noRemoteReference: /unable to delete '.+?': remote ref does not exist/i,
|
|
54
|
+
noRemoteRepositorySpecified: /No remote repository specified\./i,
|
|
55
|
+
noUpstream: /^fatal:\s*The current branch .* has no upstream branch/i,
|
|
56
|
+
notAValidObjectName: /Not a valid object name/i,
|
|
57
|
+
notAWorkingTree: /'(.*?)' is not a working tree/i,
|
|
58
|
+
noUserNameConfigured: /Please tell me who you are\./i,
|
|
59
|
+
nothingToCommit: /nothing(?: added)? to commit|no changes added to commit/i,
|
|
60
|
+
noPausedOperation: /no merge (?:in progress|to abort)|no cherry-pick(?: or revert)? in progress|no rebase in progress/i,
|
|
61
|
+
permissionDenied: /Permission.*denied/i,
|
|
62
|
+
pushRejected: /^error:\s*failed to push some refs to\b/m,
|
|
63
|
+
pushRejectedRefDoesNotExists: /error:\s*unable to delete '(.*?)': remote ref does not exist/m,
|
|
64
|
+
rebaseAborted: /Nothing to do|rebase.*aborted/i,
|
|
65
|
+
rebaseInProgress: /It seems that there is already a rebase-(?:merge|apply) directory/i,
|
|
66
|
+
rebaseMissingTodo: /error:\s*could not read file .*\/git-rebase-todo': No such file or directory/,
|
|
67
|
+
rebaseMultipleBranches: /cannot rebase onto multiple branches/i,
|
|
68
|
+
revertAborted: /revert.*aborted/i,
|
|
69
|
+
revertInProgress: /^(error: )?(revert|cherry-pick) is already in progress/i,
|
|
70
|
+
refLocked: /fatal:\s*cannot lock ref ['"].+['"]: unable to create file/i,
|
|
71
|
+
remoteAhead: /rejected because the remote contains work/i,
|
|
72
|
+
remoteConnectionFailed: /Could not read from remote repository/i,
|
|
73
|
+
remoteRejected: /rejected because the remote contains work/i,
|
|
74
|
+
stashConflictingStagedAndUnstagedLines: /Cannot remove worktree changes/i,
|
|
75
|
+
stashNothingToSave: /No local changes to save/i,
|
|
76
|
+
stashSavedWorkingDirAndIndexState: /Saved working directory and index state/i,
|
|
77
|
+
tagAlreadyExists: /tag .* already exists/i,
|
|
78
|
+
tagConflict: /! \[rejected\].*\(would clobber existing tag\)/m,
|
|
79
|
+
tagNotFound: /tag .* not found/i,
|
|
80
|
+
uncommittedChanges: /contains modified or untracked files/i,
|
|
81
|
+
unmergedChanges: /error:\s*you need to resolve your current index first/i,
|
|
82
|
+
unmergedFiles: /is not possible because you have unmerged files|You have unmerged files/i,
|
|
83
|
+
unresolvedConflicts: /You must edit all merge conflicts|Resolve all conflicts|^CONFLICT \(|^Automatic merge failed|could not apply .*/im,
|
|
84
|
+
unsafeRepository: /(?:^fatal:\s*detected dubious ownership in repository at '([^']+)'|unsafe repository \('([^']+)' is owned by someone else\))[\s\S]*(git config --global --add safe\.directory [^\n•]+)/m,
|
|
85
|
+
unstagedChanges: /You have unstaged changes/i,
|
|
86
|
+
};
|
|
87
|
+
export const GitWarnings = {
|
|
88
|
+
notARepository: /Not a git repository/i,
|
|
89
|
+
outsideRepository: /is outside repository/i,
|
|
90
|
+
noPath: /no such path/i,
|
|
91
|
+
noCommits: /does not have any commits/i,
|
|
92
|
+
notFound: /Path '.*?' does not exist in/i,
|
|
93
|
+
foundButNotInRevision: /Path '.*?' exists on disk, but not in/i,
|
|
94
|
+
headNotABranch: /HEAD does not point to a branch/i,
|
|
95
|
+
noUpstream: /no upstream configured for branch '(.*?)'/i,
|
|
96
|
+
unknownRevision: /ambiguous argument '.*?': unknown revision or path not in the working tree|not stored as a remote-tracking branch/i,
|
|
97
|
+
mustRunInWorkTree: /this operation must be run in a work tree/i,
|
|
98
|
+
patchWithConflicts: /Applied patch to '.*?' with conflicts/i,
|
|
99
|
+
noRemoteRepositorySpecified: /No remote repository specified\./i,
|
|
100
|
+
remoteConnectionError: /Could not read from remote repository/i,
|
|
101
|
+
notAGitCommand: /'.+' is not a git command/i,
|
|
102
|
+
tipBehind: /tip of your current branch is behind/i,
|
|
103
|
+
};
|
|
104
|
+
export class GitError extends Error {
|
|
105
|
+
original;
|
|
106
|
+
cmd;
|
|
107
|
+
exitCode;
|
|
108
|
+
stdout;
|
|
109
|
+
stderr;
|
|
110
|
+
constructor(original) {
|
|
111
|
+
let message;
|
|
112
|
+
let stdout;
|
|
113
|
+
let stderr;
|
|
114
|
+
let cmd;
|
|
115
|
+
let exitCode;
|
|
116
|
+
if (original instanceof RunError) {
|
|
117
|
+
stdout = original.stdout;
|
|
118
|
+
stderr = original.stderr;
|
|
119
|
+
message = stderr || stdout || original.message;
|
|
120
|
+
cmd = original.cmd;
|
|
121
|
+
exitCode = original.code;
|
|
122
|
+
}
|
|
123
|
+
else {
|
|
124
|
+
message = original.message;
|
|
125
|
+
}
|
|
126
|
+
super(message);
|
|
127
|
+
this.original = original;
|
|
128
|
+
this.stdout = stdout;
|
|
129
|
+
this.stderr = stderr;
|
|
130
|
+
this.cmd = cmd;
|
|
131
|
+
this.exitCode = exitCode;
|
|
132
|
+
Error.captureStackTrace?.(this, new.target);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
const errorToReasonMap = new Map([
|
|
136
|
+
[
|
|
137
|
+
'branch',
|
|
138
|
+
[
|
|
139
|
+
[GitErrors.branchAlreadyExists, 'alreadyExists'],
|
|
140
|
+
[GitErrors.invalidName, 'invalidName'],
|
|
141
|
+
[GitErrors.notFullyMerged, 'notFullyMerged'],
|
|
142
|
+
[GitErrors.noRemoteReference, 'noRemoteReference'],
|
|
143
|
+
],
|
|
144
|
+
],
|
|
145
|
+
[
|
|
146
|
+
'checkout',
|
|
147
|
+
[
|
|
148
|
+
[GitErrors.changesWouldBeOverwritten, 'wouldOverwriteChanges'],
|
|
149
|
+
[GitErrors.ambiguousArgument, 'pathspecNotFound'],
|
|
150
|
+
[GitErrors.notAValidObjectName, 'invalidRef'],
|
|
151
|
+
],
|
|
152
|
+
],
|
|
153
|
+
[
|
|
154
|
+
'cherry-pick',
|
|
155
|
+
[
|
|
156
|
+
[GitErrors.cherryPickAborted, 'aborted'],
|
|
157
|
+
[GitErrors.cherryPickInProgress, 'alreadyInProgress'],
|
|
158
|
+
[GitErrors.conflict, 'conflicts'],
|
|
159
|
+
[GitErrors.cherryPickEmptyPrevious, 'emptyCommit'],
|
|
160
|
+
[GitErrors.changesWouldBeOverwritten, 'wouldOverwriteChanges'],
|
|
161
|
+
],
|
|
162
|
+
],
|
|
163
|
+
[
|
|
164
|
+
'commit',
|
|
165
|
+
[
|
|
166
|
+
[GitErrors.nothingToCommit, 'nothingToCommit'],
|
|
167
|
+
[GitErrors.unmergedFiles, 'conflicts'],
|
|
168
|
+
[GitErrors.unresolvedConflicts, 'conflicts'],
|
|
169
|
+
[GitErrors.noUserNameConfigured, 'noUserNameConfigured'],
|
|
170
|
+
],
|
|
171
|
+
],
|
|
172
|
+
[
|
|
173
|
+
'fetch',
|
|
174
|
+
[
|
|
175
|
+
[GitErrors.noFastForward, 'noFastForward'],
|
|
176
|
+
[GitErrors.noRemoteRepositorySpecified, 'noRemote'],
|
|
177
|
+
[GitErrors.remoteConnectionFailed, 'remoteConnectionFailed'],
|
|
178
|
+
],
|
|
179
|
+
],
|
|
180
|
+
[
|
|
181
|
+
'merge',
|
|
182
|
+
[
|
|
183
|
+
[GitErrors.mergeAborted, 'aborted'],
|
|
184
|
+
[GitErrors.mergeInProgress, 'alreadyInProgress'],
|
|
185
|
+
[GitErrors.unresolvedConflicts, 'conflicts'],
|
|
186
|
+
[GitErrors.uncommittedChanges, 'uncommittedChanges'],
|
|
187
|
+
[GitErrors.changesWouldBeOverwritten, 'wouldOverwriteChanges'],
|
|
188
|
+
],
|
|
189
|
+
],
|
|
190
|
+
['paused-operation-abort', [[GitErrors.noPausedOperation, 'nothingToAbort']]],
|
|
191
|
+
[
|
|
192
|
+
'paused-operation-continue',
|
|
193
|
+
[
|
|
194
|
+
[GitErrors.cherryPickEmptyPrevious, 'emptyCommit'],
|
|
195
|
+
[GitErrors.noPausedOperation, 'nothingToContinue'],
|
|
196
|
+
[GitErrors.uncommittedChanges, 'uncommittedChanges'],
|
|
197
|
+
[GitErrors.unmergedFiles, 'unmergedFiles'],
|
|
198
|
+
[GitErrors.unresolvedConflicts, 'conflicts'],
|
|
199
|
+
[GitErrors.unstagedChanges, 'unstagedChanges'],
|
|
200
|
+
[GitErrors.changesWouldBeOverwritten, 'wouldOverwriteChanges'],
|
|
201
|
+
],
|
|
202
|
+
],
|
|
203
|
+
[
|
|
204
|
+
'pull',
|
|
205
|
+
[
|
|
206
|
+
[GitErrors.conflict, 'conflict'],
|
|
207
|
+
[GitErrors.noUserNameConfigured, 'gitIdentity'],
|
|
208
|
+
[GitErrors.remoteConnectionFailed, 'remoteConnectionFailed'],
|
|
209
|
+
[GitErrors.unstagedChanges, 'unstagedChanges'],
|
|
210
|
+
[GitErrors.unmergedFiles, 'unmergedFiles'],
|
|
211
|
+
[GitErrors.commitChangesFirst, 'uncommittedChanges'],
|
|
212
|
+
[GitErrors.changesWouldBeOverwritten, 'wouldOverwriteChanges'],
|
|
213
|
+
[GitErrors.cantLockRef, 'refLocked'],
|
|
214
|
+
[GitErrors.rebaseMultipleBranches, 'rebaseMultipleBranches'],
|
|
215
|
+
[GitErrors.tagConflict, 'tagConflict'],
|
|
216
|
+
],
|
|
217
|
+
],
|
|
218
|
+
[
|
|
219
|
+
'push',
|
|
220
|
+
[
|
|
221
|
+
[GitErrors.remoteAhead, 'remoteAhead'],
|
|
222
|
+
[GitWarnings.tipBehind, 'tipBehind'],
|
|
223
|
+
[GitErrors.pushRejected, 'rejected'],
|
|
224
|
+
[GitErrors.pushRejectedRefDoesNotExists, 'rejectedRefDoesNotExist'],
|
|
225
|
+
[GitErrors.permissionDenied, 'permissionDenied'],
|
|
226
|
+
[GitErrors.remoteConnectionFailed, 'remoteConnectionFailed'],
|
|
227
|
+
[GitErrors.noUpstream, 'noUpstream'],
|
|
228
|
+
],
|
|
229
|
+
],
|
|
230
|
+
[
|
|
231
|
+
'rebase',
|
|
232
|
+
[
|
|
233
|
+
[GitErrors.rebaseAborted, 'aborted'],
|
|
234
|
+
[GitErrors.rebaseMissingTodo, 'aborted'],
|
|
235
|
+
[GitErrors.rebaseInProgress, 'alreadyInProgress'],
|
|
236
|
+
[GitErrors.unresolvedConflicts, 'conflicts'],
|
|
237
|
+
[GitErrors.uncommittedChanges, 'uncommittedChanges'],
|
|
238
|
+
[GitErrors.changesWouldBeOverwritten, 'wouldOverwriteChanges'],
|
|
239
|
+
],
|
|
240
|
+
],
|
|
241
|
+
[
|
|
242
|
+
'reset',
|
|
243
|
+
[
|
|
244
|
+
[GitErrors.ambiguousArgument, 'ambiguousArgument'],
|
|
245
|
+
[GitErrors.detachedHead, 'detachedHead'],
|
|
246
|
+
[GitErrors.refLocked, 'refLocked'],
|
|
247
|
+
[GitErrors.entryNotUpToDate, 'notUpToDate'],
|
|
248
|
+
[GitErrors.permissionDenied, 'permissionDenied'],
|
|
249
|
+
[GitErrors.unmergedChanges, 'unmergedChanges'],
|
|
250
|
+
[GitErrors.changesWouldBeOverwritten, 'wouldOverwriteChanges'],
|
|
251
|
+
],
|
|
252
|
+
],
|
|
253
|
+
[
|
|
254
|
+
'revert',
|
|
255
|
+
[
|
|
256
|
+
[GitErrors.revertAborted, 'aborted'],
|
|
257
|
+
[GitErrors.revertInProgress, 'alreadyInProgress'],
|
|
258
|
+
[GitErrors.unresolvedConflicts, 'conflicts'],
|
|
259
|
+
[GitErrors.uncommittedChanges, 'uncommittedChanges'],
|
|
260
|
+
[GitErrors.changesWouldBeOverwritten, 'wouldOverwriteChanges'],
|
|
261
|
+
],
|
|
262
|
+
],
|
|
263
|
+
[
|
|
264
|
+
'show',
|
|
265
|
+
[
|
|
266
|
+
[GitErrors.badObject, 'invalidObject'],
|
|
267
|
+
[GitErrors.badRevision, 'invalidRevision'],
|
|
268
|
+
[GitErrors.notAValidObjectName, 'invalidRevision'],
|
|
269
|
+
[GitWarnings.notFound, 'notFound'],
|
|
270
|
+
[GitWarnings.foundButNotInRevision, 'notInRevision'],
|
|
271
|
+
],
|
|
272
|
+
],
|
|
273
|
+
['stash-apply', [[GitErrors.changesWouldBeOverwritten, 'uncommittedChanges']]],
|
|
274
|
+
[
|
|
275
|
+
'stash-push',
|
|
276
|
+
[
|
|
277
|
+
[GitErrors.stashConflictingStagedAndUnstagedLines, 'conflictingStagedAndUnstagedLines'],
|
|
278
|
+
[GitErrors.stashNothingToSave, 'nothingToSave'],
|
|
279
|
+
[GitErrors.stashSavedWorkingDirAndIndexState, 'conflictingStagedAndUnstagedLines'],
|
|
280
|
+
],
|
|
281
|
+
],
|
|
282
|
+
[
|
|
283
|
+
'tag',
|
|
284
|
+
[
|
|
285
|
+
[GitErrors.tagAlreadyExists, 'alreadyExists'],
|
|
286
|
+
[GitErrors.invalidTagName, 'invalidName'],
|
|
287
|
+
[GitErrors.tagNotFound, 'notFound'],
|
|
288
|
+
[GitErrors.permissionDenied, 'permissionDenied'],
|
|
289
|
+
[GitErrors.remoteRejected, 'remoteRejected'],
|
|
290
|
+
],
|
|
291
|
+
],
|
|
292
|
+
[
|
|
293
|
+
'worktree-create',
|
|
294
|
+
[
|
|
295
|
+
[GitErrors.alreadyCheckedOut, 'alreadyCheckedOut'],
|
|
296
|
+
[GitErrors.alreadyExists, 'alreadyExists'],
|
|
297
|
+
],
|
|
298
|
+
],
|
|
299
|
+
[
|
|
300
|
+
'worktree-delete',
|
|
301
|
+
[
|
|
302
|
+
[GitErrors.mainWorkingTree, 'defaultWorkingTree'],
|
|
303
|
+
[GitErrors.uncommittedChanges, 'uncommittedChanges'],
|
|
304
|
+
[GitErrors.failedToDeleteDirectoryNotEmpty, 'directoryNotEmpty'],
|
|
305
|
+
],
|
|
306
|
+
],
|
|
307
|
+
]);
|
|
308
|
+
export function getGitCommandError(command, ex, creator) {
|
|
309
|
+
const msg = ex?.toString() ?? '';
|
|
310
|
+
const errorsToReasons = errorToReasonMap.get(command);
|
|
311
|
+
if (errorsToReasons != null) {
|
|
312
|
+
for (const [error, reason] of errorsToReasons) {
|
|
313
|
+
if (error.test(msg) || (ex.stderr && error.test(ex.stderr)) || (ex.stdout && error.test(ex.stdout))) {
|
|
314
|
+
return creator(reason);
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
return creator(undefined);
|
|
319
|
+
}
|
|
320
|
+
const emptyArray = Object.freeze([]);
|
|
321
|
+
const emptyObj = Object.freeze({});
|
|
322
|
+
const trailingNewlineRegex = /[\r|\n]+$/;
|
|
323
|
+
const uniqueCounterForStdin = getScopedCounter();
|
|
324
|
+
const uniqueCounterForStream = getScopedCounter();
|
|
325
|
+
export class Git {
|
|
326
|
+
_locator;
|
|
327
|
+
options;
|
|
328
|
+
/** Map of running git commands — avoids running duplicate overlapping commands */
|
|
329
|
+
pendingCommands = new Map();
|
|
330
|
+
/** Queue for throttling background git operations */
|
|
331
|
+
_queue;
|
|
332
|
+
/** Cached base environment: process.env + static options.env + GCM/LC_ALL vars */
|
|
333
|
+
_baseEnv;
|
|
334
|
+
/** Cached full environment: base + dynamic getEnvironment() result */
|
|
335
|
+
_fullEnv;
|
|
336
|
+
/** Last dynamic env reference, used to detect when getEnvironment() returns a new object */
|
|
337
|
+
_lastDynamicEnv;
|
|
338
|
+
constructor(_locator, options = {}) {
|
|
339
|
+
this._locator = _locator;
|
|
340
|
+
this.options = options;
|
|
341
|
+
this._queue = new GitQueue(options.queue, { onSlowQueue: options.hooks?.onSlowQueue });
|
|
342
|
+
}
|
|
343
|
+
/**
|
|
344
|
+
* Returns the base environment for git commands. Cached to avoid spreading
|
|
345
|
+
* process.env (30-100+ keys) on every call. Includes static options.env and
|
|
346
|
+
* GCM/LC_ALL vars but NOT dynamic getEnvironment() or per-call env overrides.
|
|
347
|
+
*/
|
|
348
|
+
getBaseEnv() {
|
|
349
|
+
return (this._baseEnv ??= {
|
|
350
|
+
...process.env,
|
|
351
|
+
...(this.options.env ?? emptyObj),
|
|
352
|
+
GCM_INTERACTIVE: 'NEVER',
|
|
353
|
+
GCM_PRESERVE_CREDS: 'TRUE',
|
|
354
|
+
LC_ALL: 'C',
|
|
355
|
+
});
|
|
356
|
+
}
|
|
357
|
+
/**
|
|
358
|
+
* Returns the full environment (base + dynamic). Cached and invalidated
|
|
359
|
+
* when getEnvironment() returns a different object reference.
|
|
360
|
+
*/
|
|
361
|
+
getFullEnv() {
|
|
362
|
+
const dynamicEnv = this.options.getEnvironment?.() ?? undefined;
|
|
363
|
+
if (this._fullEnv != null && dynamicEnv === this._lastDynamicEnv)
|
|
364
|
+
return this._fullEnv;
|
|
365
|
+
this._lastDynamicEnv = dynamicEnv;
|
|
366
|
+
this._fullEnv = dynamicEnv != null ? { ...this.getBaseEnv(), ...dynamicEnv } : this.getBaseEnv();
|
|
367
|
+
return this._fullEnv;
|
|
368
|
+
}
|
|
369
|
+
/**
|
|
370
|
+
* Builds the environment for a git command. Returns the cached full env
|
|
371
|
+
* directly when there are no per-call overrides (the common case).
|
|
372
|
+
* Only allocates a new object when per-call env overrides are provided.
|
|
373
|
+
*/
|
|
374
|
+
buildEnv(perCallEnv) {
|
|
375
|
+
if (perCallEnv == null)
|
|
376
|
+
return this.getFullEnv();
|
|
377
|
+
return { ...this.getFullEnv(), ...perCallEnv };
|
|
378
|
+
}
|
|
379
|
+
dispose() {
|
|
380
|
+
this._queue.dispose();
|
|
381
|
+
}
|
|
382
|
+
/** Clear pending commands (e.g. on cache reset) */
|
|
383
|
+
clearPendingCommands() {
|
|
384
|
+
this.pendingCommands.clear();
|
|
385
|
+
}
|
|
386
|
+
_gitLocation;
|
|
387
|
+
_gitLocationPromise;
|
|
388
|
+
async getLocation() {
|
|
389
|
+
if (this._gitLocation == null) {
|
|
390
|
+
this._gitLocationPromise ??= this._locator();
|
|
391
|
+
this._gitLocation = await this._gitLocationPromise;
|
|
392
|
+
}
|
|
393
|
+
return this._gitLocation;
|
|
394
|
+
}
|
|
395
|
+
async path() {
|
|
396
|
+
return (await this.getLocation()).path;
|
|
397
|
+
}
|
|
398
|
+
async version() {
|
|
399
|
+
return (await this.getLocation()).version;
|
|
400
|
+
}
|
|
401
|
+
supports(feature) {
|
|
402
|
+
const version = gitFeaturesByVersion.get(feature);
|
|
403
|
+
if (version == null)
|
|
404
|
+
return true;
|
|
405
|
+
return this._gitLocation != null
|
|
406
|
+
? compare(fromString(this._gitLocation.version), fromString(version)) !== -1
|
|
407
|
+
: this.version().then(v => compare(fromString(v), fromString(version)) !== -1);
|
|
408
|
+
}
|
|
409
|
+
supported(feature) {
|
|
410
|
+
function supportedCore(gitVersion) {
|
|
411
|
+
return [...gitFeaturesByVersion]
|
|
412
|
+
.filter(([f, v]) => f.startsWith(feature) && compare(fromString(gitVersion), v) !== -1)
|
|
413
|
+
.map(([f]) => f);
|
|
414
|
+
}
|
|
415
|
+
if (this._gitLocation == null) {
|
|
416
|
+
return this.version().then(v => supportedCore(v));
|
|
417
|
+
}
|
|
418
|
+
return supportedCore(this._gitLocation.version);
|
|
419
|
+
}
|
|
420
|
+
async ensureSupports(feature, prefix, suffix) {
|
|
421
|
+
const version = gitFeaturesByVersion.get(feature);
|
|
422
|
+
if (version == null)
|
|
423
|
+
return;
|
|
424
|
+
const gitVersion = await this.version();
|
|
425
|
+
if (compare(fromString(gitVersion), fromString(version)) !== -1)
|
|
426
|
+
return;
|
|
427
|
+
throw new Error(`${prefix} requires a newer version of Git (>= ${version}) than is currently installed (${gitVersion}).${suffix}`);
|
|
428
|
+
}
|
|
429
|
+
async exec(options, ...args) {
|
|
430
|
+
if (this.options.isTrusted?.() === false)
|
|
431
|
+
throw new WorkspaceUntrustedError();
|
|
432
|
+
const runArgs = args.filter(a => a != null);
|
|
433
|
+
const gitCommand = `git ${runArgs.join(' ')}`;
|
|
434
|
+
// If cache is provided, use it to cache the full result
|
|
435
|
+
if (options.caching != null) {
|
|
436
|
+
return options.caching.cache.getOrCreate(options.caching.commonPath ?? options.cwd, gitCommand, async (cacheable) => {
|
|
437
|
+
const result = await this.execCore({ ...options, caching: undefined }, runArgs, gitCommand);
|
|
438
|
+
if (result.exitCode !== 0) {
|
|
439
|
+
cacheable.invalidate();
|
|
440
|
+
}
|
|
441
|
+
return result;
|
|
442
|
+
}, options.caching.options);
|
|
443
|
+
}
|
|
444
|
+
return this.execCore(options, runArgs, gitCommand);
|
|
445
|
+
}
|
|
446
|
+
async execCore(options, args, gitCommand) {
|
|
447
|
+
const start = hrtime();
|
|
448
|
+
gitCommand = `[${options.cwd}] ${gitCommand}`;
|
|
449
|
+
const { cancellation, configs, correlationKey, errors: errorHandling, encoding, runLocally: _, ...opts } = options;
|
|
450
|
+
const defaultTimeout = this.options.gitTimeout ?? 60000;
|
|
451
|
+
const runOpts = {
|
|
452
|
+
...opts,
|
|
453
|
+
timeout: opts.timeout === 0 || defaultTimeout === 0 ? undefined : (opts.timeout ?? defaultTimeout),
|
|
454
|
+
encoding: (encoding ?? 'utf8') === 'utf8' ? 'utf8' : 'buffer',
|
|
455
|
+
decode: this.options.decode,
|
|
456
|
+
env: this.buildEnv(options.env),
|
|
457
|
+
quiet: errorHandling === 'ignore',
|
|
458
|
+
};
|
|
459
|
+
const cacheKey = `${correlationKey !== undefined ? `${correlationKey}:` : ''}${options?.stdin != null ? `${uniqueCounterForStdin.next()}:` : ''}${cancellation != null ? `${getAbortSignalId(cancellation)}:` : ''}${gitCommand}`;
|
|
460
|
+
let waiting;
|
|
461
|
+
let promise = this.pendingCommands.get(cacheKey);
|
|
462
|
+
if (promise == null) {
|
|
463
|
+
waiting = false;
|
|
464
|
+
// Create a deferred promise and store it immediately to prevent duplicate commands
|
|
465
|
+
// Note: cancellation tokens are not part of the dedup key — calls with different AbortSignals will not be deduplicated
|
|
466
|
+
const deferred = defer();
|
|
467
|
+
promise = deferred.promise;
|
|
468
|
+
this.pendingCommands.set(cacheKey, promise);
|
|
469
|
+
// Fixes https://github.com/gitkraken/vscode-gitlens/issues/73 & https://github.com/gitkraken/vscode-gitlens/issues/161
|
|
470
|
+
// See https://stackoverflow.com/questions/4144417/how-to-handle-asian-characters-in-file-names-in-git-on-os-x
|
|
471
|
+
args.unshift('-c', 'core.quotepath=false', '-c', 'color.ui=false', ...(configs ?? emptyArray));
|
|
472
|
+
if (process.platform === 'win32') {
|
|
473
|
+
args.unshift('-c', 'core.longpaths=true');
|
|
474
|
+
}
|
|
475
|
+
if (cancellation != null) {
|
|
476
|
+
runOpts.cancellation = cancellation;
|
|
477
|
+
}
|
|
478
|
+
// Determine command priority:
|
|
479
|
+
// Priority resolution:
|
|
480
|
+
// 1. Explicit priority from options (highest precedence)
|
|
481
|
+
// 2. Inferred from command type (only downgrades expensive commands to Background)
|
|
482
|
+
const priority = options.priority ?? inferGitCommandPriority(args);
|
|
483
|
+
// Execute through the queue (interactive/normal run immediately, background is throttled)
|
|
484
|
+
const gitPath = await this.path();
|
|
485
|
+
void this._queue
|
|
486
|
+
.execute(priority, () => runSpawn(gitPath, args, encoding ?? 'utf8', runOpts))
|
|
487
|
+
.then(deferred.fulfill, (e) => deferred.cancel(e instanceof Error ? e : new Error(String(e))))
|
|
488
|
+
.finally(() => {
|
|
489
|
+
this.pendingCommands.delete(cacheKey);
|
|
490
|
+
})
|
|
491
|
+
.catch(() => { });
|
|
492
|
+
}
|
|
493
|
+
else {
|
|
494
|
+
waiting = true;
|
|
495
|
+
Logger.trace(`${formatLoggableScopeBlock('GIT')} ${gitCommand} \u00b7 awaiting existing call...`);
|
|
496
|
+
}
|
|
497
|
+
let exception;
|
|
498
|
+
let result;
|
|
499
|
+
try {
|
|
500
|
+
result = await promise;
|
|
501
|
+
return {
|
|
502
|
+
stdout: result.stdout,
|
|
503
|
+
stderr: result.stderr,
|
|
504
|
+
exitCode: result.exitCode ?? 0,
|
|
505
|
+
};
|
|
506
|
+
}
|
|
507
|
+
catch (ex) {
|
|
508
|
+
if (ex instanceof CancelledRunError) {
|
|
509
|
+
const duration = getDurationMilliseconds(start);
|
|
510
|
+
const timeout = runOpts.timeout ?? 0;
|
|
511
|
+
const reason = timeout > 0 && duration >= timeout - 100
|
|
512
|
+
? 'timeout'
|
|
513
|
+
: cancellation?.aborted
|
|
514
|
+
? 'cancellation'
|
|
515
|
+
: 'unknown';
|
|
516
|
+
Logger.warn(`${formatLoggableScopeBlock('GIT')} ${gitCommand} \u00b7 ABORTED after ${duration}ms (${reason})`);
|
|
517
|
+
this.options.hooks?.onAborted?.({
|
|
518
|
+
operation: gitCommand,
|
|
519
|
+
reason: reason,
|
|
520
|
+
duration: duration,
|
|
521
|
+
timeout: timeout,
|
|
522
|
+
});
|
|
523
|
+
}
|
|
524
|
+
if (errorHandling === 'ignore') {
|
|
525
|
+
if (ex instanceof RunError) {
|
|
526
|
+
return {
|
|
527
|
+
stdout: ex.stdout,
|
|
528
|
+
stderr: ex.stderr,
|
|
529
|
+
exitCode: ex.code != null ? (typeof ex.code === 'number' ? ex.code : parseInt(ex.code, 10)) : 0,
|
|
530
|
+
cancelled: ex instanceof CancelledRunError,
|
|
531
|
+
};
|
|
532
|
+
}
|
|
533
|
+
return {
|
|
534
|
+
stdout: '',
|
|
535
|
+
stderr: undefined,
|
|
536
|
+
exitCode: 0,
|
|
537
|
+
cancelled: ex instanceof CancelledRunError,
|
|
538
|
+
};
|
|
539
|
+
}
|
|
540
|
+
if (ex instanceof CancelledRunError) {
|
|
541
|
+
exception = new CancellationError(ex);
|
|
542
|
+
}
|
|
543
|
+
else {
|
|
544
|
+
exception = new GitError(ex);
|
|
545
|
+
}
|
|
546
|
+
if (errorHandling === 'throw')
|
|
547
|
+
throw exception;
|
|
548
|
+
defaultExceptionHandler(exception, options.cwd, start);
|
|
549
|
+
exception = undefined;
|
|
550
|
+
return { stdout: '', stderr: result?.stderr, exitCode: result?.exitCode ?? 0 };
|
|
551
|
+
}
|
|
552
|
+
finally {
|
|
553
|
+
this.logGitCommandComplete(gitCommand, exception, getDurationMilliseconds(start), waiting);
|
|
554
|
+
}
|
|
555
|
+
}
|
|
556
|
+
async *stream(options, ...args) {
|
|
557
|
+
if (this.options.isTrusted?.() === false)
|
|
558
|
+
throw new WorkspaceUntrustedError();
|
|
559
|
+
const start = hrtime();
|
|
560
|
+
const streamId = uniqueCounterForStream.next();
|
|
561
|
+
const { configs, stdin, stdinEncoding, cancellation, encoding, ...opts } = options;
|
|
562
|
+
const runArgs = args.filter(a => a != null);
|
|
563
|
+
const spawnOpts = {
|
|
564
|
+
// Unless provided, ignore stdin and leave default streams for stdout and stderr
|
|
565
|
+
stdio: [stdin ? 'pipe' : 'ignore', null, null],
|
|
566
|
+
...opts,
|
|
567
|
+
signal: cancellation,
|
|
568
|
+
env: this.buildEnv(options.env),
|
|
569
|
+
};
|
|
570
|
+
const gitCommand = `(spawn) [${spawnOpts.cwd}] git ${runArgs.join(' ')}`;
|
|
571
|
+
// Fixes https://github.com/gitkraken/vscode-gitlens/issues/73 & https://github.com/gitkraken/vscode-gitlens/issues/161
|
|
572
|
+
// See https://stackoverflow.com/questions/4144417/how-to-handle-asian-characters-in-file-names-in-git-on-os-x
|
|
573
|
+
runArgs.unshift('-c', 'core.quotepath=false', '-c', 'color.ui=false', ...(configs !== undefined ? configs : emptyArray));
|
|
574
|
+
if (process.platform === 'win32') {
|
|
575
|
+
runArgs.unshift('-c', 'core.longpaths=true');
|
|
576
|
+
}
|
|
577
|
+
const command = await this.path();
|
|
578
|
+
const proc = spawn(command, runArgs, spawnOpts);
|
|
579
|
+
if (stdin) {
|
|
580
|
+
proc.stdin?.end(stdin, (stdinEncoding ?? 'utf8'));
|
|
581
|
+
}
|
|
582
|
+
let exception;
|
|
583
|
+
const promise = new Promise((resolve, reject) => {
|
|
584
|
+
const stderrChunks = [];
|
|
585
|
+
if (proc.stderr) {
|
|
586
|
+
proc.stderr?.setEncoding('utf8');
|
|
587
|
+
proc.stderr.on('data', chunk => stderrChunks.push(chunk));
|
|
588
|
+
}
|
|
589
|
+
proc.once('error', ex => {
|
|
590
|
+
if (ex?.name === 'AbortError')
|
|
591
|
+
return;
|
|
592
|
+
exception = new GitError(ex);
|
|
593
|
+
});
|
|
594
|
+
proc.once('close', (code, signal) => {
|
|
595
|
+
if (code === 0) {
|
|
596
|
+
resolve();
|
|
597
|
+
return;
|
|
598
|
+
}
|
|
599
|
+
if (signal === 'SIGTERM') {
|
|
600
|
+
// If the caller aborted, just resolve
|
|
601
|
+
if (cancellation?.aborted) {
|
|
602
|
+
resolve();
|
|
603
|
+
}
|
|
604
|
+
else {
|
|
605
|
+
reject(new CancelledRunError(proc.spawnargs.join(' '), true, code ?? undefined, signal));
|
|
606
|
+
}
|
|
607
|
+
return;
|
|
608
|
+
}
|
|
609
|
+
// If the caller didn't read the complete stream, just resolve
|
|
610
|
+
if (signal === 'SIGPIPE' ||
|
|
611
|
+
code === 141 /* SIGPIPE */ ||
|
|
612
|
+
(code === 128 && stderrChunks.some(c => c.includes('Connection reset by peer')))) {
|
|
613
|
+
resolve();
|
|
614
|
+
return;
|
|
615
|
+
}
|
|
616
|
+
const stderr = stderrChunks.join('').trim();
|
|
617
|
+
reject(new GitError(new RunError({
|
|
618
|
+
message: `Error (${code}): ${stderr || 'Unknown'}`,
|
|
619
|
+
cmd: proc.spawnargs.join(' '),
|
|
620
|
+
killed: proc.killed,
|
|
621
|
+
code: proc.exitCode,
|
|
622
|
+
}, '', stderr)));
|
|
623
|
+
});
|
|
624
|
+
});
|
|
625
|
+
let cleanedUp = false;
|
|
626
|
+
const cleanup = () => {
|
|
627
|
+
if (cleanedUp)
|
|
628
|
+
return;
|
|
629
|
+
cleanedUp = true;
|
|
630
|
+
try {
|
|
631
|
+
proc.removeAllListeners();
|
|
632
|
+
}
|
|
633
|
+
catch { }
|
|
634
|
+
this.logGitCommandComplete(gitCommand, exception, getDurationMilliseconds(start), false, streamId);
|
|
635
|
+
};
|
|
636
|
+
try {
|
|
637
|
+
this.logGitCommandStart(gitCommand, streamId);
|
|
638
|
+
try {
|
|
639
|
+
if (proc.stdout) {
|
|
640
|
+
const enc = encoding ?? 'utf8';
|
|
641
|
+
if (enc === 'utf8' || enc === 'binary' || enc === 'buffer') {
|
|
642
|
+
proc.stdout.setEncoding(enc === 'buffer' ? 'utf8' : enc);
|
|
643
|
+
for await (const chunk of proc.stdout) {
|
|
644
|
+
yield chunk;
|
|
645
|
+
}
|
|
646
|
+
}
|
|
647
|
+
else {
|
|
648
|
+
// Non-UTF-8 encoding: collect raw buffers and decode at the end.
|
|
649
|
+
// Streaming decode is unsafe because chunk boundaries can split
|
|
650
|
+
// multi-byte sequences in the source encoding.
|
|
651
|
+
const decode = this.options.decode;
|
|
652
|
+
if (decode == null) {
|
|
653
|
+
throw new Error(`Non-UTF-8 encoding '${enc}' requested for stream but no decode function configured`);
|
|
654
|
+
}
|
|
655
|
+
const buffers = [];
|
|
656
|
+
for await (const chunk of proc.stdout) {
|
|
657
|
+
buffers.push(Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk));
|
|
658
|
+
}
|
|
659
|
+
yield await decode(Buffer.concat(buffers), { encoding: enc });
|
|
660
|
+
}
|
|
661
|
+
}
|
|
662
|
+
}
|
|
663
|
+
finally {
|
|
664
|
+
// This await MUST be in this inner finally block to ensure the child process close event completes
|
|
665
|
+
// before we call removeAllListeners() in the outer finally. When consumers break early from the
|
|
666
|
+
// async generator (e.g., reading only the first chunk), the git process receives SIGPIPE and triggers
|
|
667
|
+
// the close handler asynchronously. Without awaiting here, removeAllListeners() would execute before
|
|
668
|
+
// the close handler finishes, causing a race condition and potential resource leaks.
|
|
669
|
+
await promise;
|
|
670
|
+
}
|
|
671
|
+
}
|
|
672
|
+
catch (ex) {
|
|
673
|
+
exception = ex;
|
|
674
|
+
throw ex;
|
|
675
|
+
}
|
|
676
|
+
finally {
|
|
677
|
+
cleanup();
|
|
678
|
+
}
|
|
679
|
+
// Ensure cleanup happens immediately when the generator is explicitly closed (e.g., via break or return)
|
|
680
|
+
// This is called by JavaScript when the generator is abandoned, ensuring logGitCommand is called
|
|
681
|
+
// synchronously rather than waiting for garbage collection.
|
|
682
|
+
// eslint-disable-next-line @typescript-eslint/no-meaningless-void-operator
|
|
683
|
+
return void cleanup();
|
|
684
|
+
}
|
|
685
|
+
async rev_parse__git_dir(cwd) {
|
|
686
|
+
const result = await this.exec({ cwd: cwd, errors: 'ignore' }, 'rev-parse', '--git-dir', '--git-common-dir');
|
|
687
|
+
if (!result.stdout)
|
|
688
|
+
return undefined;
|
|
689
|
+
// Keep trailing spaces which are part of the directory name
|
|
690
|
+
let [dotGitPath, commonDotGitPath] = result.stdout.split('\n').map(r => r.trimStart());
|
|
691
|
+
// Make sure to normalize: https://github.com/git-for-windows/git/issues/2478
|
|
692
|
+
if (!isAbsolute(dotGitPath)) {
|
|
693
|
+
dotGitPath = joinPaths(cwd, dotGitPath);
|
|
694
|
+
}
|
|
695
|
+
dotGitPath = normalizePath(dotGitPath);
|
|
696
|
+
if (commonDotGitPath) {
|
|
697
|
+
if (!isAbsolute(commonDotGitPath)) {
|
|
698
|
+
commonDotGitPath = joinPaths(cwd, commonDotGitPath);
|
|
699
|
+
}
|
|
700
|
+
commonDotGitPath = normalizePath(commonDotGitPath);
|
|
701
|
+
return { path: dotGitPath, commonPath: commonDotGitPath !== dotGitPath ? commonDotGitPath : undefined };
|
|
702
|
+
}
|
|
703
|
+
return { path: dotGitPath };
|
|
704
|
+
}
|
|
705
|
+
async rev_parse__show_toplevel(cwd) {
|
|
706
|
+
let result;
|
|
707
|
+
if (this.options.isTrusted?.() === false) {
|
|
708
|
+
// Check if the folder is a bare clone: if it has a file named HEAD && `rev-parse --show-cdup` is empty
|
|
709
|
+
if (await fsExists(joinPaths(cwd, 'HEAD'))) {
|
|
710
|
+
try {
|
|
711
|
+
result = await this.exec({ cwd: cwd, errors: 'throw', configs: ['-C', cwd] }, 'rev-parse', '--show-cdup');
|
|
712
|
+
if (!result.stdout.trim()) {
|
|
713
|
+
Logger.warn(`Skipping (untrusted workspace); bare clone repository detected in '${cwd}'`);
|
|
714
|
+
return emptyArray;
|
|
715
|
+
}
|
|
716
|
+
}
|
|
717
|
+
catch {
|
|
718
|
+
// If this throws, we should be good to open the repo (e.g. HEAD doesn't exist)
|
|
719
|
+
}
|
|
720
|
+
}
|
|
721
|
+
}
|
|
722
|
+
try {
|
|
723
|
+
result = await this.exec({ cwd: cwd, errors: 'throw' }, 'rev-parse', '--show-toplevel');
|
|
724
|
+
// Make sure to normalize: https://github.com/git-for-windows/git/issues/2478
|
|
725
|
+
// Keep trailing spaces which are part of the directory name
|
|
726
|
+
return !result.stdout
|
|
727
|
+
? emptyArray
|
|
728
|
+
: [true, normalizePath(result.stdout.trimStart().replace(trailingNewlineRegex, ''))];
|
|
729
|
+
}
|
|
730
|
+
catch (ex) {
|
|
731
|
+
if (ex instanceof WorkspaceUntrustedError)
|
|
732
|
+
return emptyArray;
|
|
733
|
+
if (!(ex instanceof GitError))
|
|
734
|
+
throw ex;
|
|
735
|
+
const unsafeMatch = GitErrors.unsafeRepository.exec(ex.stderr ?? '');
|
|
736
|
+
if (unsafeMatch != null) {
|
|
737
|
+
Logger.warn(`Skipping; unsafe repository detected in '${unsafeMatch[1] || unsafeMatch[2]}'; run '${unsafeMatch[3]}' to allow it`);
|
|
738
|
+
return [false];
|
|
739
|
+
}
|
|
740
|
+
const inDotGit = GitWarnings.mustRunInWorkTree.test(ex.stderr ?? '');
|
|
741
|
+
// Check if we are in a bare clone
|
|
742
|
+
if (inDotGit && this.options.isTrusted?.() !== false) {
|
|
743
|
+
result = await this.exec({ cwd: cwd, errors: 'ignore' }, 'rev-parse', '--is-bare-repository');
|
|
744
|
+
if (result.stdout.trim() === 'true') {
|
|
745
|
+
const result = await this.rev_parse__git_dir(cwd);
|
|
746
|
+
const repoPath = result?.commonPath ?? result?.path;
|
|
747
|
+
if (repoPath?.length)
|
|
748
|
+
return [true, repoPath];
|
|
749
|
+
}
|
|
750
|
+
}
|
|
751
|
+
if (inDotGit || ex.original?.code === 'ENOENT') {
|
|
752
|
+
// If the `cwd` doesn't exist, walk backward to see if any parent folder exists
|
|
753
|
+
let exists = inDotGit ? false : await fsExists(cwd);
|
|
754
|
+
if (!exists) {
|
|
755
|
+
do {
|
|
756
|
+
const parent = dirname(cwd);
|
|
757
|
+
if (parent === cwd || parent.length === 0)
|
|
758
|
+
return emptyArray;
|
|
759
|
+
cwd = parent;
|
|
760
|
+
exists = await fsExists(cwd);
|
|
761
|
+
} while (!exists);
|
|
762
|
+
return this.rev_parse__show_toplevel(cwd);
|
|
763
|
+
}
|
|
764
|
+
}
|
|
765
|
+
return emptyArray;
|
|
766
|
+
}
|
|
767
|
+
}
|
|
768
|
+
logGitCommandStart(command, id) {
|
|
769
|
+
Logger.info(`${formatLoggableScopeBlock(`GIT:\u2192${id}`)} ${command} \u00b7 starting...`);
|
|
770
|
+
this.options.logger?.info(`${formatLoggableScopeBlock(`\u2192${id}`, '')} ${command} \u2022 starting...`);
|
|
771
|
+
}
|
|
772
|
+
logGitCommandComplete(command, ex, duration, waiting, id) {
|
|
773
|
+
const slow = duration > slowCallWarningThreshold;
|
|
774
|
+
const status = slow && waiting ? ' (slow, waiting)' : waiting ? ' (waiting)' : slow ? ' (slow)' : '';
|
|
775
|
+
if (ex != null) {
|
|
776
|
+
Logger.error(undefined, `${formatLoggableScopeBlock(id ? `GIT:\u2190${id}` : 'GIT')} ${command} \u00b7 ${isCancellationError(ex)
|
|
777
|
+
? 'cancelled'
|
|
778
|
+
: (ex.message || String(ex) || '')
|
|
779
|
+
.trim()
|
|
780
|
+
.replace(/fatal:\s*/g, '')
|
|
781
|
+
.replace(/\r?\n|\r/g, ' \u00b7 ')} [${duration}ms]${status}`);
|
|
782
|
+
}
|
|
783
|
+
else if (slow) {
|
|
784
|
+
Logger.warn(`${formatLoggableScopeBlock(id ? `GIT:\u2190${id}` : 'GIT', `*${duration}ms`)} ${command} [*${duration}ms]${status}`);
|
|
785
|
+
}
|
|
786
|
+
else {
|
|
787
|
+
Logger.info(`${formatLoggableScopeBlock(id ? `GIT:\u2190${id}` : 'GIT', `${duration}ms`)} ${command} [${duration}ms]${status}`);
|
|
788
|
+
}
|
|
789
|
+
const logMessage = `${formatLoggableScopeBlock(`${id ? `\u2190${id}` : ''}${slow ? '*' : ''}`, `${duration}ms`)} ${command}${status}`;
|
|
790
|
+
if (ex != null) {
|
|
791
|
+
this.options.logger?.error(`${logMessage} \u2022 FAILED\n${String(ex)}`);
|
|
792
|
+
}
|
|
793
|
+
else {
|
|
794
|
+
this.options.logger?.info(`${logMessage} \u2022 completed`);
|
|
795
|
+
}
|
|
796
|
+
}
|
|
797
|
+
}
|
|
798
|
+
export function defaultExceptionHandler(ex, cwd, start) {
|
|
799
|
+
if (isCancellationError(ex))
|
|
800
|
+
throw ex;
|
|
801
|
+
const msg = ex.message || ex.toString();
|
|
802
|
+
if (msg) {
|
|
803
|
+
for (const warning of Object.values(GitWarnings)) {
|
|
804
|
+
if (warning.test(msg)) {
|
|
805
|
+
const duration = start !== undefined ? ` [${getDurationMilliseconds(start)}ms]` : '';
|
|
806
|
+
Logger.warn(`[${cwd}] Git ${msg
|
|
807
|
+
.trim()
|
|
808
|
+
.replace(/fatal:\s*/g, '')
|
|
809
|
+
.replace(/\r?\n|\r/g, ' \u00b7 ')}${duration}`);
|
|
810
|
+
return;
|
|
811
|
+
}
|
|
812
|
+
}
|
|
813
|
+
const match = GitErrors.badRevision.exec(msg);
|
|
814
|
+
if (match != null) {
|
|
815
|
+
const [, ref] = match;
|
|
816
|
+
// Since looking up a ref with ^3 (e.g. looking for untracked files in a stash) can error on some versions of git just ignore it
|
|
817
|
+
if (ref?.endsWith('^3'))
|
|
818
|
+
return;
|
|
819
|
+
}
|
|
820
|
+
}
|
|
821
|
+
throw ex;
|
|
822
|
+
}
|
|
823
|
+
//# sourceMappingURL=git.js.map
|