@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,1084 @@
|
|
|
1
|
+
import type { Cache } from '../../git/cache.js';
|
|
2
|
+
import type { GitServiceContext } from '../../git/context.js';
|
|
3
|
+
import type {
|
|
4
|
+
GitDiff,
|
|
5
|
+
GitDiffFiles,
|
|
6
|
+
GitDiffFilter,
|
|
7
|
+
GitDiffShortStat,
|
|
8
|
+
ParsedGitDiff,
|
|
9
|
+
ParsedGitDiffHunks,
|
|
10
|
+
} from '../../git/models/diff.js';
|
|
11
|
+
import type { GitFile } from '../../git/models/file.js';
|
|
12
|
+
import type { GitRevisionRange, GitRevisionRangeNotation } from '../../git/models/revision.js';
|
|
13
|
+
import { deletedOrMissing, rootSha, uncommitted, uncommittedStaged } from '../../git/models/revision.js';
|
|
14
|
+
import {
|
|
15
|
+
parseGitApplyFiles,
|
|
16
|
+
parseGitDiff,
|
|
17
|
+
parseGitDiffNumStatFiles,
|
|
18
|
+
parseGitDiffShortStat,
|
|
19
|
+
parseGitFileDiff,
|
|
20
|
+
} from '../../git/parsers/diffParser.js';
|
|
21
|
+
import type {
|
|
22
|
+
GitDiffSubProvider,
|
|
23
|
+
NextComparisonUrisResult,
|
|
24
|
+
PreviousComparisonUrisResult,
|
|
25
|
+
PreviousRangeComparisonUrisResult,
|
|
26
|
+
} from '../../git/providers/diff.js';
|
|
27
|
+
import type { DisposableTemporaryGitIndex } from '../../git/providers/staging.js';
|
|
28
|
+
import type { DiffRange, RevisionUri } from '../../git/providers/types.js';
|
|
29
|
+
import {
|
|
30
|
+
getRevisionRangeParts,
|
|
31
|
+
isRevisionRange,
|
|
32
|
+
isUncommitted,
|
|
33
|
+
isUncommittedStaged,
|
|
34
|
+
} from '../../git/utils/revision.utils.js';
|
|
35
|
+
import { encodeGitLensRevisionUriAuthority } from '../../git/utils/uriAuthority.js';
|
|
36
|
+
import { debug } from '../../utils/decorators/log.js';
|
|
37
|
+
import { fnv1aHash } from '../../utils/hash.js';
|
|
38
|
+
import { first } from '../../utils/iterable.js';
|
|
39
|
+
import { getScopedLogger } from '../../utils/logger.scoped.js';
|
|
40
|
+
import { normalizePath, splitPath } from '../../utils/path.js';
|
|
41
|
+
import type { Uri } from '../../utils/uri.js';
|
|
42
|
+
import { fromUri, toFsPath } from '../../utils/uri.js';
|
|
43
|
+
import type { CliGitProviderInternal } from '../cliGitProvider.js';
|
|
44
|
+
import type { GitResult } from '../exec/exec.types.js';
|
|
45
|
+
import type { Git } from '../exec/git.js';
|
|
46
|
+
import { gitConfigsDiff, gitConfigsLog, GitError, GitErrors } from '../exec/git.js';
|
|
47
|
+
import type { LogParsedFile } from '../parsers/logParser.js';
|
|
48
|
+
import { getShaAndFileRangeLogParser, getShaAndFileSummaryLogParser } from '../parsers/logParser.js';
|
|
49
|
+
|
|
50
|
+
export class DiffGitSubProvider implements GitDiffSubProvider {
|
|
51
|
+
constructor(
|
|
52
|
+
private readonly context: GitServiceContext,
|
|
53
|
+
private readonly git: Git,
|
|
54
|
+
private readonly cache: Cache,
|
|
55
|
+
private readonly provider: CliGitProviderInternal,
|
|
56
|
+
) {}
|
|
57
|
+
|
|
58
|
+
@debug()
|
|
59
|
+
async getChangedFilesCount(
|
|
60
|
+
repoPath: string,
|
|
61
|
+
to?: string,
|
|
62
|
+
from?: string,
|
|
63
|
+
options?: { uris?: (string | Uri)[] },
|
|
64
|
+
_cancellation?: AbortSignal,
|
|
65
|
+
): Promise<GitDiffShortStat | undefined> {
|
|
66
|
+
const scope = getScopedLogger();
|
|
67
|
+
|
|
68
|
+
const args: string[] = [];
|
|
69
|
+
if (to != null) {
|
|
70
|
+
// Handle revision ranges specially if there is no `from`, otherwise `prepareToFromDiffArgs` will duplicate the range
|
|
71
|
+
if (isRevisionRange(to) && from == null) {
|
|
72
|
+
args.push(to);
|
|
73
|
+
} else {
|
|
74
|
+
prepareToFromDiffArgs(to, from, args);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
try {
|
|
79
|
+
const result = await this.git.exec(
|
|
80
|
+
{ cwd: repoPath, configs: gitConfigsDiff },
|
|
81
|
+
'diff',
|
|
82
|
+
'--shortstat',
|
|
83
|
+
'--no-ext-diff',
|
|
84
|
+
...args,
|
|
85
|
+
'--',
|
|
86
|
+
...(options?.uris?.map(p => this.provider.getRelativePath(p, repoPath)) ?? []),
|
|
87
|
+
);
|
|
88
|
+
if (!result.stdout) return undefined;
|
|
89
|
+
|
|
90
|
+
return parseGitDiffShortStat(result.stdout);
|
|
91
|
+
} catch (ex) {
|
|
92
|
+
const msg: string = ex?.toString() ?? '';
|
|
93
|
+
if (GitErrors.noMergeBase.test(msg)) {
|
|
94
|
+
return undefined;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
scope?.error(ex);
|
|
98
|
+
throw ex;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
@debug()
|
|
103
|
+
async getDiff(
|
|
104
|
+
repoPath: string,
|
|
105
|
+
to: string,
|
|
106
|
+
from?: string,
|
|
107
|
+
options?: {
|
|
108
|
+
context?: number;
|
|
109
|
+
index?: DisposableTemporaryGitIndex;
|
|
110
|
+
notation?: GitRevisionRangeNotation;
|
|
111
|
+
uris?: (string | Uri)[];
|
|
112
|
+
},
|
|
113
|
+
_cancellation?: AbortSignal,
|
|
114
|
+
): Promise<GitDiff | undefined> {
|
|
115
|
+
const scope = getScopedLogger();
|
|
116
|
+
const args = [`-U${options?.context ?? 3}`];
|
|
117
|
+
|
|
118
|
+
if (to != null && isRevisionRange(to)) {
|
|
119
|
+
const parts = getRevisionRangeParts(to);
|
|
120
|
+
if (parts != null) {
|
|
121
|
+
to = parts.right ?? '';
|
|
122
|
+
from = parts.left;
|
|
123
|
+
options = { ...options, notation: parts.notation };
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
from = prepareToFromDiffArgs(to, from, args, options?.notation);
|
|
128
|
+
|
|
129
|
+
let paths: Set<string> | undefined;
|
|
130
|
+
if (options?.uris) {
|
|
131
|
+
paths = new Set<string>(options.uris.map(p => this.provider.getRelativePath(p, repoPath)));
|
|
132
|
+
args.push('--', ...paths);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
let result;
|
|
136
|
+
try {
|
|
137
|
+
result = await this.git.exec(
|
|
138
|
+
{ cwd: repoPath, configs: gitConfigsDiff, errors: 'throw', env: options?.index?.env },
|
|
139
|
+
'diff',
|
|
140
|
+
...args,
|
|
141
|
+
args.includes('--') ? undefined : '--',
|
|
142
|
+
);
|
|
143
|
+
} catch (ex) {
|
|
144
|
+
scope?.error(ex);
|
|
145
|
+
return undefined;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
const diff: GitDiff = { contents: result.stdout, from: from, to: to, notation: options?.notation };
|
|
149
|
+
return diff;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
@debug()
|
|
153
|
+
async getParsedDiff(
|
|
154
|
+
repoPath: string,
|
|
155
|
+
to: string,
|
|
156
|
+
from?: string,
|
|
157
|
+
options?: {
|
|
158
|
+
context?: number;
|
|
159
|
+
notation?: GitRevisionRangeNotation;
|
|
160
|
+
uris?: (string | Uri)[];
|
|
161
|
+
},
|
|
162
|
+
cancellation?: AbortSignal,
|
|
163
|
+
): Promise<ParsedGitDiff | undefined> {
|
|
164
|
+
const diff = await this.getDiff(repoPath, to, from, options, cancellation);
|
|
165
|
+
if (!diff?.contents) return undefined;
|
|
166
|
+
|
|
167
|
+
return parseGitDiff(diff.contents);
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
@debug({ args: repoPath => ({ repoPath: repoPath }) })
|
|
171
|
+
async getDiffFiles(
|
|
172
|
+
repoPath: string,
|
|
173
|
+
contents: string,
|
|
174
|
+
_cancellation?: AbortSignal,
|
|
175
|
+
): Promise<GitDiffFiles | undefined> {
|
|
176
|
+
const result = await this.git.exec(
|
|
177
|
+
{ cwd: repoPath, configs: gitConfigsLog, stdin: contents },
|
|
178
|
+
'apply',
|
|
179
|
+
'--numstat',
|
|
180
|
+
'--summary',
|
|
181
|
+
'-z',
|
|
182
|
+
'-',
|
|
183
|
+
);
|
|
184
|
+
if (!result.stdout) return undefined;
|
|
185
|
+
|
|
186
|
+
const files = parseGitApplyFiles(result.stdout, repoPath);
|
|
187
|
+
return {
|
|
188
|
+
files: files,
|
|
189
|
+
};
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
@debug()
|
|
193
|
+
async getDiffStatus(
|
|
194
|
+
repoPath: string,
|
|
195
|
+
ref1OrRange: string | GitRevisionRange,
|
|
196
|
+
ref2?: string,
|
|
197
|
+
options?: { filters?: GitDiffFilter[]; path?: string; renameLimit?: number; similarityThreshold?: number },
|
|
198
|
+
): Promise<GitFile[] | undefined> {
|
|
199
|
+
try {
|
|
200
|
+
const similarityThreshold = options?.similarityThreshold;
|
|
201
|
+
const configs =
|
|
202
|
+
options?.renameLimit != null
|
|
203
|
+
? [...gitConfigsDiff, '-c', `diff.renameLimit=${options.renameLimit}`]
|
|
204
|
+
: gitConfigsDiff;
|
|
205
|
+
const result = await this.git.exec(
|
|
206
|
+
{ cwd: repoPath, configs: configs },
|
|
207
|
+
'diff',
|
|
208
|
+
'--numstat',
|
|
209
|
+
'--summary',
|
|
210
|
+
`-M${similarityThreshold == null ? '' : `${similarityThreshold}%`}`,
|
|
211
|
+
'--no-ext-diff',
|
|
212
|
+
'-z',
|
|
213
|
+
options?.filters?.length ? `--diff-filter=${options.filters.join('')}` : undefined,
|
|
214
|
+
ref1OrRange ? ref1OrRange : undefined,
|
|
215
|
+
ref2 ? ref2 : undefined,
|
|
216
|
+
'--',
|
|
217
|
+
options?.path ? options.path : undefined,
|
|
218
|
+
);
|
|
219
|
+
if (!result.stdout) return undefined;
|
|
220
|
+
|
|
221
|
+
return parseGitDiffNumStatFiles(result.stdout, repoPath);
|
|
222
|
+
} catch (_ex) {
|
|
223
|
+
return undefined;
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
@debug()
|
|
228
|
+
async getDiffTool(repoPath?: string): Promise<string | undefined> {
|
|
229
|
+
return (
|
|
230
|
+
(await this.provider.config.getConfig?.(repoPath, 'diff.guitool', { runGitLocally: true })) ??
|
|
231
|
+
this.provider.config.getConfig?.(repoPath, 'diff.tool', { runGitLocally: true })
|
|
232
|
+
);
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
@debug()
|
|
236
|
+
async getNextComparisonUris(
|
|
237
|
+
repoPath: string,
|
|
238
|
+
pathOrUri: string | Uri,
|
|
239
|
+
rev: string | undefined,
|
|
240
|
+
skip: number = 0,
|
|
241
|
+
options?: { ordering?: 'date' | 'author-date' | 'topo' | null },
|
|
242
|
+
_cancellation?: AbortSignal,
|
|
243
|
+
): Promise<NextComparisonUrisResult | undefined> {
|
|
244
|
+
// If we have no revision there is no next commit
|
|
245
|
+
if (!rev) return undefined;
|
|
246
|
+
|
|
247
|
+
const scope = getScopedLogger();
|
|
248
|
+
|
|
249
|
+
let relativePath = this.provider.getRelativePath(pathOrUri, repoPath);
|
|
250
|
+
|
|
251
|
+
if (isUncommittedStaged(rev)) {
|
|
252
|
+
return {
|
|
253
|
+
current: createRevisionUri(this.provider, repoPath, relativePath, rev),
|
|
254
|
+
next: createRevisionUri(this.provider, repoPath, relativePath, undefined),
|
|
255
|
+
};
|
|
256
|
+
} else if (isUncommitted(rev)) {
|
|
257
|
+
return undefined;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
try {
|
|
261
|
+
const parser = getShaAndFileSummaryLogParser();
|
|
262
|
+
const args = ['log', ...parser.arguments];
|
|
263
|
+
|
|
264
|
+
const ordering = options?.ordering ?? this.context.config?.commits.ordering;
|
|
265
|
+
if (ordering) {
|
|
266
|
+
args.push(`--${ordering}-order`);
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
args.push(
|
|
270
|
+
// Use reverse to get the next commits (oldest to newest instead of newest to oldest)
|
|
271
|
+
'--reverse',
|
|
272
|
+
);
|
|
273
|
+
|
|
274
|
+
if (rev !== deletedOrMissing) {
|
|
275
|
+
args.push(
|
|
276
|
+
// Ancestry path to ensure we only follow the path from the given revision to HEAD
|
|
277
|
+
'--ancestry-path',
|
|
278
|
+
// Range from the given revision to HEAD
|
|
279
|
+
`${rev}..HEAD`,
|
|
280
|
+
);
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
// Follow file history and specify the file path
|
|
284
|
+
args.push('--follow', '--', relativePath);
|
|
285
|
+
|
|
286
|
+
const result = await this.git.exec({ cwd: repoPath, configs: gitConfigsLog }, ...args);
|
|
287
|
+
|
|
288
|
+
let currentSha;
|
|
289
|
+
let currentPath;
|
|
290
|
+
|
|
291
|
+
if (skip === 0) {
|
|
292
|
+
currentSha = rev;
|
|
293
|
+
currentPath = relativePath;
|
|
294
|
+
} else {
|
|
295
|
+
skip--;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
let nextSha;
|
|
299
|
+
let nextPath;
|
|
300
|
+
|
|
301
|
+
let file;
|
|
302
|
+
for (const commit of parser.parse(result.stdout)) {
|
|
303
|
+
const path = relativePath;
|
|
304
|
+
file = commit.files.find(f => f.path === path || f.originalPath === path);
|
|
305
|
+
// Keep track of the file changing paths
|
|
306
|
+
if (file?.path && file.path !== relativePath) {
|
|
307
|
+
relativePath = file.path;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
if (skip > 0) {
|
|
311
|
+
skip--;
|
|
312
|
+
continue;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
if (currentSha == null) {
|
|
316
|
+
currentSha = commit.sha;
|
|
317
|
+
currentPath = file?.path ?? relativePath;
|
|
318
|
+
} else if (nextSha == null) {
|
|
319
|
+
// if (commit.sha === rev) continue;
|
|
320
|
+
|
|
321
|
+
nextSha = commit.sha;
|
|
322
|
+
nextPath = file?.path ?? relativePath;
|
|
323
|
+
|
|
324
|
+
break;
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
if (currentSha == null || currentPath == null) {
|
|
329
|
+
const status = await this.provider.status?.getStatusForFile?.(repoPath, relativePath);
|
|
330
|
+
if (status != null) {
|
|
331
|
+
if (status.indexStatus != null) {
|
|
332
|
+
currentSha = uncommittedStaged;
|
|
333
|
+
currentPath = status.originalPath ?? status.path;
|
|
334
|
+
nextSha = '';
|
|
335
|
+
nextPath = status.path;
|
|
336
|
+
} else {
|
|
337
|
+
return undefined;
|
|
338
|
+
}
|
|
339
|
+
} else {
|
|
340
|
+
return undefined;
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
if (nextSha == null || nextPath == null) {
|
|
345
|
+
const status = await this.provider.status?.getStatusForFile?.(repoPath, relativePath);
|
|
346
|
+
if (status != null) {
|
|
347
|
+
if (status.indexStatus != null) {
|
|
348
|
+
nextSha = uncommittedStaged;
|
|
349
|
+
nextPath = status.originalPath ?? status.path;
|
|
350
|
+
} else {
|
|
351
|
+
nextSha = '';
|
|
352
|
+
nextPath = status.path;
|
|
353
|
+
}
|
|
354
|
+
} else {
|
|
355
|
+
nextSha = '';
|
|
356
|
+
nextPath = relativePath;
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
return {
|
|
361
|
+
current: createRevisionUri(this.provider, repoPath, currentPath, currentSha || undefined),
|
|
362
|
+
next: createRevisionUri(
|
|
363
|
+
this.provider,
|
|
364
|
+
repoPath,
|
|
365
|
+
nextPath ?? currentPath,
|
|
366
|
+
(nextSha ?? deletedOrMissing) || undefined,
|
|
367
|
+
),
|
|
368
|
+
};
|
|
369
|
+
} catch (ex) {
|
|
370
|
+
scope?.error(ex);
|
|
371
|
+
throw ex;
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
@debug()
|
|
376
|
+
async getPreviousComparisonUris(
|
|
377
|
+
repoPath: string,
|
|
378
|
+
pathOrUri: string | Uri,
|
|
379
|
+
rev: string | undefined,
|
|
380
|
+
skip: number = 0,
|
|
381
|
+
unsaved?: boolean,
|
|
382
|
+
options?: { ordering?: 'date' | 'author-date' | 'topo' | null },
|
|
383
|
+
_cancellation?: AbortSignal,
|
|
384
|
+
): Promise<PreviousComparisonUrisResult | undefined> {
|
|
385
|
+
if (rev === deletedOrMissing) return undefined;
|
|
386
|
+
|
|
387
|
+
const scope = getScopedLogger();
|
|
388
|
+
|
|
389
|
+
if (rev === uncommitted) {
|
|
390
|
+
rev = undefined;
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
/* Rules:
|
|
394
|
+
* Starting from working tree (rev is empty or undefined):
|
|
395
|
+
* 1. Check file status:
|
|
396
|
+
* 1.1. If file has both staged and working (or unsaved) changes:
|
|
397
|
+
* - If skip=0: diff working with staged
|
|
398
|
+
* - If skip>0: skip through revs starting at HEAD
|
|
399
|
+
*
|
|
400
|
+
* 1.2. If file has only staged changes:
|
|
401
|
+
* - If skip=0: diff working with HEAD
|
|
402
|
+
* - If skip>0: skip through revs starting at HEAD
|
|
403
|
+
*
|
|
404
|
+
* 1.3. If file has only working changes:
|
|
405
|
+
* - If skip=0: diff working with HEAD
|
|
406
|
+
* - If skip>0: skip through revs starting at HEAD
|
|
407
|
+
*
|
|
408
|
+
* 1.4. If file has no changes (or no status found):
|
|
409
|
+
* - If skip=0: diff working with HEAD~1
|
|
410
|
+
* - If skip>0: skip through revs starting at HEAD~1
|
|
411
|
+
*
|
|
412
|
+
* Starting from staged (rev is uncommittedStaged):
|
|
413
|
+
* 1. Check file status:
|
|
414
|
+
* 1.1. If status exists:
|
|
415
|
+
* - If skip=0: diff staged with HEAD
|
|
416
|
+
* - If skip>0: skip through revs starting at HEAD
|
|
417
|
+
*
|
|
418
|
+
* 1.2. If status doesn't exist:
|
|
419
|
+
* - If skip=0: diff HEAD with HEAD~1
|
|
420
|
+
* - If skip>0: skip through revs starting at HEAD
|
|
421
|
+
*
|
|
422
|
+
* Starting from a commit (rev is a SHA):
|
|
423
|
+
* - If skip=0: diff SHA with SHA^
|
|
424
|
+
* - If skip>0: skip through revs starting at SHA
|
|
425
|
+
*/
|
|
426
|
+
|
|
427
|
+
let relativePath = this.provider.getRelativePath(pathOrUri, repoPath);
|
|
428
|
+
let skipPrev = 0;
|
|
429
|
+
|
|
430
|
+
let revs: [string, string][] = [];
|
|
431
|
+
if (!rev) {
|
|
432
|
+
revs = [['', relativePath]];
|
|
433
|
+
|
|
434
|
+
const status = await this.provider.status?.getStatusForFile?.(repoPath, pathOrUri);
|
|
435
|
+
if (status != null) {
|
|
436
|
+
if (status.indexStatus != null) {
|
|
437
|
+
revs.push([uncommittedStaged, status.originalPath ?? status.path]);
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
revs.push(['HEAD', status.originalPath ?? status.path]);
|
|
441
|
+
if (status.workingTreeStatus == null && !unsaved) {
|
|
442
|
+
if (skip === 0 || status.indexStatus == null) {
|
|
443
|
+
// Skip over the HEAD commit to get a diff, because working and HEAD are the same
|
|
444
|
+
skipPrev++;
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
} else {
|
|
448
|
+
revs.push(['HEAD', relativePath]);
|
|
449
|
+
if (!unsaved) {
|
|
450
|
+
// Skip over the HEAD commit to get a diff, because working and HEAD are the same
|
|
451
|
+
skipPrev++;
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
} else if (isUncommittedStaged(rev)) {
|
|
455
|
+
const status = await this.provider.status?.getStatusForFile?.(repoPath, pathOrUri);
|
|
456
|
+
if (status != null) {
|
|
457
|
+
revs = [
|
|
458
|
+
[uncommittedStaged, status.originalPath ?? status.path],
|
|
459
|
+
['HEAD', status.originalPath ?? status.path],
|
|
460
|
+
];
|
|
461
|
+
} else {
|
|
462
|
+
// Even though we supposedly started at staged, there is no staged version
|
|
463
|
+
revs = [['HEAD', relativePath]];
|
|
464
|
+
if (skip > 0) {
|
|
465
|
+
skip--;
|
|
466
|
+
}
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
let currentSha;
|
|
471
|
+
let currentPath;
|
|
472
|
+
|
|
473
|
+
if (revs.length) {
|
|
474
|
+
skip++;
|
|
475
|
+
while (revs.length && skip > 0) {
|
|
476
|
+
skip--;
|
|
477
|
+
[rev, relativePath] = revs.shift()!;
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
if (rev !== 'HEAD') {
|
|
481
|
+
currentSha = rev;
|
|
482
|
+
currentPath = relativePath;
|
|
483
|
+
|
|
484
|
+
skipPrev++;
|
|
485
|
+
while (revs.length && skipPrev > 0) {
|
|
486
|
+
skipPrev--;
|
|
487
|
+
[rev, relativePath] = revs.shift()!;
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
if (skipPrev > 0) {
|
|
491
|
+
skip += skipPrev;
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
if (rev !== 'HEAD' && skip === 0) {
|
|
495
|
+
return {
|
|
496
|
+
current: createRevisionUri(this.provider, repoPath, currentPath, currentSha),
|
|
497
|
+
previous: createRevisionUri(this.provider, repoPath, relativePath, rev),
|
|
498
|
+
};
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
try {
|
|
504
|
+
const parser = getShaAndFileSummaryLogParser();
|
|
505
|
+
const args = ['log', ...parser.arguments, `-n${skip + 2}`]; // Don't use --skip as it doesn't work with --follow
|
|
506
|
+
|
|
507
|
+
const ordering = options?.ordering ?? this.context.config?.commits.ordering;
|
|
508
|
+
if (ordering) {
|
|
509
|
+
args.push(`--${ordering}-order`);
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
args.push('--follow', rev!, '--', relativePath);
|
|
513
|
+
|
|
514
|
+
const result = await this.git.exec(
|
|
515
|
+
{
|
|
516
|
+
cwd: repoPath,
|
|
517
|
+
configs: gitConfigsLog,
|
|
518
|
+
caching: { cache: this.cache.gitResults, options: { accessTTL: 5 * 60 * 1000 } },
|
|
519
|
+
},
|
|
520
|
+
...args,
|
|
521
|
+
);
|
|
522
|
+
|
|
523
|
+
let previousSha;
|
|
524
|
+
let previousPath;
|
|
525
|
+
let file;
|
|
526
|
+
|
|
527
|
+
for (const commit of parser.parse(result.stdout)) {
|
|
528
|
+
const path = relativePath;
|
|
529
|
+
file = commit.files.find(f => f.path === path || f.originalPath === path);
|
|
530
|
+
// Keep track of the file changing paths
|
|
531
|
+
if (file?.originalPath && file.originalPath !== relativePath) {
|
|
532
|
+
relativePath = file.originalPath;
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
if (skip > 0) {
|
|
536
|
+
skip--;
|
|
537
|
+
continue;
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
if (currentSha == null) {
|
|
541
|
+
currentSha = commit.sha;
|
|
542
|
+
currentPath = file?.path ?? relativePath;
|
|
543
|
+
} else if (previousSha == null) {
|
|
544
|
+
if (commit.sha === rev) continue;
|
|
545
|
+
|
|
546
|
+
previousSha = commit.sha;
|
|
547
|
+
previousPath = file?.path ?? relativePath;
|
|
548
|
+
|
|
549
|
+
break;
|
|
550
|
+
}
|
|
551
|
+
}
|
|
552
|
+
|
|
553
|
+
if (currentSha == null || currentPath == null) return undefined;
|
|
554
|
+
|
|
555
|
+
return {
|
|
556
|
+
current: createRevisionUri(this.provider, repoPath, currentPath, currentSha || undefined),
|
|
557
|
+
previous: createRevisionUri(
|
|
558
|
+
this.provider,
|
|
559
|
+
repoPath,
|
|
560
|
+
previousPath ?? currentPath,
|
|
561
|
+
previousSha ?? deletedOrMissing,
|
|
562
|
+
),
|
|
563
|
+
};
|
|
564
|
+
} catch (ex) {
|
|
565
|
+
scope?.error(ex);
|
|
566
|
+
throw ex;
|
|
567
|
+
}
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
@debug()
|
|
571
|
+
async getPreviousComparisonUrisForRange(
|
|
572
|
+
repoPath: string,
|
|
573
|
+
pathOrUri: string | Uri,
|
|
574
|
+
rev: string | undefined,
|
|
575
|
+
range: DiffRange,
|
|
576
|
+
options?: { ordering?: 'date' | 'author-date' | 'topo' | null; skipFirstRev?: boolean },
|
|
577
|
+
_cancellation?: AbortSignal,
|
|
578
|
+
): Promise<PreviousRangeComparisonUrisResult | undefined> {
|
|
579
|
+
if (rev === deletedOrMissing) return undefined;
|
|
580
|
+
|
|
581
|
+
const scope = getScopedLogger();
|
|
582
|
+
|
|
583
|
+
if (rev === uncommitted) {
|
|
584
|
+
rev = undefined;
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
let currentSha;
|
|
588
|
+
let currentPath;
|
|
589
|
+
let relativePath = this.provider.getRelativePath(pathOrUri, repoPath);
|
|
590
|
+
const skipFirstRev = options?.skipFirstRev ?? true;
|
|
591
|
+
|
|
592
|
+
// If we are at the working tree (i.e. no ref), we need to dig deeper to figure out where to go
|
|
593
|
+
if (!rev) {
|
|
594
|
+
const status = await this.provider.status?.getStatusForFile?.(repoPath, pathOrUri);
|
|
595
|
+
if (status != null) {
|
|
596
|
+
if (status.indexStatus != null) {
|
|
597
|
+
if (status.workingTreeStatus != null && !skipFirstRev) {
|
|
598
|
+
return {
|
|
599
|
+
current: createRevisionUri(this.provider, repoPath, relativePath, undefined),
|
|
600
|
+
previous: createRevisionUri(this.provider, repoPath, relativePath, uncommittedStaged),
|
|
601
|
+
range: range,
|
|
602
|
+
};
|
|
603
|
+
}
|
|
604
|
+
|
|
605
|
+
currentSha = uncommittedStaged;
|
|
606
|
+
currentPath = status.originalPath ?? status.path;
|
|
607
|
+
if (status.originalPath != null) {
|
|
608
|
+
relativePath = status.originalPath;
|
|
609
|
+
}
|
|
610
|
+
rev = uncommittedStaged;
|
|
611
|
+
} else if (status.workingTreeStatus != null && !skipFirstRev) {
|
|
612
|
+
currentSha = '';
|
|
613
|
+
currentPath = relativePath;
|
|
614
|
+
rev = '';
|
|
615
|
+
}
|
|
616
|
+
}
|
|
617
|
+
} else if (!skipFirstRev) {
|
|
618
|
+
currentSha = rev;
|
|
619
|
+
currentPath = relativePath;
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
try {
|
|
623
|
+
const parser = getShaAndFileRangeLogParser();
|
|
624
|
+
const args = ['log', ...parser.arguments, '-n2']; // Don't use --skip as it doesn't work with --follow
|
|
625
|
+
|
|
626
|
+
const ordering = options?.ordering ?? this.context.config?.commits.ordering;
|
|
627
|
+
if (ordering) {
|
|
628
|
+
args.push(`--${ordering}-order`);
|
|
629
|
+
}
|
|
630
|
+
|
|
631
|
+
if (rev && !isUncommittedStaged(rev)) {
|
|
632
|
+
args.push(rev);
|
|
633
|
+
}
|
|
634
|
+
|
|
635
|
+
args.push(`-L${range.startLine},${range.endLine}:${relativePath}`);
|
|
636
|
+
|
|
637
|
+
let result: GitResult;
|
|
638
|
+
try {
|
|
639
|
+
result = await this.git.exec({ cwd: repoPath, configs: gitConfigsLog }, ...args);
|
|
640
|
+
} catch (ex) {
|
|
641
|
+
if (rev && !isUncommittedStaged(rev)) throw ex;
|
|
642
|
+
|
|
643
|
+
// If the line count is invalid reset to a valid range
|
|
644
|
+
const match = GitErrors.invalidLineCount.exec(ex?.toString() ?? '');
|
|
645
|
+
if (match == null) throw ex;
|
|
646
|
+
|
|
647
|
+
const line = parseInt(match[1], 10);
|
|
648
|
+
if (isNaN(line)) throw ex;
|
|
649
|
+
|
|
650
|
+
const index = args.findIndex(a => a.startsWith('-L'));
|
|
651
|
+
if (index === -1) throw ex;
|
|
652
|
+
|
|
653
|
+
range = {
|
|
654
|
+
startLine: Math.min(range.startLine, line),
|
|
655
|
+
startCharacter: range.startCharacter,
|
|
656
|
+
endLine: Math.min(range.endLine, line),
|
|
657
|
+
endCharacter: range.endCharacter,
|
|
658
|
+
active: range.active,
|
|
659
|
+
};
|
|
660
|
+
|
|
661
|
+
args.splice(index, 1, `-L${range.startLine},${range.endLine}:${relativePath}`);
|
|
662
|
+
result = await this.git.exec({ cwd: repoPath, configs: gitConfigsLog }, ...args);
|
|
663
|
+
}
|
|
664
|
+
|
|
665
|
+
let currentRange;
|
|
666
|
+
let previousSha;
|
|
667
|
+
let previousPath;
|
|
668
|
+
let file;
|
|
669
|
+
|
|
670
|
+
for (const commit of parser.parse(result.stdout)) {
|
|
671
|
+
const path = relativePath;
|
|
672
|
+
file = commit.files.find(f => f.path === path || f.originalPath === path);
|
|
673
|
+
// If we couldn't find the file, but there is only one file in the commit, use that one and assume the filename changed
|
|
674
|
+
if (file == null && commit.files.length === 1) {
|
|
675
|
+
file = commit.files[0];
|
|
676
|
+
relativePath = file.path;
|
|
677
|
+
}
|
|
678
|
+
// Keep track of the file changing paths
|
|
679
|
+
if (file?.originalPath && file.originalPath !== relativePath) {
|
|
680
|
+
relativePath = file.originalPath;
|
|
681
|
+
}
|
|
682
|
+
|
|
683
|
+
if (currentSha == null) {
|
|
684
|
+
currentSha = commit.sha;
|
|
685
|
+
currentPath = file?.path ?? relativePath;
|
|
686
|
+
currentRange =
|
|
687
|
+
file?.range != null ? { ...file.range, startCharacter: 1, endCharacter: 1 } : undefined;
|
|
688
|
+
} else if (previousSha == null) {
|
|
689
|
+
if (commit.sha === rev) continue;
|
|
690
|
+
|
|
691
|
+
previousSha = commit.sha;
|
|
692
|
+
previousPath = file?.path ?? relativePath;
|
|
693
|
+
|
|
694
|
+
break;
|
|
695
|
+
}
|
|
696
|
+
}
|
|
697
|
+
|
|
698
|
+
if (currentSha == null || currentPath == null) return undefined;
|
|
699
|
+
|
|
700
|
+
// If we have no previous SHA but have a real current SHA, resolve the parent commit.
|
|
701
|
+
// This handles the case where a line is newly added — the line has no prior history,
|
|
702
|
+
// but the file likely existed at the parent commit
|
|
703
|
+
if (previousSha == null && currentSha) {
|
|
704
|
+
previousSha =
|
|
705
|
+
(await this.provider.refs.validateReference(repoPath, `${currentSha}^`)) ?? deletedOrMissing;
|
|
706
|
+
}
|
|
707
|
+
|
|
708
|
+
return {
|
|
709
|
+
current: createRevisionUri(this.provider, repoPath, currentPath, currentSha || undefined),
|
|
710
|
+
previous: createRevisionUri(
|
|
711
|
+
this.provider,
|
|
712
|
+
repoPath,
|
|
713
|
+
previousPath ?? currentPath,
|
|
714
|
+
previousSha ?? deletedOrMissing,
|
|
715
|
+
),
|
|
716
|
+
range: currentRange ?? range,
|
|
717
|
+
};
|
|
718
|
+
} catch (ex) {
|
|
719
|
+
scope?.error(ex);
|
|
720
|
+
throw ex;
|
|
721
|
+
}
|
|
722
|
+
}
|
|
723
|
+
|
|
724
|
+
/** Returns raw diff output for a file between two revisions. */
|
|
725
|
+
async diff(
|
|
726
|
+
repoPath: string,
|
|
727
|
+
fileName: string,
|
|
728
|
+
ref1?: string,
|
|
729
|
+
ref2?: string,
|
|
730
|
+
options?: {
|
|
731
|
+
encoding?: string;
|
|
732
|
+
filters?: GitDiffFilter[];
|
|
733
|
+
linesOfContext?: number;
|
|
734
|
+
renames?: boolean;
|
|
735
|
+
similarityThreshold?: number | null;
|
|
736
|
+
},
|
|
737
|
+
): Promise<GitResult> {
|
|
738
|
+
const params = ['diff', '--no-ext-diff', '--minimal'];
|
|
739
|
+
|
|
740
|
+
if (options?.linesOfContext != null) {
|
|
741
|
+
params.push(`-U${options.linesOfContext}`);
|
|
742
|
+
}
|
|
743
|
+
|
|
744
|
+
if (options?.renames) {
|
|
745
|
+
params.push(`-M${options.similarityThreshold == null ? '' : `${options.similarityThreshold}%`}`);
|
|
746
|
+
}
|
|
747
|
+
|
|
748
|
+
if (options?.filters != null && options.filters.length !== 0) {
|
|
749
|
+
params.push(`--diff-filter=${options.filters.join('')}`);
|
|
750
|
+
}
|
|
751
|
+
|
|
752
|
+
if (ref1) {
|
|
753
|
+
// <sha>^3 signals an untracked file in a stash and if we are trying to find its parent, use the root sha
|
|
754
|
+
if (ref1.endsWith('^3^')) {
|
|
755
|
+
ref1 = rootSha;
|
|
756
|
+
}
|
|
757
|
+
params.push(isUncommittedStaged(ref1) ? '--staged' : ref1);
|
|
758
|
+
}
|
|
759
|
+
if (ref2) {
|
|
760
|
+
params.push(isUncommittedStaged(ref2) ? '--staged' : ref2);
|
|
761
|
+
}
|
|
762
|
+
|
|
763
|
+
try {
|
|
764
|
+
return await this.git.exec(
|
|
765
|
+
{ cwd: repoPath, configs: gitConfigsDiff, encoding: options?.encoding },
|
|
766
|
+
...params,
|
|
767
|
+
'--',
|
|
768
|
+
fileName,
|
|
769
|
+
);
|
|
770
|
+
} catch (ex) {
|
|
771
|
+
const match = GitErrors.badRevision.exec(ex.message);
|
|
772
|
+
if (match !== null) {
|
|
773
|
+
const [, ref] = match;
|
|
774
|
+
|
|
775
|
+
// If the bad ref is trying to find a parent ref, assume we hit to the last commit, so try again using the root sha
|
|
776
|
+
if (ref === ref1 && ref?.endsWith('^')) {
|
|
777
|
+
return this.diff(repoPath, fileName, rootSha, ref2, options);
|
|
778
|
+
}
|
|
779
|
+
}
|
|
780
|
+
|
|
781
|
+
throw ex;
|
|
782
|
+
}
|
|
783
|
+
}
|
|
784
|
+
|
|
785
|
+
/** Returns raw diff output comparing a file's revision with given contents via stdin. */
|
|
786
|
+
async diffContents(
|
|
787
|
+
repoPath: string,
|
|
788
|
+
fileName: string,
|
|
789
|
+
ref: string,
|
|
790
|
+
contents: string,
|
|
791
|
+
options?: { encoding?: string; filters?: GitDiffFilter[]; similarityThreshold?: number | null },
|
|
792
|
+
): Promise<string> {
|
|
793
|
+
const params = [
|
|
794
|
+
'diff',
|
|
795
|
+
`-M${options?.similarityThreshold == null ? '' : `${options.similarityThreshold}%`}`,
|
|
796
|
+
'--no-ext-diff',
|
|
797
|
+
'-U0',
|
|
798
|
+
'--minimal',
|
|
799
|
+
];
|
|
800
|
+
|
|
801
|
+
if (options?.filters != null && options.filters.length !== 0) {
|
|
802
|
+
params.push(`--diff-filter=${options.filters.join('')}`);
|
|
803
|
+
}
|
|
804
|
+
|
|
805
|
+
params.push('--no-index');
|
|
806
|
+
|
|
807
|
+
try {
|
|
808
|
+
const result = await this.git.exec(
|
|
809
|
+
{
|
|
810
|
+
cwd: repoPath,
|
|
811
|
+
configs: gitConfigsDiff,
|
|
812
|
+
encoding: options?.encoding,
|
|
813
|
+
stdin: contents,
|
|
814
|
+
},
|
|
815
|
+
...params,
|
|
816
|
+
'--',
|
|
817
|
+
fileName,
|
|
818
|
+
// Pipe the contents to stdin
|
|
819
|
+
'-',
|
|
820
|
+
);
|
|
821
|
+
return result.stdout;
|
|
822
|
+
} catch (ex) {
|
|
823
|
+
if (ex instanceof GitError && ex.stdout) {
|
|
824
|
+
return ex.stdout;
|
|
825
|
+
}
|
|
826
|
+
|
|
827
|
+
const match = GitErrors.badRevision.exec(ex.message);
|
|
828
|
+
if (match !== null) {
|
|
829
|
+
const [, matchedRef] = match;
|
|
830
|
+
|
|
831
|
+
// If the bad ref is trying to find a parent ref, assume we hit to the last commit, so try again using the root sha
|
|
832
|
+
if (matchedRef === ref && matchedRef?.endsWith('^')) {
|
|
833
|
+
return this.diffContents(repoPath, fileName, rootSha, contents, options);
|
|
834
|
+
}
|
|
835
|
+
}
|
|
836
|
+
|
|
837
|
+
throw ex;
|
|
838
|
+
}
|
|
839
|
+
}
|
|
840
|
+
|
|
841
|
+
/** Returns parsed diff hunks for a file between two revisions. */
|
|
842
|
+
@debug()
|
|
843
|
+
getDiffForFile(
|
|
844
|
+
repoPath: string,
|
|
845
|
+
fileName: string,
|
|
846
|
+
ref1: string | undefined,
|
|
847
|
+
ref2?: string,
|
|
848
|
+
options?: { encoding?: string },
|
|
849
|
+
): Promise<ParsedGitDiffHunks | undefined> {
|
|
850
|
+
const cacheKey = `${normalizePath(fileName)}:${ref1 ?? ''}:${ref2 ?? ''}`;
|
|
851
|
+
return this.cache.diff.getOrCreate(
|
|
852
|
+
repoPath,
|
|
853
|
+
cacheKey,
|
|
854
|
+
() => this.getDiffForFileCore(repoPath, fileName, ref1, ref2, options),
|
|
855
|
+
{ errorTTL: 1000 * 60 },
|
|
856
|
+
);
|
|
857
|
+
}
|
|
858
|
+
|
|
859
|
+
private async getDiffForFileCore(
|
|
860
|
+
repoPath: string,
|
|
861
|
+
fileName: string,
|
|
862
|
+
ref1: string | undefined,
|
|
863
|
+
ref2: string | undefined,
|
|
864
|
+
options: { encoding?: string } | undefined,
|
|
865
|
+
): Promise<ParsedGitDiffHunks | undefined> {
|
|
866
|
+
// Include renames (R) and copies (C) so content diffs on renamed files still surface;
|
|
867
|
+
// --diff-filter runs after `-M` rename detection, so 'M' alone would drop valid rename diffs.
|
|
868
|
+
const result = await this.diff(repoPath, fileName, ref1, ref2, {
|
|
869
|
+
encoding: options?.encoding,
|
|
870
|
+
filters: ['M', 'R', 'C'],
|
|
871
|
+
linesOfContext: 0,
|
|
872
|
+
renames: true,
|
|
873
|
+
similarityThreshold: this.context.config?.commits.similarityThreshold,
|
|
874
|
+
});
|
|
875
|
+
return parseGitFileDiff(result.stdout);
|
|
876
|
+
}
|
|
877
|
+
|
|
878
|
+
/** Returns parsed diff hunks comparing a file's revision with given contents via stdin. */
|
|
879
|
+
@debug()
|
|
880
|
+
getDiffForFileContents(
|
|
881
|
+
repoPath: string,
|
|
882
|
+
fileName: string,
|
|
883
|
+
ref: string,
|
|
884
|
+
contents: string,
|
|
885
|
+
options?: { encoding?: string },
|
|
886
|
+
): Promise<ParsedGitDiffHunks | undefined> {
|
|
887
|
+
const cacheKey = `${normalizePath(fileName)}:${ref}:~${fnv1aHash(contents)}`;
|
|
888
|
+
return this.cache.diff.getOrCreate(
|
|
889
|
+
repoPath,
|
|
890
|
+
cacheKey,
|
|
891
|
+
() => this.getDiffForFileContentsCore(repoPath, fileName, ref, contents, options),
|
|
892
|
+
{ errorTTL: 1000 * 60 },
|
|
893
|
+
);
|
|
894
|
+
}
|
|
895
|
+
|
|
896
|
+
private async getDiffForFileContentsCore(
|
|
897
|
+
repoPath: string,
|
|
898
|
+
fileName: string,
|
|
899
|
+
ref: string,
|
|
900
|
+
contents: string,
|
|
901
|
+
options: { encoding?: string } | undefined,
|
|
902
|
+
): Promise<ParsedGitDiffHunks | undefined> {
|
|
903
|
+
const data = await this.diffContents(repoPath, fileName, ref, contents, {
|
|
904
|
+
encoding: options?.encoding,
|
|
905
|
+
filters: ['M', 'R', 'C'],
|
|
906
|
+
similarityThreshold: this.context.config?.commits.similarityThreshold,
|
|
907
|
+
});
|
|
908
|
+
return parseGitFileDiff(data);
|
|
909
|
+
}
|
|
910
|
+
|
|
911
|
+
/** Finds the most recent commit where the given path was copied, renamed, or deleted. */
|
|
912
|
+
@debug()
|
|
913
|
+
async findPathStatusChanged(
|
|
914
|
+
repoPath: string,
|
|
915
|
+
pathspec: string,
|
|
916
|
+
rev: string | undefined,
|
|
917
|
+
options?: { filters?: GitDiffFilter[]; ordering?: 'date' | 'author-date' | 'topo' | null },
|
|
918
|
+
): Promise<{ sha: string; file: LogParsedFile | undefined } | undefined> {
|
|
919
|
+
return findPathStatusChanged(this.git, repoPath, pathspec, rev, options);
|
|
920
|
+
}
|
|
921
|
+
|
|
922
|
+
@debug()
|
|
923
|
+
async openDiffTool(
|
|
924
|
+
repoPath: string,
|
|
925
|
+
pathOrUri: string | Uri,
|
|
926
|
+
options?: { ref1?: string; ref2?: string; staged?: boolean; tool?: string },
|
|
927
|
+
): Promise<void> {
|
|
928
|
+
const scope = getScopedLogger();
|
|
929
|
+
const [relativePath, root] = splitPath(toFsPath(pathOrUri), repoPath);
|
|
930
|
+
|
|
931
|
+
try {
|
|
932
|
+
let tool = options?.tool;
|
|
933
|
+
if (!tool) {
|
|
934
|
+
const scope = getScopedLogger();
|
|
935
|
+
|
|
936
|
+
tool = await this.getDiffTool(root);
|
|
937
|
+
if (tool == null) throw new Error('No diff tool found');
|
|
938
|
+
|
|
939
|
+
scope?.debug(`Using tool=${tool}`);
|
|
940
|
+
}
|
|
941
|
+
|
|
942
|
+
await this.git.exec(
|
|
943
|
+
{ cwd: root },
|
|
944
|
+
'difftool',
|
|
945
|
+
'--no-prompt',
|
|
946
|
+
`--tool=${tool}`,
|
|
947
|
+
options?.staged ? '--staged' : undefined,
|
|
948
|
+
options?.ref1 ? options.ref1 : undefined,
|
|
949
|
+
options?.ref2 ? options.ref2 : undefined,
|
|
950
|
+
'--',
|
|
951
|
+
relativePath,
|
|
952
|
+
);
|
|
953
|
+
} catch (ex) {
|
|
954
|
+
const msg: string = ex?.toString() ?? '';
|
|
955
|
+
if (msg === 'No diff tool found' || /Unknown .+? tool/.test(msg)) {
|
|
956
|
+
throw new Error(
|
|
957
|
+
'Unable to open changes because the specified diff tool cannot be found or no Git diff tool is configured',
|
|
958
|
+
{ cause: ex },
|
|
959
|
+
);
|
|
960
|
+
}
|
|
961
|
+
|
|
962
|
+
scope?.error(ex);
|
|
963
|
+
throw ex;
|
|
964
|
+
}
|
|
965
|
+
}
|
|
966
|
+
|
|
967
|
+
@debug()
|
|
968
|
+
async openDirectoryCompare(repoPath: string, ref1: string, ref2?: string, tool?: string): Promise<void> {
|
|
969
|
+
const scope = getScopedLogger();
|
|
970
|
+
|
|
971
|
+
try {
|
|
972
|
+
if (!tool) {
|
|
973
|
+
const scope = getScopedLogger();
|
|
974
|
+
|
|
975
|
+
tool = await this.getDiffTool(repoPath);
|
|
976
|
+
if (tool == null) throw new Error('No diff tool found');
|
|
977
|
+
|
|
978
|
+
scope?.debug(`Using tool=${tool}`);
|
|
979
|
+
}
|
|
980
|
+
|
|
981
|
+
await this.git.exec({ cwd: repoPath }, 'difftool', '--dir-diff', `--tool=${tool}`, ref1, ref2);
|
|
982
|
+
} catch (ex) {
|
|
983
|
+
const msg: string = ex?.toString() ?? '';
|
|
984
|
+
if (msg === 'No diff tool found' || /Unknown .+? tool/.test(msg)) {
|
|
985
|
+
throw new Error(
|
|
986
|
+
'Unable to open directory compare because the specified diff tool cannot be found or no Git diff tool is configured',
|
|
987
|
+
{ cause: ex },
|
|
988
|
+
);
|
|
989
|
+
}
|
|
990
|
+
|
|
991
|
+
scope?.error(ex);
|
|
992
|
+
throw ex;
|
|
993
|
+
}
|
|
994
|
+
}
|
|
995
|
+
}
|
|
996
|
+
function prepareToFromDiffArgs(
|
|
997
|
+
to: string,
|
|
998
|
+
from: string | undefined,
|
|
999
|
+
args: string[],
|
|
1000
|
+
notation?: GitRevisionRangeNotation,
|
|
1001
|
+
): string {
|
|
1002
|
+
if (to === uncommitted) {
|
|
1003
|
+
if (from != null) {
|
|
1004
|
+
args.push(from);
|
|
1005
|
+
} else {
|
|
1006
|
+
// Get only unstaged changes
|
|
1007
|
+
from = 'HEAD';
|
|
1008
|
+
}
|
|
1009
|
+
} else if (to === uncommittedStaged) {
|
|
1010
|
+
args.push('--staged');
|
|
1011
|
+
if (from != null) {
|
|
1012
|
+
args.push(from);
|
|
1013
|
+
} else {
|
|
1014
|
+
// Get only staged changes
|
|
1015
|
+
from = 'HEAD';
|
|
1016
|
+
}
|
|
1017
|
+
} else if (from == null) {
|
|
1018
|
+
if (to === '' || to.toUpperCase() === 'HEAD') {
|
|
1019
|
+
from = 'HEAD';
|
|
1020
|
+
args.push(from);
|
|
1021
|
+
} else {
|
|
1022
|
+
from = `${to}^`;
|
|
1023
|
+
args.push(from, to);
|
|
1024
|
+
}
|
|
1025
|
+
} else if (to === '') {
|
|
1026
|
+
args.push(from);
|
|
1027
|
+
} else if (notation != null) {
|
|
1028
|
+
args.push(`${from}${notation}${to}`);
|
|
1029
|
+
} else {
|
|
1030
|
+
args.push(from, to);
|
|
1031
|
+
}
|
|
1032
|
+
return from;
|
|
1033
|
+
}
|
|
1034
|
+
|
|
1035
|
+
function createRevisionUri(
|
|
1036
|
+
provider: CliGitProviderInternal,
|
|
1037
|
+
repoPath: string,
|
|
1038
|
+
relativePath: string,
|
|
1039
|
+
sha: string | undefined,
|
|
1040
|
+
): RevisionUri {
|
|
1041
|
+
return {
|
|
1042
|
+
uri: sha
|
|
1043
|
+
? fromUri({
|
|
1044
|
+
scheme: 'gitlens',
|
|
1045
|
+
authority: encodeGitLensRevisionUriAuthority({ ref: sha, repoPath: repoPath }),
|
|
1046
|
+
path: provider.getAbsoluteUri(relativePath, repoPath).path,
|
|
1047
|
+
})
|
|
1048
|
+
: provider.getAbsoluteUri(relativePath, repoPath),
|
|
1049
|
+
path: relativePath,
|
|
1050
|
+
sha: sha,
|
|
1051
|
+
repoPath: repoPath,
|
|
1052
|
+
};
|
|
1053
|
+
}
|
|
1054
|
+
|
|
1055
|
+
export async function findPathStatusChanged(
|
|
1056
|
+
git: Git,
|
|
1057
|
+
repoPath: string,
|
|
1058
|
+
pathspec: string,
|
|
1059
|
+
rev: string | undefined,
|
|
1060
|
+
options?: { filters?: GitDiffFilter[]; ordering?: 'date' | 'author-date' | 'topo' | null },
|
|
1061
|
+
): Promise<{ sha: string; file: LogParsedFile | undefined } | undefined> {
|
|
1062
|
+
const parser = getShaAndFileSummaryLogParser();
|
|
1063
|
+
|
|
1064
|
+
const ordering = options?.ordering;
|
|
1065
|
+
|
|
1066
|
+
const result = await git.exec(
|
|
1067
|
+
{ cwd: repoPath, configs: gitConfigsLog },
|
|
1068
|
+
'log',
|
|
1069
|
+
...parser.arguments,
|
|
1070
|
+
ordering ? `--${ordering}-order` : undefined,
|
|
1071
|
+
'--no-walk',
|
|
1072
|
+
`--diff-filter=${options?.filters?.length ? options.filters.join('') : 'RCD'}`,
|
|
1073
|
+
rev,
|
|
1074
|
+
// Note: --no-walk constrains to the exact commit (no ancestor search). Pathspec is omitted
|
|
1075
|
+
// because git suppresses rename detection with pathspecs (shows D instead of R, losing the destination path).
|
|
1076
|
+
'--',
|
|
1077
|
+
);
|
|
1078
|
+
|
|
1079
|
+
const commit = first(parser.parse(result.stdout));
|
|
1080
|
+
if (commit == null) return undefined;
|
|
1081
|
+
|
|
1082
|
+
const file = commit.files.find(f => f.path === pathspec || f.originalPath === pathspec);
|
|
1083
|
+
return { sha: commit.sha, file: file };
|
|
1084
|
+
}
|