Browse Source

Removes git "models" export file

main
Eric Amodio 2 years ago
parent
commit
f8211797d2
156 changed files with 687 additions and 691 deletions
  1. +1
    -1
      src/annotations/annotations.ts
  2. +3
    -1
      src/annotations/autolinks.ts
  3. +5
    -4
      src/annotations/blameAnnotationProvider.ts
  4. +6
    -5
      src/annotations/gutterBlameAnnotationProvider.ts
  5. +4
    -3
      src/annotations/gutterChangesAnnotationProvider.ts
  6. +5
    -5
      src/annotations/gutterHeatmapBlameAnnotationProvider.ts
  7. +4
    -3
      src/annotations/lineAnnotationController.ts
  8. +2
    -2
      src/avatars.ts
  9. +3
    -2
      src/codelens/codeLensProvider.ts
  10. +9
    -12
      src/commands/base.ts
  11. +2
    -2
      src/commands/createPullRequestOnRemote.ts
  12. +2
    -2
      src/commands/diffLineWithPrevious.ts
  13. +2
    -1
      src/commands/diffLineWithWorking.ts
  14. +2
    -1
      src/commands/diffWith.ts
  15. +2
    -2
      src/commands/diffWithNext.ts
  16. +3
    -2
      src/commands/diffWithPrevious.ts
  17. +3
    -3
      src/commands/diffWithRevision.ts
  18. +2
    -2
      src/commands/diffWithRevisionFrom.ts
  19. +2
    -2
      src/commands/diffWithWorking.ts
  20. +2
    -2
      src/commands/externalDiff.ts
  21. +4
    -3
      src/commands/git/branch.ts
  22. +6
    -3
      src/commands/git/cherry-pick.ts
  23. +3
    -2
      src/commands/git/coauthors.ts
  24. +4
    -3
      src/commands/git/fetch.ts
  25. +6
    -3
      src/commands/git/log.ts
  26. +6
    -3
      src/commands/git/merge.ts
  27. +5
    -3
      src/commands/git/pull.ts
  28. +5
    -3
      src/commands/git/push.ts
  29. +6
    -3
      src/commands/git/rebase.ts
  30. +6
    -3
      src/commands/git/reset.ts
  31. +6
    -3
      src/commands/git/revert.ts
  32. +5
    -3
      src/commands/git/search.ts
  33. +5
    -3
      src/commands/git/show.ts
  34. +6
    -4
      src/commands/git/stash.ts
  35. +5
    -3
      src/commands/git/status.ts
  36. +4
    -3
      src/commands/git/switch.ts
  37. +5
    -4
      src/commands/git/tag.ts
  38. +4
    -2
      src/commands/git/worktree.ts
  39. +10
    -10
      src/commands/gitCommands.actions.ts
  40. +2
    -2
      src/commands/openCommitOnRemote.ts
  41. +2
    -2
      src/commands/openFileAtRevision.ts
  42. +1
    -1
      src/commands/openFileAtRevisionFrom.ts
  43. +3
    -2
      src/commands/openFileOnRemote.ts
  44. +2
    -1
      src/commands/openOnRemote.ts
  45. +2
    -2
      src/commands/openRevisionFile.ts
  46. +12
    -15
      src/commands/quickCommand.steps.ts
  47. +4
    -2
      src/commands/remoteProviders.ts
  48. +1
    -1
      src/commands/showQuickBranchHistory.ts
  49. +2
    -1
      src/commands/showQuickCommit.ts
  50. +2
    -1
      src/commands/showQuickCommitFile.ts
  51. +5
    -2
      src/commands/showQuickFileHistory.ts
  52. +3
    -2
      src/commands/stashApply.ts
  53. +4
    -2
      src/env/node/git/git.ts
  54. +19
    -35
      src/env/node/git/localGitProvider.ts
  55. +2
    -1
      src/extension.ts
  56. +8
    -4
      src/git/formatters/commitFormatter.ts
  57. +3
    -2
      src/git/fsProvider.ts
  58. +21
    -32
      src/git/gitProvider.ts
  59. +23
    -34
      src/git/gitProviderService.ts
  60. +2
    -1
      src/git/gitUri.ts
  61. +0
    -25
      src/git/models.ts
  62. +5
    -11
      src/git/parsers/blameParser.ts
  63. +5
    -13
      src/git/parsers/logParser.ts
  64. +2
    -3
      src/git/parsers/remoteParser.ts
  65. +1
    -1
      src/git/parsers/statusParser.ts
  66. +1
    -1
      src/git/parsers/tagParser.ts
  67. +1
    -1
      src/git/parsers/treeParser.ts
  68. +3
    -3
      src/git/remotes/bitbucket-server.ts
  69. +3
    -3
      src/git/remotes/bitbucket.ts
  70. +4
    -4
      src/git/remotes/gerrit.ts
  71. +3
    -3
      src/git/remotes/gitea.ts
  72. +6
    -9
      src/git/remotes/github.ts
  73. +7
    -10
      src/git/remotes/gitlab.ts
  74. +9
    -12
      src/git/remotes/provider.ts
  75. +1
    -1
      src/git/search.ts
  76. +5
    -1
      src/hovers/hovers.ts
  77. +1
    -1
      src/messages.ts
  78. +5
    -1
      src/plus/github/github.ts
  79. +20
    -40
      src/plus/github/githubGitProvider.ts
  80. +3
    -1
      src/plus/github/models.ts
  81. +4
    -1
      src/plus/gitlab/gitlab.ts
  82. +1
    -1
      src/plus/gitlab/models.ts
  83. +5
    -1
      src/plus/webviews/timeline/timelineWebview.ts
  84. +6
    -2
      src/plus/webviews/timeline/timelineWebviewView.ts
  85. +3
    -1
      src/quickpicks/commitPicker.ts
  86. +5
    -3
      src/quickpicks/items/commits.ts
  87. +9
    -12
      src/quickpicks/items/gitCommands.ts
  88. +4
    -2
      src/quickpicks/referencePicker.ts
  89. +3
    -2
      src/quickpicks/remoteProviderPicker.ts
  90. +1
    -1
      src/quickpicks/repositoryPicker.ts
  91. +4
    -3
      src/statusbar/statusBarController.ts
  92. +5
    -3
      src/terminal/linkProvider.ts
  93. +3
    -3
      src/trackers/documentTracker.ts
  94. +3
    -1
      src/trackers/gitDocumentTracker.ts
  95. +3
    -3
      src/trackers/gitLineTracker.ts
  96. +2
    -2
      src/trackers/trackedDocument.ts
  97. +4
    -10
      src/views/branchesView.ts
  98. +3
    -4
      src/views/commitsView.ts
  99. +3
    -2
      src/views/contributorsView.ts
  100. +3
    -3
      src/views/nodes/UncommittedFileNode.ts

+ 1
- 1
src/annotations/annotations.ts View File

@ -14,7 +14,7 @@ import { HeatmapLocations } from '../config';
import { Config, configuration } from '../configuration';
import { Colors, GlyphChars } from '../constants';
import { CommitFormatOptions, CommitFormatter } from '../git/formatters';
import { GitCommit } from '../git/models';
import type { GitCommit } from '../git/models/commit';
import { getWidth, interpolate, pad } from '../system/string';
import { toRgba } from '../webviews/apps/shared/colors';

+ 3
- 1
src/annotations/autolinks.ts View File

@ -2,7 +2,9 @@ import { ConfigurationChangeEvent, Disposable } from 'vscode';
import { AutolinkReference, AutolinkType, configuration } from '../configuration';
import { GlyphChars } from '../constants';
import type { Container } from '../container';
import { type GitRemote, IssueOrPullRequest, type RemoteProviderReference } from '../git/models';
import { IssueOrPullRequest } from '../git/models/issue';
import type { GitRemote } from '../git/models/remote';
import type { RemoteProviderReference } from '../git/models/remoteProvider';
import { Logger } from '../logger';
import { fromNow } from '../system/date';
import { debug } from '../system/decorators/log';

+ 5
- 4
src/annotations/blameAnnotationProvider.ts View File

@ -1,12 +1,13 @@
import { CancellationToken, Disposable, Hover, languages, Position, Range, TextDocument, TextEditor } from 'vscode';
import { FileAnnotationType } from '../config';
import type { FileAnnotationType } from '../config';
import { configuration } from '../configuration';
import { Container } from '../container';
import type { Container } from '../container';
import { GitUri } from '../git/gitUri';
import { GitBlame, GitCommit } from '../git/models';
import type { GitBlame } from '../git/models/blame';
import type { GitCommit } from '../git/models/commit';
import { Hovers } from '../hovers/hovers';
import { log } from '../system/decorators/log';
import { GitDocumentState, TrackedDocument } from '../trackers/gitDocumentTracker';
import type { GitDocumentState, TrackedDocument } from '../trackers/gitDocumentTracker';
import { AnnotationProviderBase } from './annotationProvider';
import { ComputedHeatmap, getHeatmapColors } from './annotations';

+ 6
- 5
src/annotations/gutterBlameAnnotationProvider.ts View File

@ -1,18 +1,19 @@
import { DecorationOptions, Range, TextEditor, ThemableDecorationAttachmentRenderOptions } from 'vscode';
import { configuration, FileAnnotationType, GravatarDefaultStyle } from '../configuration';
import { GlyphChars } from '../constants';
import { Container } from '../container';
import type { Container } from '../container';
import { CommitFormatOptions, CommitFormatter } from '../git/formatters';
import { GitBlame, GitCommit } from '../git/models';
import type { GitBlame } from '../git/models/blame';
import type { GitCommit } from '../git/models/commit';
import { Logger } from '../logger';
import { filterMap } from '../system/array';
import { log } from '../system/decorators/log';
import { first } from '../system/iterable';
import { Stopwatch } from '../system/stopwatch';
import { getTokensFromTemplate, getWidth, TokenOptions } from '../system/string';
import { GitDocumentState } from '../trackers/gitDocumentTracker';
import { TrackedDocument } from '../trackers/trackedDocument';
import { AnnotationContext } from './annotationProvider';
import type { GitDocumentState } from '../trackers/gitDocumentTracker';
import type { TrackedDocument } from '../trackers/trackedDocument';
import type { AnnotationContext } from './annotationProvider';
import { Annotations } from './annotations';
import { BlameAnnotationProviderBase } from './blameAnnotationProvider';
import { Decorations } from './fileAnnotationController';

+ 4
- 3
src/annotations/gutterChangesAnnotationProvider.ts View File

@ -13,13 +13,14 @@ import {
TextEditorRevealType,
} from 'vscode';
import { configuration, FileAnnotationType } from '../configuration';
import { Container } from '../container';
import { GitCommit, GitDiff } from '../git/models';
import type { Container } from '../container';
import type { GitCommit } from '../git/models/commit';
import type { GitDiff } from '../git/models/diff';
import { Hovers } from '../hovers/hovers';
import { Logger } from '../logger';
import { log } from '../system/decorators/log';
import { Stopwatch } from '../system/stopwatch';
import { GitDocumentState, TrackedDocument } from '../trackers/gitDocumentTracker';
import type { GitDocumentState, TrackedDocument } from '../trackers/gitDocumentTracker';
import { AnnotationContext, AnnotationProviderBase } from './annotationProvider';
import { Decorations } from './fileAnnotationController';

+ 5
- 5
src/annotations/gutterHeatmapBlameAnnotationProvider.ts View File

@ -1,13 +1,13 @@
import { Range, TextEditor, TextEditorDecorationType } from 'vscode';
import { FileAnnotationType } from '../configuration';
import { Container } from '../container';
import { GitCommit } from '../git/models';
import type { Container } from '../container';
import type { GitCommit } from '../git/models/commit';
import { Logger } from '../logger';
import { log } from '../system/decorators/log';
import { Stopwatch } from '../system/stopwatch';
import { GitDocumentState } from '../trackers/gitDocumentTracker';
import { TrackedDocument } from '../trackers/trackedDocument';
import { AnnotationContext } from './annotationProvider';
import type { GitDocumentState } from '../trackers/gitDocumentTracker';
import type { TrackedDocument } from '../trackers/trackedDocument';
import type { AnnotationContext } from './annotationProvider';
import { Annotations } from './annotations';
import { BlameAnnotationProviderBase } from './blameAnnotationProvider';

+ 4
- 3
src/annotations/lineAnnotationController.ts View File

@ -12,9 +12,10 @@ import {
} from 'vscode';
import { configuration } from '../configuration';
import { GlyphChars } from '../constants';
import { Container } from '../container';
import type { Container } from '../container';
import { CommitFormatter } from '../git/formatters';
import { GitCommit, PullRequest } from '../git/models';
import type { GitCommit } from '../git/models/commit';
import type { PullRequest } from '../git/models/pullRequest';
import { Authentication } from '../git/remotes/provider';
import { LogCorrelationContext, Logger } from '../logger';
import { debug, log } from '../system/decorators/log';
@ -22,7 +23,7 @@ import { once } from '../system/event';
import { count, every, filterMap } from '../system/iterable';
import { PromiseCancelledError, PromiseCancelledErrorWithId, raceAll } from '../system/promise';
import { isTextEditor } from '../system/utils';
import { LinesChangeEvent, LineSelection } from '../trackers/gitLineTracker';
import type { LinesChangeEvent, LineSelection } from '../trackers/gitLineTracker';
import { Annotations } from './annotations';
const annotationDecoration: TextEditorDecorationType = window.createTextEditorDecorationType({

+ 2
- 2
src/avatars.ts View File

@ -2,13 +2,13 @@ import { EventEmitter, Uri } from 'vscode';
import { GravatarDefaultStyle } from './config';
import { configuration } from './configuration';
import { Container } from './container';
import { GitRevisionReference } from './git/models';
import type { GitRevisionReference } from './git/models/reference';
import { getGitHubNoReplyAddressParts } from './git/remotes/github';
import { StorageKeys } from './storage';
import { debounce } from './system/function';
import { filterMap } from './system/iterable';
import { base64, equalsIgnoreCase, md5 } from './system/string';
import { ContactPresenceStatus } from './vsls/vsls';
import type { ContactPresenceStatus } from './vsls/vsls';
const maxSmallIntegerV8 = 2 ** 30; // Max number that can be stored in V8's smis (small integers)

+ 3
- 2
src/codelens/codeLensProvider.ts View File

@ -33,9 +33,10 @@ import {
FileAnnotationType,
} from '../configuration';
import { Commands, CoreCommands, Schemes } from '../constants';
import { Container } from '../container';
import type { Container } from '../container';
import type { GitUri } from '../git/gitUri';
import { GitBlame, GitBlameLines, GitCommit } from '../git/models';
import type { GitBlame, GitBlameLines } from '../git/models/blame';
import type { GitCommit } from '../git/models/commit';
import { RemoteResourceType } from '../git/remotes/provider';
import { Logger } from '../logger';
import { asCommand, executeCoreCommand } from '../system/command';

+ 9
- 12
src/commands/base.ts View File

@ -11,18 +11,15 @@ import {
window,
} from 'vscode';
import type { ActionContext } from '../api/gitlens';
import { Commands } from '../constants';
import {
GitBranch,
GitCommit,
GitContributor,
GitFile,
GitReference,
GitRemote,
GitStashCommit,
GitTag,
Repository,
} from '../git/models';
import type { Commands } from '../constants';
import { GitBranch } from '../git/models/branch';
import { GitCommit, GitStashCommit } from '../git/models/commit';
import { GitContributor } from '../git/models/contributor';
import type { GitFile } from '../git/models/file';
import type { GitReference } from '../git/models/reference';
import { GitRemote } from '../git/models/remote';
import { Repository } from '../git/models/repository';
import { GitTag } from '../git/models/tag';
import { ViewNode, ViewRefNode } from '../views/nodes';
export function getCommandUri(uri?: Uri, editor?: TextEditor): Uri | undefined {

+ 2
- 2
src/commands/createPullRequestOnRemote.ts View File

@ -1,10 +1,10 @@
import { Commands } from '../constants';
import type { Container } from '../container';
import { GitRemote } from '../git/models';
import type { GitRemote } from '../git/models/remote';
import { RemoteProvider, RemoteResource, RemoteResourceType } from '../git/remotes/provider';
import { command, executeCommand } from '../system/command';
import { Command } from './base';
import { OpenOnRemoteCommandArgs } from './openOnRemote';
import type { OpenOnRemoteCommandArgs } from './openOnRemote';
export interface CreatePullRequestOnRemoteCommandArgs {
base?: string;

+ 2
- 2
src/commands/diffLineWithPrevious.ts View File

@ -2,12 +2,12 @@ import { TextDocumentShowOptions, TextEditor, Uri } from 'vscode';
import { Commands } from '../constants';
import type { Container } from '../container';
import { GitUri } from '../git/gitUri';
import { GitCommit } from '../git/models';
import type { GitCommit } from '../git/models/commit';
import { Logger } from '../logger';
import { Messages } from '../messages';
import { command, executeCommand } from '../system/command';
import { ActiveEditorCommand, getCommandUri } from './base';
import { DiffWithCommandArgs } from './diffWith';
import type { DiffWithCommandArgs } from './diffWith';
export interface DiffLineWithPreviousCommandArgs {
commit?: GitCommit;

+ 2
- 1
src/commands/diffLineWithWorking.ts View File

@ -2,7 +2,8 @@ import { TextDocumentShowOptions, TextEditor, Uri, window } from 'vscode';
import { Commands } from '../constants';
import type { Container } from '../container';
import { GitUri } from '../git/gitUri';
import { GitCommit, GitRevision } from '../git/models';
import { GitCommit } from '../git/models/commit';
import { GitRevision } from '../git/models/reference';
import { Logger } from '../logger';
import { Messages } from '../messages';
import { command, executeCommand } from '../system/command';

+ 2
- 1
src/commands/diffWith.ts View File

@ -1,7 +1,8 @@
import { Range, TextDocumentShowOptions, Uri, ViewColumn } from 'vscode';
import { Commands, CoreCommands, GlyphChars } from '../constants';
import type { Container } from '../container';
import { GitCommit, GitRevision } from '../git/models';
import { GitCommit } from '../git/models/commit';
import { GitRevision } from '../git/models/reference';
import { Logger } from '../logger';
import { Messages } from '../messages';
import { command, executeCoreCommand } from '../system/command';

+ 2
- 2
src/commands/diffWithNext.ts View File

@ -2,12 +2,12 @@ import { Range, TextDocumentShowOptions, TextEditor, Uri } from 'vscode';
import { Commands } from '../constants';
import type { Container } from '../container';
import { GitUri } from '../git/gitUri';
import { GitCommit } from '../git/models';
import type { GitCommit } from '../git/models/commit';
import { Logger } from '../logger';
import { Messages } from '../messages';
import { command, executeCommand } from '../system/command';
import { ActiveEditorCommand, CommandContext, getCommandUri } from './base';
import { DiffWithCommandArgs } from './diffWith';
import type { DiffWithCommandArgs } from './diffWith';
export interface DiffWithNextCommandArgs {
commit?: GitCommit;

+ 3
- 2
src/commands/diffWithPrevious.ts View File

@ -2,13 +2,14 @@ import { TextDocumentShowOptions, TextEditor, Uri } from 'vscode';
import { Commands } from '../constants';
import type { Container } from '../container';
import { GitUri } from '../git/gitUri';
import { GitCommit, GitRevision } from '../git/models';
import type { GitCommit } from '../git/models/commit';
import { GitRevision } from '../git/models/reference';
import { Logger } from '../logger';
import { Messages } from '../messages';
import { command, executeCommand } from '../system/command';
import { findOrOpenEditor } from '../system/utils';
import { ActiveEditorCommand, CommandContext, getCommandUri } from './base';
import { DiffWithCommandArgs } from './diffWith';
import type { DiffWithCommandArgs } from './diffWith';
export interface DiffWithPreviousCommandArgs {
commit?: GitCommit;

+ 3
- 3
src/commands/diffWithRevision.ts View File

@ -2,7 +2,7 @@ import { TextDocumentShowOptions, TextEditor, Uri } from 'vscode';
import { Commands, GlyphChars, quickPickTitleMaxChars } from '../constants';
import type { Container } from '../container';
import { GitUri } from '../git/gitUri';
import { GitRevision } from '../git/models';
import { GitRevision } from '../git/models/reference';
import { Logger } from '../logger';
import { Messages } from '../messages';
import { CommitPicker } from '../quickpicks/commitPicker';
@ -10,8 +10,8 @@ import { CommandQuickPickItem } from '../quickpicks/items/common';
import { command, executeCommand } from '../system/command';
import { pad } from '../system/string';
import { ActiveEditorCommand, getCommandUri } from './base';
import { DiffWithCommandArgs } from './diffWith';
import { DiffWithRevisionFromCommandArgs } from './diffWithRevisionFrom';
import type { DiffWithCommandArgs } from './diffWith';
import type { DiffWithRevisionFromCommandArgs } from './diffWithRevisionFrom';
export interface DiffWithRevisionCommandArgs {
line?: number;

+ 2
- 2
src/commands/diffWithRevisionFrom.ts View File

@ -2,7 +2,7 @@ import { TextDocumentShowOptions, TextEditor, Uri } from 'vscode';
import { Commands, GlyphChars, quickPickTitleMaxChars } from '../constants';
import type { Container } from '../container';
import { GitUri } from '../git/gitUri';
import { GitReference, GitRevision } from '../git/models';
import { GitReference, GitRevision } from '../git/models/reference';
import { Messages } from '../messages';
import { StashPicker } from '../quickpicks/commitPicker';
import { ReferencePicker } from '../quickpicks/referencePicker';
@ -10,7 +10,7 @@ import { command, executeCommand } from '../system/command';
import { basename } from '../system/path';
import { pad } from '../system/string';
import { ActiveEditorCommand, getCommandUri } from './base';
import { DiffWithCommandArgs } from './diffWith';
import type { DiffWithCommandArgs } from './diffWith';
export interface DiffWithRevisionFromCommandArgs {
line?: number;

+ 2
- 2
src/commands/diffWithWorking.ts View File

@ -2,12 +2,12 @@ import { TextDocumentShowOptions, TextEditor, Uri, window } from 'vscode';
import { Commands } from '../constants';
import type { Container } from '../container';
import { GitUri } from '../git/gitUri';
import { GitRevision } from '../git/models';
import { GitRevision } from '../git/models/reference';
import { Logger } from '../logger';
import { Messages } from '../messages';
import { command, executeCommand } from '../system/command';
import { ActiveEditorCommand, getCommandUri } from './base';
import { DiffWithCommandArgs } from './diffWith';
import type { DiffWithCommandArgs } from './diffWith';
export interface DiffWithWorkingCommandArgs {
inDiffRightEditor?: boolean;

+ 2
- 2
src/commands/externalDiff.ts View File

@ -1,11 +1,11 @@
import { env, SourceControlResourceState, Uri, window } from 'vscode';
import { ScmResource } from '../@types/vscode.git.resources';
import type { ScmResource } from '../@types/vscode.git.resources';
import { ScmResourceGroupType, ScmStatus } from '../@types/vscode.git.resources.enums';
import { configuration } from '../configuration';
import { Commands } from '../constants';
import type { Container } from '../container';
import { GitUri } from '../git/gitUri';
import { GitRevision } from '../git/models';
import { GitRevision } from '../git/models/reference';
import { Logger } from '../logger';
import { Messages } from '../messages';
import { RepositoryPicker } from '../quickpicks/repositoryPicker';

+ 4
- 3
src/commands/git/branch.ts View File

@ -1,10 +1,11 @@
import { QuickInputButtons } from 'vscode';
import type { Container } from '../../container';
import { GitBranchReference, GitReference, Repository } from '../../git/models';
import { QuickPickItemOfT } from '../../quickpicks/items/common';
import { GitBranchReference, GitReference } from '../../git/models/reference';
import { Repository } from '../../git/models/repository';
import type { QuickPickItemOfT } from '../../quickpicks/items/common';
import { FlagsQuickPickItem } from '../../quickpicks/items/flags';
import { pluralize } from '../../system/string';
import { ViewsWithRepositoryFolders } from '../../views/viewBase';
import type { ViewsWithRepositoryFolders } from '../../views/viewBase';
import {
appendReposToTitle,
AsyncStepResultGenerator,

+ 6
- 3
src/commands/git/cherry-pick.ts View File

@ -1,7 +1,10 @@
import { Container } from '../../container';
import { GitBranch, GitLog, GitReference, GitRevision, Repository } from '../../git/models';
import type { Container } from '../../container';
import type { GitBranch } from '../../git/models/branch';
import type { GitLog } from '../../git/models/log';
import { GitReference, GitRevision } from '../../git/models/reference';
import type { Repository } from '../../git/models/repository';
import { FlagsQuickPickItem } from '../../quickpicks/items/flags';
import { ViewsWithRepositoryFolders } from '../../views/viewBase';
import type { ViewsWithRepositoryFolders } from '../../views/viewBase';
import {
appendReposToTitle,
PartialStepState,

+ 3
- 2
src/commands/git/coauthors.ts View File

@ -1,9 +1,10 @@
import { CoreCommands } from '../../constants';
import type { Container } from '../../container';
import type { GitContributor, Repository } from '../../git/models';
import type { GitContributor } from '../../git/models/contributor';
import type { Repository } from '../../git/models/repository';
import { executeCoreCommand } from '../../system/command';
import { normalizePath } from '../../system/path';
import { ViewsWithRepositoryFolders } from '../../views/viewBase';
import type { ViewsWithRepositoryFolders } from '../../views/viewBase';
import {
PartialStepState,
pickContributorsStep,

+ 4
- 3
src/commands/git/fetch.ts View File

@ -1,11 +1,12 @@
import { GlyphChars } from '../../constants';
import { Container } from '../../container';
import { GitBranchReference, GitReference, Repository } from '../../git/models';
import type { Container } from '../../container';
import { GitBranchReference, GitReference } from '../../git/models/reference';
import type { Repository } from '../../git/models/repository';
import { FlagsQuickPickItem } from '../../quickpicks/items/flags';
import { isStringArray } from '../../system/array';
import { fromNow } from '../../system/date';
import { pad } from '../../system/string';
import { ViewsWithRepositoryFolders } from '../../views/viewBase';
import type { ViewsWithRepositoryFolders } from '../../views/viewBase';
import {
appendReposToTitle,
AsyncStepResultGenerator,

+ 6
- 3
src/commands/git/log.ts View File

@ -1,9 +1,12 @@
import { GlyphChars, quickPickTitleMaxChars } from '../../constants';
import { Container } from '../../container';
import { GitCommit, GitLog, GitReference, Repository } from '../../git/models';
import type { Container } from '../../container';
import { GitCommit } from '../../git/models/commit';
import type { GitLog } from '../../git/models/log';
import { GitReference } from '../../git/models/reference';
import { Repository } from '../../git/models/repository';
import { formatPath } from '../../system/formatPath';
import { pad } from '../../system/string';
import { ViewsWithRepositoryFolders } from '../../views/viewBase';
import type { ViewsWithRepositoryFolders } from '../../views/viewBase';
import { GitActions } from '../gitCommands.actions';
import { getSteps } from '../gitCommands.utils';
import {

+ 6
- 3
src/commands/git/merge.ts View File

@ -1,9 +1,12 @@
import { Container } from '../../container';
import { GitBranch, GitLog, GitReference, GitRevision, Repository } from '../../git/models';
import type { Container } from '../../container';
import type { GitBranch } from '../../git/models/branch';
import type { GitLog } from '../../git/models/log';
import { GitReference, GitRevision } from '../../git/models/reference';
import type { Repository } from '../../git/models/repository';
import { Directive, DirectiveQuickPickItem } from '../../quickpicks/items/directive';
import { FlagsQuickPickItem } from '../../quickpicks/items/flags';
import { pluralize } from '../../system/string';
import { ViewsWithRepositoryFolders } from '../../views/viewBase';
import type { ViewsWithRepositoryFolders } from '../../views/viewBase';
import {
appendReposToTitle,
AsyncStepResultGenerator,

+ 5
- 3
src/commands/git/pull.ts View File

@ -1,12 +1,14 @@
import { GlyphChars } from '../../constants';
import { Container } from '../../container';
import { GitBranch, GitBranchReference, GitReference, Repository } from '../../git/models';
import type { Container } from '../../container';
import { GitBranch } from '../../git/models/branch';
import { GitBranchReference, GitReference } from '../../git/models/reference';
import type { Repository } from '../../git/models/repository';
import { Directive, DirectiveQuickPickItem } from '../../quickpicks/items/directive';
import { FlagsQuickPickItem } from '../../quickpicks/items/flags';
import { isStringArray } from '../../system/array';
import { fromNow } from '../../system/date';
import { pad, pluralize } from '../../system/string';
import { ViewsWithRepositoryFolders } from '../../views/viewBase';
import type { ViewsWithRepositoryFolders } from '../../views/viewBase';
import {
appendReposToTitle,
AsyncStepResultGenerator,

+ 5
- 3
src/commands/git/push.ts View File

@ -1,13 +1,15 @@
import { configuration } from '../../configuration';
import { CoreGitConfiguration, GlyphChars } from '../../constants';
import { Container } from '../../container';
import { GitBranch, GitBranchReference, GitReference, Repository } from '../../git/models';
import type { Container } from '../../container';
import { GitBranch } from '../../git/models/branch';
import { GitBranchReference, GitReference } from '../../git/models/reference';
import type { Repository } from '../../git/models/repository';
import { Directive, DirectiveQuickPickItem } from '../../quickpicks/items/directive';
import { FlagsQuickPickItem } from '../../quickpicks/items/flags';
import { isStringArray } from '../../system/array';
import { fromNow } from '../../system/date';
import { pad, pluralize } from '../../system/string';
import { ViewsWithRepositoryFolders } from '../../views/viewBase';
import type { ViewsWithRepositoryFolders } from '../../views/viewBase';
import {
appendReposToTitle,
AsyncStepResultGenerator,

+ 6
- 3
src/commands/git/rebase.ts View File

@ -1,10 +1,13 @@
import { env } from 'vscode';
import { Container } from '../../container';
import { GitBranch, GitLog, GitReference, GitRevision, Repository } from '../../git/models';
import type { Container } from '../../container';
import type { GitBranch } from '../../git/models/branch';
import type { GitLog } from '../../git/models/log';
import { GitReference, GitRevision } from '../../git/models/reference';
import type { Repository } from '../../git/models/repository';
import { Directive, DirectiveQuickPickItem } from '../../quickpicks/items/directive';
import { FlagsQuickPickItem } from '../../quickpicks/items/flags';
import { pluralize } from '../../system/string';
import { ViewsWithRepositoryFolders } from '../../views/viewBase';
import type { ViewsWithRepositoryFolders } from '../../views/viewBase';
import {
appendReposToTitle,
AsyncStepResultGenerator,

+ 6
- 3
src/commands/git/reset.ts View File

@ -1,7 +1,10 @@
import { Container } from '../../container';
import { GitBranch, GitLog, GitReference, GitRevisionReference, Repository } from '../../git/models';
import type { Container } from '../../container';
import type { GitBranch } from '../../git/models/branch';
import type { GitLog } from '../../git/models/log';
import { GitReference, GitRevisionReference } from '../../git/models/reference';
import type { Repository } from '../../git/models/repository';
import { FlagsQuickPickItem } from '../../quickpicks/items/flags';
import { ViewsWithRepositoryFolders } from '../../views/viewBase';
import type { ViewsWithRepositoryFolders } from '../../views/viewBase';
import {
appendReposToTitle,
PartialStepState,

+ 6
- 3
src/commands/git/revert.ts View File

@ -1,7 +1,10 @@
import { Container } from '../../container';
import { GitBranch, GitLog, GitReference, GitRevisionReference, Repository } from '../../git/models';
import type { Container } from '../../container';
import type { GitBranch } from '../../git/models/branch';
import type { GitLog } from '../../git/models/log';
import { GitReference, GitRevisionReference } from '../../git/models/reference';
import type { Repository } from '../../git/models/repository';
import { FlagsQuickPickItem } from '../../quickpicks/items/flags';
import { ViewsWithRepositoryFolders } from '../../views/viewBase';
import type { ViewsWithRepositoryFolders } from '../../views/viewBase';
import {
appendReposToTitle,
PartialStepState,

+ 5
- 3
src/commands/git/search.ts View File

@ -1,13 +1,15 @@
import { configuration } from '../../configuration';
import { ContextKeys, GlyphChars } from '../../constants';
import { Container } from '../../container';
import type { Container } from '../../container';
import { getContext } from '../../context';
import { GitCommit, GitLog, Repository } from '../../git/models';
import type { GitCommit } from '../../git/models/commit';
import type { GitLog } from '../../git/models/log';
import type { Repository } from '../../git/models/repository';
import { searchOperators, SearchOperators, SearchPattern } from '../../git/search';
import { ActionQuickPickItem, QuickPickItemOfT } from '../../quickpicks/items/common';
import { pluralize } from '../../system/string';
import { SearchResultsNode } from '../../views/nodes';
import { ViewsWithRepositoryFolders } from '../../views/viewBase';
import type { ViewsWithRepositoryFolders } from '../../views/viewBase';
import { GitActions } from '../gitCommands.actions';
import { getSteps } from '../gitCommands.utils';
import {

+ 5
- 3
src/commands/git/show.ts View File

@ -1,9 +1,11 @@
import { Container } from '../../container';
import { GitCommit, GitRevisionReference, GitStashCommit, Repository } from '../../git/models';
import type { Container } from '../../container';
import { GitCommit, GitStashCommit } from '../../git/models/commit';
import type { GitRevisionReference } from '../../git/models/reference';
import { Repository } from '../../git/models/repository';
import { CommitFilesQuickPickItem } from '../../quickpicks/items/commits';
import { CommandQuickPickItem } from '../../quickpicks/items/common';
import { GitCommandQuickPickItem } from '../../quickpicks/items/gitCommands';
import { ViewsWithRepositoryFolders } from '../../views/viewBase';
import type { ViewsWithRepositoryFolders } from '../../views/viewBase';
import {
PartialStepState,
pickCommitStep,

+ 6
- 4
src/commands/git/stash.ts View File

@ -1,16 +1,18 @@
import { QuickInputButtons, QuickPickItem, Uri, window } from 'vscode';
import { ContextKeys, GlyphChars } from '../../constants';
import { Container } from '../../container';
import type { Container } from '../../container';
import { getContext } from '../../context';
import { StashApplyError, StashApplyErrorReason } from '../../git/errors';
import { GitReference, GitStashCommit, GitStashReference, Repository } from '../../git/models';
import type { GitStashCommit } from '../../git/models/commit';
import { GitReference, GitStashReference } from '../../git/models/reference';
import type { Repository } from '../../git/models/repository';
import { Logger } from '../../logger';
import { Messages } from '../../messages';
import { QuickPickItemOfT } from '../../quickpicks/items/common';
import type { QuickPickItemOfT } from '../../quickpicks/items/common';
import { FlagsQuickPickItem } from '../../quickpicks/items/flags';
import { formatPath } from '../../system/formatPath';
import { pad } from '../../system/string';
import { ViewsWithRepositoryFolders } from '../../views/viewBase';
import type { ViewsWithRepositoryFolders } from '../../views/viewBase';
import { GitActions } from '../gitCommands.actions';
import { getSteps } from '../gitCommands.utils';
import {

+ 5
- 3
src/commands/git/status.ts View File

@ -1,10 +1,12 @@
import { GlyphChars } from '../../constants';
import { Container } from '../../container';
import { GitReference, GitStatus, Repository } from '../../git/models';
import type { Container } from '../../container';
import { GitReference } from '../../git/models/reference';
import type { Repository } from '../../git/models/repository';
import type { GitStatus } from '../../git/models/status';
import { CommandQuickPickItem } from '../../quickpicks/items/common';
import { GitCommandQuickPickItem } from '../../quickpicks/items/gitCommands';
import { pad } from '../../system/string';
import { ViewsWithRepositoryFolders } from '../../views/viewBase';
import type { ViewsWithRepositoryFolders } from '../../views/viewBase';
import {
PartialStepState,
pickRepositoryStep,

+ 4
- 3
src/commands/git/switch.ts View File

@ -1,9 +1,10 @@
import { ProgressLocation, QuickPickItem, window } from 'vscode';
import { BranchSorting } from '../../config';
import { Container } from '../../container';
import { GitReference, Repository } from '../../git/models';
import type { Container } from '../../container';
import { GitReference } from '../../git/models/reference';
import type { Repository } from '../../git/models/repository';
import { isStringArray } from '../../system/array';
import { ViewsWithRepositoryFolders } from '../../views/viewBase';
import type { ViewsWithRepositoryFolders } from '../../views/viewBase';
import {
appendReposToTitle,
inputBranchNameStep,

+ 5
- 4
src/commands/git/tag.ts View File

@ -1,10 +1,11 @@
import { QuickInputButtons, QuickPickItem } from 'vscode';
import { Container } from '../../container';
import { GitReference, GitTagReference, Repository } from '../../git/models';
import { QuickPickItemOfT } from '../../quickpicks/items/common';
import type { Container } from '../../container';
import { GitReference, GitTagReference } from '../../git/models/reference';
import type { Repository } from '../../git/models/repository';
import type { QuickPickItemOfT } from '../../quickpicks/items/common';
import { FlagsQuickPickItem } from '../../quickpicks/items/flags';
import { pluralize } from '../../system/string';
import { ViewsWithRepositoryFolders } from '../../views/viewBase';
import type { ViewsWithRepositoryFolders } from '../../views/viewBase';
import {
appendReposToTitle,
AsyncStepResultGenerator,

+ 4
- 2
src/commands/git/worktree.ts View File

@ -8,7 +8,9 @@ import {
WorktreeDeleteError,
WorktreeDeleteErrorReason,
} from '../../git/errors';
import { GitReference, GitWorktree, Repository } from '../../git/models';
import { GitReference } from '../../git/models/reference';
import type { Repository } from '../../git/models/repository';
import { GitWorktree } from '../../git/models/worktree';
import { Messages } from '../../messages';
import { QuickPickItemOfT, QuickPickSeparator } from '../../quickpicks/items/common';
import { Directive } from '../../quickpicks/items/directive';
@ -16,7 +18,7 @@ import { FlagsQuickPickItem } from '../../quickpicks/items/flags';
import { basename, isDescendent } from '../../system/path';
import { pluralize, truncateLeft } from '../../system/string';
import { OpenWorkspaceLocation } from '../../system/utils';
import { ViewsWithRepositoryFolders } from '../../views/viewBase';
import type { ViewsWithRepositoryFolders } from '../../views/viewBase';
import { GitActions } from '../gitCommands.actions';
import {
appendReposToTitle,

+ 10
- 10
src/commands/gitCommands.actions.ts View File

@ -6,30 +6,30 @@ import type {
GitCommandsCommandArgs,
OpenWorkingFileCommandArgs,
} from '../commands';
import { FileAnnotationType } from '../configuration';
import type { FileAnnotationType } from '../configuration';
import { Commands, CoreCommands } from '../constants';
import { Container } from '../container';
import { GitUri } from '../git/gitUri';
import { GitCommit } from '../git/models/commit';
import type { GitContributor } from '../git/models/contributor';
import type { GitFile } from '../git/models/file';
import {
GitBranchReference,
GitCommit,
GitContributor,
GitFile,
GitReference,
GitRemote,
GitRevision,
GitRevisionReference,
GitStashReference,
GitTagReference,
GitWorktree,
Repository,
} from '../git/models';
} from '../git/models/reference';
import type { GitRemote } from '../git/models/remote';
import type { Repository } from '../git/models/repository';
import type { GitWorktree } from '../git/models/worktree';
import { RepositoryPicker } from '../quickpicks/repositoryPicker';
import { ensure } from '../system/array';
import { executeCommand, executeCoreCommand, executeEditorCommand } from '../system/command';
import { findOrOpenEditor, findOrOpenEditors, openWorkspace, OpenWorkspaceLocation } from '../system/utils';
import { ViewsWithRepositoryFolders } from '../views/viewBase';
import { ResetGitCommandArgs } from './git/reset';
import type { ViewsWithRepositoryFolders } from '../views/viewBase';
import type { ResetGitCommandArgs } from './git/reset';
export async function executeGitCommand(args: GitCommandsCommandArgs): Promise<void> {
void (await executeCommand<GitCommandsCommandArgs>(Commands.GitCommands, args));

+ 2
- 2
src/commands/openCommitOnRemote.ts View File

@ -2,7 +2,7 @@ import { TextEditor, Uri, window } from 'vscode';
import { Commands } from '../constants';
import type { Container } from '../container';
import { GitUri } from '../git/gitUri';
import { GitRevision } from '../git/models';
import { GitRevision } from '../git/models/reference';
import { RemoteResourceType } from '../git/remotes/provider';
import { Logger } from '../logger';
import { Messages } from '../messages';
@ -14,7 +14,7 @@ import {
isCommandContextGitTimelineItem,
isCommandContextViewNodeHasCommit,
} from './base';
import { OpenOnRemoteCommandArgs } from './openOnRemote';
import type { OpenOnRemoteCommandArgs } from './openOnRemote';
export interface OpenCommitOnRemoteCommandArgs {
clipboard?: boolean;

+ 2
- 2
src/commands/openFileAtRevision.ts View File

@ -3,7 +3,7 @@ import { FileAnnotationType } from '../configuration';
import { Commands, GlyphChars, quickPickTitleMaxChars } from '../constants';
import type { Container } from '../container';
import { GitUri } from '../git/gitUri';
import { GitRevision } from '../git/models';
import { GitRevision } from '../git/models/reference';
import { Logger } from '../logger';
import { Messages } from '../messages';
import { CommitPicker } from '../quickpicks/commitPicker';
@ -12,7 +12,7 @@ import { command } from '../system/command';
import { pad } from '../system/string';
import { ActiveEditorCommand, CommandContext, getCommandUri } from './base';
import { GitActions } from './gitCommands.actions';
import { OpenFileAtRevisionFromCommandArgs } from './openFileAtRevisionFrom';
import type { OpenFileAtRevisionFromCommandArgs } from './openFileAtRevisionFrom';
export interface OpenFileAtRevisionCommandArgs {
revisionUri?: Uri;

+ 1
- 1
src/commands/openFileAtRevisionFrom.ts View File

@ -3,7 +3,7 @@ import { FileAnnotationType } from '../configuration';
import { Commands, GlyphChars, quickPickTitleMaxChars } from '../constants';
import type { Container } from '../container';
import { GitUri } from '../git/gitUri';
import { GitReference } from '../git/models';
import type { GitReference } from '../git/models/reference';
import { Messages } from '../messages';
import { StashPicker } from '../quickpicks/commitPicker';
import { ReferencePicker } from '../quickpicks/referencePicker';

+ 3
- 2
src/commands/openFileOnRemote.ts View File

@ -4,7 +4,8 @@ import { BranchSorting, TagSorting } from '../configuration';
import { Commands, GlyphChars } from '../constants';
import type { Container } from '../container';
import { GitUri } from '../git/gitUri';
import { GitBranch, GitRevision } from '../git/models';
import { GitBranch } from '../git/models/branch';
import { GitRevision } from '../git/models/reference';
import { RemoteResourceType } from '../git/remotes/provider';
import { Logger } from '../logger';
import { ReferencePicker } from '../quickpicks/referencePicker';
@ -18,7 +19,7 @@ import {
isCommandContextViewNodeHasBranch,
isCommandContextViewNodeHasCommit,
} from './base';
import { OpenOnRemoteCommandArgs } from './openOnRemote';
import type { OpenOnRemoteCommandArgs } from './openOnRemote';
export interface OpenFileOnRemoteCommandArgs {
branchOrTag?: string;

+ 2
- 1
src/commands/openOnRemote.ts View File

@ -1,6 +1,7 @@
import { Commands, GlyphChars } from '../constants';
import type { Container } from '../container';
import { GitRemote, GitRevision } from '../git/models';
import { GitRevision } from '../git/models/reference';
import { GitRemote } from '../git/models/remote';
import { RemoteProvider, RemoteResource, RemoteResourceType } from '../git/remotes/provider';
import { Logger } from '../logger';
import { Messages } from '../messages';

+ 2
- 2
src/commands/openRevisionFile.ts View File

@ -1,9 +1,9 @@
import { TextDocumentShowOptions, TextEditor, Uri } from 'vscode';
import { FileAnnotationType } from '../configuration';
import type { FileAnnotationType } from '../configuration';
import { Commands } from '../constants';
import type { Container } from '../container';
import { GitUri } from '../git/gitUri';
import { GitRevision } from '../git/models';
import { GitRevision } from '../git/models/reference';
import { Logger } from '../logger';
import { Messages } from '../messages';
import { command } from '../system/command';

+ 12
- 15
src/commands/quickCommand.steps.ts View File

@ -4,26 +4,23 @@ import { Commands, GlyphChars, quickPickTitleMaxChars } from '../constants';
import { Container } from '../container';
import type { PlusFeatures } from '../features';
import type { PagedResult } from '../git/gitProvider';
import { BranchSortOptions, GitBranch } from '../git/models/branch';
import { GitCommit, GitStashCommit } from '../git/models/commit';
import type { GitContributor } from '../git/models/contributor';
import type { GitLog } from '../git/models/log';
import {
BranchSortOptions,
GitBranch,
GitBranchReference,
GitCommit,
GitContributor,
GitLog,
GitReference,
GitRemote,
GitRevision,
GitRevisionReference,
GitStash,
GitStashCommit,
GitStatus,
GitTag,
GitTagReference,
GitWorktree,
Repository,
TagSortOptions,
} from '../git/models';
} from '../git/models/reference';
import { GitRemote } from '../git/models/remote';
import { Repository } from '../git/models/repository';
import type { GitStash } from '../git/models/stash';
import type { GitStatus } from '../git/models/status';
import { GitTag, TagSortOptions } from '../git/models/tag';
import type { GitWorktree } from '../git/models/worktree';
import { RemoteResourceType } from '../git/remotes/provider';
import { SearchPattern } from '../git/search';
import {
@ -63,7 +60,7 @@ import {
TagQuickPickItem,
WorktreeQuickPickItem,
} from '../quickpicks/items/gitCommands';
import { ReferencesQuickPickItem } from '../quickpicks/referencePicker';
import type { ReferencesQuickPickItem } from '../quickpicks/referencePicker';
import {
CopyRemoteResourceCommandQuickPickItem,
OpenRemoteResourceCommandQuickPickItem,

+ 4
- 2
src/commands/remoteProviders.ts View File

@ -1,7 +1,9 @@
import { Commands } from '../constants';
import type { Container } from '../container';
import { GitCommit, GitRemote, Repository } from '../git/models';
import { RichRemoteProvider } from '../git/remotes/provider';
import type { GitCommit } from '../git/models/commit';
import { GitRemote } from '../git/models/remote';
import type { Repository } from '../git/models/repository';
import type { RichRemoteProvider } from '../git/remotes/provider';
import { RepositoryPicker } from '../quickpicks/repositoryPicker';
import { command } from '../system/command';
import { first } from '../system/iterable';

+ 1
- 1
src/commands/showQuickBranchHistory.ts View File

@ -2,7 +2,7 @@ import { TextEditor, Uri } from 'vscode';
import { Commands } from '../constants';
import type { Container } from '../container';
import { GitUri } from '../git/gitUri';
import { GitReference } from '../git/models';
import { GitReference } from '../git/models/reference';
import { command } from '../system/command';
import { ActiveEditorCachedCommand, CommandContext, getCommandUri } from './base';
import { executeGitCommand } from './gitCommands.actions';

+ 2
- 1
src/commands/showQuickCommit.ts View File

@ -2,7 +2,8 @@ import { TextEditor, Uri } from 'vscode';
import { Commands } from '../constants';
import type { Container } from '../container';
import { GitUri } from '../git/gitUri';
import { GitCommit, GitLog, GitStashCommit } from '../git/models';
import type { GitCommit, GitStashCommit } from '../git/models/commit';
import type { GitLog } from '../git/models/log';
import { Logger } from '../logger';
import { Messages } from '../messages';
import { command } from '../system/command';

+ 2
- 1
src/commands/showQuickCommitFile.ts View File

@ -2,7 +2,8 @@ import { TextEditor, Uri, window } from 'vscode';
import { Commands } from '../constants';
import type { Container } from '../container';
import { GitUri } from '../git/gitUri';
import { GitCommit, GitLog, GitStashCommit } from '../git/models';
import { GitCommit, GitStashCommit } from '../git/models/commit';
import type { GitLog } from '../git/models/log';
import { Logger } from '../logger';
import { Messages } from '../messages';
import { command } from '../system/command';

+ 5
- 2
src/commands/showQuickFileHistory.ts View File

@ -2,8 +2,11 @@ import { Range, TextEditor, Uri } from 'vscode';
import { Commands } from '../constants';
import type { Container } from '../container';
import { GitUri } from '../git/gitUri';
import { GitBranch, GitLog, GitReference, GitTag } from '../git/models';
import { CommandQuickPickItem } from '../quickpicks/items/common';
import type { GitBranch } from '../git/models/branch';
import type { GitLog } from '../git/models/log';
import type { GitReference } from '../git/models/reference';
import type { GitTag } from '../git/models/tag';
import type { CommandQuickPickItem } from '../quickpicks/items/common';
import { command } from '../system/command';
import { ActiveEditorCachedCommand, CommandContext, getCommandUri } from './base';
import { executeGitCommand } from './gitCommands.actions';

+ 3
- 2
src/commands/stashApply.ts View File

@ -1,8 +1,9 @@
import { GitActions } from '../commands/gitCommands.actions';
import { Commands } from '../constants';
import type { Container } from '../container';
import { GitStashCommit, GitStashReference } from '../git/models';
import { CommandQuickPickItem } from '../quickpicks/items/common';
import type { GitStashCommit } from '../git/models/commit';
import type { GitStashReference } from '../git/models/reference';
import type { CommandQuickPickItem } from '../quickpicks/items/common';
import { command } from '../system/command';
import {
Command,

+ 4
- 2
src/env/node/git/git.ts View File

@ -3,13 +3,15 @@ import { CancellationToken, Uri, window, workspace } from 'vscode';
import { hrtime } from '@env/hrtime';
import { GlyphChars } from '../../../constants';
import { GitCommandOptions, GitErrorHandling } from '../../../git/commandOptions';
import { GitDiffFilter, GitRevision, GitUser } from '../../../git/models';
import type { GitDiffFilter } from '../../../git/models/diff';
import { GitRevision } from '../../../git/models/reference';
import type { GitUser } from '../../../git/models/user';
import { GitBranchParser, GitLogParser, GitReflogParser, GitTagParser } from '../../../git/parsers';
import { Logger } from '../../../logger';
import { dirname, isAbsolute, isFolderGlob, joinPaths, normalizePath, splitPath } from '../../../system/path';
import { getDurationMilliseconds } from '../../../system/string';
import { compare, fromString } from '../../../system/version';
import { GitLocation } from './locator';
import type { GitLocation } from './locator';
import { fsExists, run, RunError, RunOptions } from './shell';
const emptyArray = Object.freeze([]) as unknown as any[];

+ 19
- 35
src/env/node/git/localGitProvider.ts View File

@ -53,46 +53,30 @@ import {
} from '../../../git/gitProvider';
import { GitProviderService } from '../../../git/gitProviderService';
import { encodeGitLensRevisionUriAuthority, GitUri } from '../../../git/gitUri';
import type { GitBlame, GitBlameAuthor, GitBlameLine, GitBlameLines } from '../../../git/models/blame';
import { BranchSortOptions, GitBranch } from '../../../git/models/branch';
import { GitCommit, GitCommitIdentity, GitStashCommit } from '../../../git/models/commit';
import { GitContributor } from '../../../git/models/contributor';
import type { GitDiff, GitDiffFilter, GitDiffHunkLine, GitDiffShortStat } from '../../../git/models/diff';
import { GitFile, GitFileChange, GitFileStatus } from '../../../git/models/file';
import type { GitLog } from '../../../git/models/log';
import type { GitMergeStatus } from '../../../git/models/merge';
import type { GitRebaseStatus } from '../../../git/models/rebase';
import { GitBranchReference, GitReference, GitRevision } from '../../../git/models/reference';
import type { GitReflog } from '../../../git/models/reflog';
import { GitRemote } from '../../../git/models/remote';
import {
BranchSortOptions,
GitBlame,
GitBlameAuthor,
GitBlameLine,
GitBlameLines,
GitBranch,
GitBranchReference,
GitCommit,
GitCommitIdentity,
GitContributor,
GitDiff,
GitDiffFilter,
GitDiffHunkLine,
GitDiffShortStat,
GitFile,
GitFileChange,
GitFileStatus,
GitLog,
GitMergeStatus,
GitRebaseStatus,
GitReference,
GitReflog,
GitRemote,
GitRevision,
GitStash,
GitStashCommit,
GitStatus,
GitStatusFile,
GitTag,
GitTreeEntry,
GitUser,
GitWorktree,
isUserMatch,
Repository,
RepositoryChange,
RepositoryChangeComparisonMode,
RepositoryChangeEvent,
TagSortOptions,
} from '../../../git/models';
} from '../../../git/models/repository';
import type { GitStash } from '../../../git/models/stash';
import { GitStatus, GitStatusFile } from '../../../git/models/status';
import { GitTag, TagSortOptions } from '../../../git/models/tag';
import type { GitTreeEntry } from '../../../git/models/tree';
import { GitUser, isUserMatch } from '../../../git/models/user';
import type { GitWorktree } from '../../../git/models/worktree';
import {
GitBlameParser,
GitBranchParser,

+ 2
- 1
src/extension.ts View File

@ -8,7 +8,8 @@ import { Commands, ContextKeys, CoreCommands } from './constants';
import { Container } from './container';
import { setContext } from './context';
import { GitUri } from './git/gitUri';
import { GitBranch, GitCommit } from './git/models';
import { GitBranch } from './git/models/branch';
import { GitCommit } from './git/models/commit';
import { Logger, LogLevel } from './logger';
import { Messages } from './messages';
import { registerPartnerActionRunners } from './partners';

+ 8
- 4
src/git/formatters/commitFormatter.ts View File

@ -22,10 +22,14 @@ import { emojify } from '../../emojis';
import { join, map } from '../../system/iterable';
import { PromiseCancelledError } from '../../system/promise';
import { escapeMarkdown, getSuperscript, TokenOptions } from '../../system/string';
import { ContactPresence } from '../../vsls/vsls';
import { PreviousLineComparisonUrisResult } from '../gitProvider';
import { GitCommit, GitRemote, GitRevision, IssueOrPullRequest, PullRequest } from '../models';
import { RemoteProvider } from '../remotes/provider';
import type { ContactPresence } from '../../vsls/vsls';
import type { PreviousLineComparisonUrisResult } from '../gitProvider';
import { GitCommit } from '../models/commit';
import type { IssueOrPullRequest } from '../models/issue';
import { PullRequest } from '../models/pullRequest';
import { GitRevision } from '../models/reference';
import { GitRemote } from '../models/remote';
import type { RemoteProvider } from '../remotes/provider';
import { FormatOptions, Formatter } from './formatter';
export interface CommitFormatOptions extends FormatOptions {

+ 3
- 2
src/git/fsProvider.ts View File

@ -12,13 +12,14 @@ import {
} from 'vscode';
import { isLinux } from '@env/platform';
import { Schemes } from '../constants';
import { Container } from '../container';
import type { Container } from '../container';
import { GitUri } from '../git/gitUri';
import { debug } from '../system/decorators/log';
import { map } from '../system/iterable';
import { normalizePath, relative } from '../system/path';
import { TernarySearchTree } from '../system/searchTree';
import { GitRevision, GitTreeEntry } from './models';
import { GitRevision } from './models/reference';
import type { GitTreeEntry } from './models/tree';
const emptyArray = new Uint8Array(0);

+ 21
- 32
src/git/gitProvider.ts View File

@ -1,38 +1,27 @@
import { Disposable, Event, Range, TextDocument, Uri, WorkspaceFolder } from 'vscode';
import type { Commit, InputBox } from '../@types/vscode.git';
import { ForcePushMode } from '../@types/vscode.git.enums';
import { Features } from '../features';
import type { ForcePushMode } from '../@types/vscode.git.enums';
import type { Features } from '../features';
import type { GitUri } from './gitUri';
import type {
BranchSortOptions,
GitBlame,
GitBlameLine,
GitBlameLines,
GitBranch,
GitBranchReference,
GitCommit,
GitContributor,
GitDiff,
GitDiffFilter,
GitDiffHunkLine,
GitDiffShortStat,
GitFile,
GitLog,
GitMergeStatus,
GitRebaseStatus,
GitReflog,
GitRemote,
GitStash,
GitStatus,
GitStatusFile,
GitTag,
GitTreeEntry,
GitUser,
GitWorktree,
Repository,
RepositoryChangeEvent,
TagSortOptions,
} from './models';
import type { GitBlame, GitBlameLine, GitBlameLines } from './models/blame';
import type { BranchSortOptions, GitBranch } from './models/branch';
import type { GitCommit } from './models/commit';
import type { GitContributor } from './models/contributor';
import type { GitDiff, GitDiffFilter, GitDiffHunkLine, GitDiffShortStat } from './models/diff';
import type { GitFile } from './models/file';
import type { GitLog } from './models/log';
import type { GitMergeStatus } from './models/merge';
import type { GitRebaseStatus } from './models/rebase';
import type { GitBranchReference } from './models/reference';
import type { GitReflog } from './models/reflog';
import type { GitRemote } from './models/remote';
import type { Repository, RepositoryChangeEvent } from './models/repository';
import type { GitStash } from './models/stash';
import type { GitStatus, GitStatusFile } from './models/status';
import type { GitTag, TagSortOptions } from './models/tag';
import type { GitTreeEntry } from './models/tree';
import type { GitUser } from './models/user';
import type { GitWorktree } from './models/worktree';
import type { RemoteProviders } from './remotes/factory';
import type { RemoteProvider, RichRemoteProvider } from './remotes/provider';
import type { SearchPattern } from './search';

+ 23
- 34
src/git/gitProviderService.ts View File

@ -53,46 +53,35 @@ import {
RepositoryVisibility,
ScmRepository,
} from './gitProvider';
import { GitUri } from './gitUri';
import type { GitUri } from './gitUri';
import type { GitBlame, GitBlameLine, GitBlameLines } from './models/blame';
import type { BranchSortOptions, GitBranch } from './models/branch';
import type { GitCommit } from './models/commit';
import type { GitContributor } from './models/contributor';
import type { GitDiff, GitDiffFilter, GitDiffHunkLine, GitDiffShortStat } from './models/diff';
import type { GitFile } from './models/file';
import type { GitLog } from './models/log';
import type { GitMergeStatus } from './models/merge';
import type { PullRequest, PullRequestState } from './models/pullRequest';
import type { GitRebaseStatus } from './models/rebase';
import { GitBranchReference, GitReference, GitRevision } from './models/reference';
import type { GitReflog } from './models/reflog';
import { GitRemote } from './models/remote';
import {
BranchSortOptions,
GitBlame,
GitBlameLine,
GitBlameLines,
GitBranch,
GitBranchReference,
GitCommit,
GitContributor,
GitDiff,
GitDiffFilter,
GitDiffHunkLine,
GitDiffShortStat,
GitFile,
GitLog,
GitMergeStatus,
GitRebaseStatus,
GitReference,
GitReflog,
GitRemote,
GitRevision,
GitStash,
GitStatus,
GitStatusFile,
GitTag,
GitTreeEntry,
GitUser,
GitWorktree,
PullRequest,
PullRequestState,
Repository,
RepositoryChange,
RepositoryChangeComparisonMode,
RepositoryChangeEvent,
TagSortOptions,
} from './models';
import { RemoteProviders } from './remotes/factory';
} from './models/repository';
import type { GitStash } from './models/stash';
import type { GitStatus, GitStatusFile } from './models/status';
import type { GitTag, TagSortOptions } from './models/tag';
import type { GitTreeEntry } from './models/tree';
import type { GitUser } from './models/user';
import type { GitWorktree } from './models/worktree';
import type { RemoteProviders } from './remotes/factory';
import { Authentication, RemoteProvider, RichRemoteProvider } from './remotes/provider';
import { SearchPattern } from './search';
import type { SearchPattern } from './search';
const maxDefaultBranchWeight = 100;
const weightedDefaultBranches = new Map<string, number>([

+ 2
- 1
src/git/gitUri.ts View File

@ -12,7 +12,8 @@ import { basename, getBestPath, normalizePath, relativeDir, splitPath } from '..
// import { CharCode } from '../system/string';
import { isVirtualUri } from '../system/utils';
import type { RevisionUriData } from './gitProvider';
import { GitFile, GitRevision } from './models';
import type { GitFile } from './models/file';
import { GitRevision } from './models/reference';
const slash = 47; //CharCode.Slash;

+ 0
- 25
src/git/models.ts View File

@ -1,25 +0,0 @@
export * from './models/author';
export * from './models/blame';
export * from './models/branch';
export * from './models/commit';
export * from './models/contributor';
export * from './models/defaultBranch';
export * from './models/diff';
export * from './models/file';
export * from './models/issue';
export * from './models/log';
export * from './models/merge';
export * from './models/pullRequest';
export * from './models/reference';
export * from './models/rebase';
export * from './models/reflog';
export * from './models/remote';
export * from './models/remoteProvider';
export * from './models/repository';
export * from './models/shortlog';
export * from './models/stash';
export * from './models/status';
export * from './models/tag';
export * from './models/tree';
export * from './models/user';
export * from './models/worktree';

+ 5
- 11
src/git/parsers/blameParser.ts View File

@ -1,17 +1,11 @@
import type { Container } from '../../container';
import { debug } from '../../system/decorators/log';
import { getLines } from '../../system/string';
import {
GitBlame,
GitBlameAuthor,
GitCommit,
GitCommitIdentity,
GitCommitLine,
GitFileChange,
GitFileIndexStatus,
GitRevision,
GitUser,
} from '../models';
import type { GitBlame, GitBlameAuthor } from '../models/blame';
import { GitCommit, GitCommitIdentity, GitCommitLine } from '../models/commit';
import { GitFileChange, GitFileIndexStatus } from '../models/file';
import { GitRevision } from '../models/reference';
import type { GitUser } from '../models/user';
interface BlameEntry {
sha: string;

+ 5
- 13
src/git/parsers/logParser.ts View File

@ -4,19 +4,11 @@ import { filterMap } from '../../system/array';
import { debug } from '../../system/decorators/log';
import { normalizePath, relative } from '../../system/path';
import { getLines } from '../../system/string';
import {
GitCommit,
GitCommitIdentity,
GitCommitLine,
GitFile,
GitFileChange,
GitFileChangeStats,
GitFileIndexStatus,
GitLog,
GitRevision,
GitUser,
isUserMatch,
} from '../models';
import { GitCommit, GitCommitIdentity, GitCommitLine } from '../models/commit';
import { GitFile, GitFileChange, GitFileChangeStats, GitFileIndexStatus } from '../models/file';
import type { GitLog } from '../models/log';
import { GitRevision } from '../models/reference';
import { GitUser, isUserMatch } from '../models/user';
const diffRegex = /diff --git a\/(.*) b\/(.*)/;
const diffRangeRegex = /^@@ -(\d+?),(\d+?) \+(\d+?),(\d+?) @@/;

+ 2
- 3
src/git/parsers/remoteParser.ts View File

@ -1,7 +1,6 @@
import { debug } from '../../system/decorators/log';
import { GitRemote } from '../models';
import { GitRemoteType } from '../models/remote';
import { RemoteProvider } from '../remotes/provider';
import { GitRemote, GitRemoteType } from '../models/remote';
import type { RemoteProvider } from '../remotes/provider';
const emptyStr = '';

+ 1
- 1
src/git/parsers/statusParser.ts View File

@ -1,6 +1,6 @@
import { debug } from '../../system/decorators/log';
import { normalizePath } from '../../system/path';
import { GitStatus, GitStatusFile } from '../models';
import { GitStatus, GitStatusFile } from '../models/status';
const emptyStr = '';

+ 1
- 1
src/git/parsers/tagParser.ts View File

@ -1,5 +1,5 @@
import { debug } from '../../system/decorators/log';
import { GitTag } from '../models';
import { GitTag } from '../models/tag';
const tagRegex = /^<n>(.+)<\*r>(.*)<r>(.*)<d>(.*)<ad>(.*)<s>(.*)$/gm;

+ 1
- 1
src/git/parsers/treeParser.ts View File

@ -1,5 +1,5 @@
import { debug } from '../../system/decorators/log';
import { GitTreeEntry } from '../models';
import { GitTreeEntry } from '../models/tree';
const emptyStr = '';
const treeRegex = /(?:.+?)\s+(.+?)\s+(.+?)\s+(.+?)\s+(.+)/gm;

+ 3
- 3
src/git/remotes/bitbucket-server.ts View File

@ -1,8 +1,8 @@
import { Range, Uri } from 'vscode';
import { DynamicAutolinkReference } from '../../annotations/autolinks';
import type { DynamicAutolinkReference } from '../../annotations/autolinks';
import { AutolinkReference, AutolinkType } from '../../config';
import { GitRevision } from '../models';
import { Repository } from '../models/repository';
import { GitRevision } from '../models/reference';
import type { Repository } from '../models/repository';
import { RemoteProvider } from './provider';
const fileRegex = /^\/([^/]+)\/([^/]+?)\/src(.+)$/i;

+ 3
- 3
src/git/remotes/bitbucket.ts View File

@ -1,8 +1,8 @@
import { Range, Uri } from 'vscode';
import { DynamicAutolinkReference } from '../../annotations/autolinks';
import type { DynamicAutolinkReference } from '../../annotations/autolinks';
import { AutolinkReference, AutolinkType } from '../../config';
import { GitRevision } from '../models';
import { Repository } from '../models/repository';
import { GitRevision } from '../models/reference';
import type { Repository } from '../models/repository';
import { RemoteProvider } from './provider';
const fileRegex = /^\/([^/]+)\/([^/]+?)\/src(.+)$/i;

+ 4
- 4
src/git/remotes/gerrit.ts View File

@ -1,8 +1,8 @@
import { Range, Uri } from 'vscode';
import { DynamicAutolinkReference } from '../../annotations/autolinks';
import { AutolinkReference } from '../../config';
import { GitRevision } from '../models';
import { Repository } from '../models/repository';
import type { DynamicAutolinkReference } from '../../annotations/autolinks';
import type { AutolinkReference } from '../../config';
import { GitRevision } from '../models/reference';
import type { Repository } from '../models/repository';
import { RemoteProvider } from './provider';
const fileRegex = /^\/([^/]+)\/\+(.+)$/i;

+ 3
- 3
src/git/remotes/gitea.ts View File

@ -1,8 +1,8 @@
import { Range, Uri } from 'vscode';
import { DynamicAutolinkReference } from '../../annotations/autolinks';
import type { DynamicAutolinkReference } from '../../annotations/autolinks';
import { AutolinkReference, AutolinkType } from '../../config';
import { GitRevision } from '../models';
import { Repository } from '../models/repository';
import { GitRevision } from '../models/reference';
import type { Repository } from '../models/repository';
import { RemoteProvider } from './provider';
const fileRegex = /^\/([^/]+)\/([^/]+?)\/src(.+)$/i;

+ 6
- 9
src/git/remotes/github.ts View File

@ -6,15 +6,12 @@ import { isSubscriptionPaidPlan, isSubscriptionPreviewTrialExpired } from '../..
import { log } from '../../system/decorators/log';
import { memoize } from '../../system/decorators/memoize';
import { equalsIgnoreCase } from '../../system/string';
import {
type Account,
type DefaultBranch,
GitRevision,
type IssueOrPullRequest,
type PullRequest,
type PullRequestState,
type Repository,
} from '../models';
import type { Account } from '../models/author';
import type { DefaultBranch } from '../models/defaultBranch';
import type { IssueOrPullRequest } from '../models/issue';
import type { PullRequest, PullRequestState } from '../models/pullRequest';
import { GitRevision } from '../models/reference';
import type { Repository } from '../models/repository';
import { RichRemoteProvider } from './provider';
const autolinkFullIssuesRegex = /\b(?<repo>[^/\s]+\/[^/\s]+)#(?<num>[0-9]+)\b(?!]\()/g;

+ 7
- 10
src/git/remotes/gitlab.ts View File

@ -2,22 +2,19 @@ import { AuthenticationSession, Disposable, env, QuickInputButton, Range, ThemeI
import type { Autolink, DynamicAutolinkReference } from '../../annotations/autolinks';
import { AutolinkReference, AutolinkType } from '../../config';
import { Container } from '../../container';
import {
import type {
IntegrationAuthenticationProvider,
IntegrationAuthenticationSessionDescriptor,
} from '../../plus/integrationAuthentication';
import { isSubscriptionPaidPlan, isSubscriptionPreviewTrialExpired } from '../../subscription';
import { log } from '../../system/decorators/log';
import { equalsIgnoreCase } from '../../system/string';
import {
type Account,
type DefaultBranch,
GitRevision,
type IssueOrPullRequest,
type PullRequest,
type PullRequestState,
type Repository,
} from '../models';
import type { Account } from '../models/author';
import type { DefaultBranch } from '../models/defaultBranch';
import type { IssueOrPullRequest } from '../models/issue';
import type { PullRequest, PullRequestState } from '../models/pullRequest';
import { GitRevision } from '../models/reference';
import type { Repository } from '../models/repository';
import { RichRemoteProvider } from './provider';
const autolinkFullIssuesRegex = /\b(?<repo>[^/\s]+\/[^/\s]+)#(?<num>[0-9]+)\b(?!]\()/g;

+ 9
- 12
src/git/remotes/provider.ts View File

@ -12,8 +12,8 @@ import {
} from 'vscode';
import { wrapForForcedInsecureSSL } from '@env/fetch';
import { isWeb } from '@env/platform';
import { DynamicAutolinkReference } from '../../annotations/autolinks';
import { AutolinkReference } from '../../config';
import type { DynamicAutolinkReference } from '../../annotations/autolinks';
import type { AutolinkReference } from '../../config';
import { configuration } from '../../configuration';
import { Container } from '../../container';
import { AuthenticationError, ProviderRequestClientError } from '../../errors';
@ -25,16 +25,13 @@ import { gate } from '../../system/decorators/gate';
import { debug, log } from '../../system/decorators/log';
import { encodeUrl } from '../../system/encoding';
import { isPromise } from '../../system/promise';
import {
Account,
DefaultBranch,
GitCommit,
IssueOrPullRequest,
PullRequest,
PullRequestState,
RemoteProviderReference,
Repository,
} from '../models';
import type { Account } from '../models/author';
import type { GitCommit } from '../models/commit';
import type { DefaultBranch } from '../models/defaultBranch';
import type { IssueOrPullRequest } from '../models/issue';
import type { PullRequest, PullRequestState } from '../models/pullRequest';
import type { RemoteProviderReference } from '../models/remoteProvider';
import type { Repository } from '../models/repository';
export const enum RemoteResourceType {
Branch = 'branch',

+ 1
- 1
src/git/search.ts View File

@ -1,4 +1,4 @@
import { GitRevision, GitRevisionReference } from './models';
import { GitRevision, GitRevisionReference } from './models/reference';
export type SearchOperators =
| ''

+ 5
- 1
src/hovers/hovers.ts View File

@ -6,7 +6,11 @@ import { GlyphChars } from '../constants';
import { Container } from '../container';
import { CommitFormatter } from '../git/formatters';
import { GitUri } from '../git/gitUri';
import { GitCommit, GitDiffHunk, GitDiffHunkLine, GitRemote, GitRevision, PullRequest } from '../git/models';
import type { GitCommit } from '../git/models/commit';
import type { GitDiffHunk, GitDiffHunkLine } from '../git/models/diff';
import type { PullRequest } from '../git/models/pullRequest';
import { GitRevision } from '../git/models/reference';
import type { GitRemote } from '../git/models/remote';
import { Logger, LogLevel } from '../logger';
import { count } from '../system/iterable';
import { PromiseCancelledError } from '../system/promise';

+ 1
- 1
src/messages.ts View File

@ -1,7 +1,7 @@
import { ConfigurationTarget, MessageItem, window } from 'vscode';
import { configuration, SuppressedMessages } from './configuration';
import { Commands } from './constants';
import { GitCommit } from './git/models';
import type { GitCommit } from './git/models/commit';
import { Logger } from './logger';
import { executeCommand } from './system/command';

+ 5
- 1
src/plus/github/github.ts View File

@ -16,8 +16,12 @@ import {
ProviderRequestRateLimitError,
} from '../../errors';
import { PagedResult, RepositoryVisibility } from '../../git/gitProvider';
import { type DefaultBranch, GitRevision, type GitUser, type IssueOrPullRequest, PullRequest } from '../../git/models';
import type { Account } from '../../git/models/author';
import type { DefaultBranch } from '../../git/models/defaultBranch';
import type { IssueOrPullRequest } from '../../git/models/issue';
import type { PullRequest } from '../../git/models/pullRequest';
import { GitRevision } from '../../git/models/reference';
import type { GitUser } from '../../git/models/user';
import { getGitHubNoReplyAddressParts } from '../../git/remotes/github';
import type { RichRemoteProvider } from '../../git/remotes/provider';
import { LogCorrelationContext, Logger, LogLevel } from '../../logger';

+ 20
- 40
src/plus/github/githubGitProvider.ts View File

@ -39,46 +39,26 @@ import {
ScmRepository,
} from '../../git/gitProvider';
import { GitUri } from '../../git/gitUri';
import {
BranchSortOptions,
GitBlame,
GitBlameAuthor,
GitBlameLine,
GitBlameLines,
GitBranch,
GitBranchReference,
GitCommit,
GitCommitIdentity,
GitCommitLine,
GitContributor,
GitDiff,
GitDiffFilter,
GitDiffHunkLine,
GitDiffShortStat,
GitFile,
GitFileChange,
GitFileIndexStatus,
GitLog,
GitMergeStatus,
GitRebaseStatus,
GitReference,
GitReflog,
GitRemote,
GitRemoteType,
GitRevision,
GitStash,
GitStatus,
GitStatusFile,
GitTag,
GitTreeEntry,
GitUser,
isUserMatch,
Repository,
RepositoryChangeEvent,
TagSortOptions,
} from '../../git/models';
import type { GitBlame, GitBlameAuthor, GitBlameLine, GitBlameLines } from '../../git/models/blame';
import { BranchSortOptions, GitBranch } from '../../git/models/branch';
import { GitCommit, GitCommitIdentity, GitCommitLine } from '../../git/models/commit';
import { GitContributor } from '../../git/models/contributor';
import type { GitDiff, GitDiffFilter, GitDiffHunkLine, GitDiffShortStat } from '../../git/models/diff';
import { GitFile, GitFileChange, GitFileIndexStatus } from '../../git/models/file';
import type { GitLog } from '../../git/models/log';
import type { GitMergeStatus } from '../../git/models/merge';
import type { GitRebaseStatus } from '../../git/models/rebase';
import { GitBranchReference, GitReference, GitRevision } from '../../git/models/reference';
import type { GitReflog } from '../../git/models/reflog';
import { GitRemote, GitRemoteType } from '../../git/models/remote';
import { Repository, RepositoryChangeEvent } from '../../git/models/repository';
import type { GitStash } from '../../git/models/stash';
import type { GitStatus, GitStatusFile } from '../../git/models/status';
import { GitTag, TagSortOptions } from '../../git/models/tag';
import type { GitTreeEntry } from '../../git/models/tree';
import { GitUser, isUserMatch } from '../../git/models/user';
import { RemoteProviderFactory, RemoteProviders } from '../../git/remotes/factory';
import { RemoteProvider, RichRemoteProvider } from '../../git/remotes/provider';
import type { RemoteProvider, RichRemoteProvider } from '../../git/remotes/provider';
import { SearchPattern } from '../../git/search';
import { LogCorrelationContext, Logger } from '../../logger';
import { gate } from '../../system/decorators/gate';
@ -87,7 +67,7 @@ import { filterMap, some } from '../../system/iterable';
import { isAbsolute, isFolderGlob, maybeUri, normalizePath, relative } from '../../system/path';
import { getSettledValue } from '../../system/promise';
import { CachedBlame, CachedLog, GitDocumentState } from '../../trackers/gitDocumentTracker';
import { TrackedDocument } from '../../trackers/trackedDocument';
import type { TrackedDocument } from '../../trackers/trackedDocument';
import { getRemoteHubApi, GitHubAuthorityMetadata, Metadata, RemoteHubApi } from '../remotehub';
import type { GitHubApi } from './github';
import { fromCommitFileStatus } from './models';

+ 3
- 1
src/plus/github/models.ts View File

@ -1,5 +1,7 @@
import type { Endpoints } from '@octokit/types';
import { GitFileIndexStatus, type IssueOrPullRequestType, PullRequest, PullRequestState } from '../../git/models';
import { GitFileIndexStatus } from '../../git/models/file';
import type { IssueOrPullRequestType } from '../../git/models/issue';
import { PullRequest, PullRequestState } from '../../git/models/pullRequest';
import type { RichRemoteProvider } from '../../git/remotes/provider';
export interface GitHubBlame {

+ 4
- 1
src/plus/gitlab/gitlab.ts View File

@ -13,7 +13,10 @@ import {
ProviderRequestNotFoundError,
ProviderRequestRateLimitError,
} from '../../errors';
import { Account, DefaultBranch, IssueOrPullRequest, IssueOrPullRequestType, PullRequest } from '../../git/models';
import type { Account } from '../../git/models/author';
import type { DefaultBranch } from '../../git/models/defaultBranch';
import { IssueOrPullRequest, IssueOrPullRequestType } from '../../git/models/issue';
import { PullRequest } from '../../git/models/pullRequest';
import type { RichRemoteProvider } from '../../git/remotes/provider';
import { LogCorrelationContext, Logger, LogLevel } from '../../logger';
import { Messages } from '../../messages';

+ 1
- 1
src/plus/gitlab/models.ts View File

@ -1,4 +1,4 @@
import { PullRequest, PullRequestState } from '../../git/models';
import { PullRequest, PullRequestState } from '../../git/models/pullRequest';
import type { RichRemoteProvider } from '../../git/remotes/provider';
export interface GitLabUser {

+ 5
- 1
src/plus/webviews/timeline/timelineWebview.ts View File

@ -7,7 +7,11 @@ import type { Container } from '../../../container';
import { setContext } from '../../../context';
import { PlusFeatures } from '../../../features';
import { GitUri } from '../../../git/gitUri';
import { RepositoryChange, RepositoryChangeComparisonMode, RepositoryChangeEvent } from '../../../git/models';
import {
RepositoryChange,
RepositoryChangeComparisonMode,
RepositoryChangeEvent,
} from '../../../git/models/repository';
import { createFromDateDelta } from '../../../system/date';
import { debug } from '../../../system/decorators/log';
import { debounce, Deferrable } from '../../../system/function';

+ 6
- 2
src/plus/webviews/timeline/timelineWebviewView.ts View File

@ -3,11 +3,15 @@ import { commands, Disposable, TextEditor, Uri, window } from 'vscode';
import type { ShowQuickCommitFileCommandArgs } from '../../../commands';
import { configuration } from '../../../configuration';
import { Commands } from '../../../constants';
import { Container } from '../../../container';
import type { Container } from '../../../container';
import { PlusFeatures } from '../../../features';
import type { RepositoriesChangeEvent } from '../../../git/gitProviderService';
import { GitUri } from '../../../git/gitUri';
import { RepositoryChange, RepositoryChangeComparisonMode, RepositoryChangeEvent } from '../../../git/models';
import {
RepositoryChange,
RepositoryChangeComparisonMode,
RepositoryChangeEvent,
} from '../../../git/models/repository';
import { createFromDateDelta } from '../../../system/date';
import { debug } from '../../../system/decorators/log';
import { debounce, Deferrable } from '../../../system/function';

+ 3
- 1
src/quickpicks/commitPicker.ts View File

@ -1,7 +1,9 @@
import { Disposable, window } from 'vscode';
import { GitCommit, GitStashCommit } from 'src/git/models/commit';
import { GitLog } from 'src/git/models/log';
import { GitStash } from 'src/git/models/stash';
import { configuration } from '../configuration';
import { Container } from '../container';
import { GitCommit, GitLog, GitStash, GitStashCommit } from '../git/models';
import { KeyboardScope, Keys } from '../keyboard';
import { CommandQuickPickItem } from '../quickpicks/items/common';
import { filter, map } from '../system/iterable';

+ 5
- 3
src/quickpicks/items/commits.ts View File

@ -1,12 +1,14 @@
import { QuickPickItem, window } from 'vscode';
import { GitActions } from '../../commands/gitCommands.actions';
import { OpenChangedFilesCommandArgs } from '../../commands/openChangedFiles';
import type { OpenChangedFilesCommandArgs } from '../../commands/openChangedFiles';
import { QuickCommandButtons } from '../../commands/quickCommand.buttons';
import { Commands, GlyphChars } from '../../constants';
import { Container } from '../../container';
import { CommitFormatter } from '../../git/formatters';
import { GitCommit, GitFile, GitFileChange, GitStatusFile } from '../../git/models';
import { Keys } from '../../keyboard';
import { GitCommit } from '../../git/models/commit';
import { GitFile, GitFileChange } from '../../git/models/file';
import type { GitStatusFile } from '../../git/models/status';
import type { Keys } from '../../keyboard';
import { basename } from '../../system/path';
import { pad } from '../../system/string';
import { CommandQuickPickItem } from './common';

+ 9
- 12
src/quickpicks/items/gitCommands.ts View File

@ -4,18 +4,15 @@ import { getSteps } from '../../commands/gitCommands.utils';
import { Commands, GlyphChars } from '../../constants';
import { Container } from '../../container';
import { emojify } from '../../emojis';
import {
GitBranch,
GitCommit,
GitContributor,
GitReference,
GitRemoteType,
GitRevision,
GitStatus,
GitTag,
GitWorktree,
Repository,
} from '../../git/models';
import type { GitBranch } from '../../git/models/branch';
import { GitCommit } from '../../git/models/commit';
import type { GitContributor } from '../../git/models/contributor';
import { GitReference, GitRevision } from '../../git/models/reference';
import { GitRemoteType } from '../../git/models/remote';
import type { Repository } from '../../git/models/repository';
import type { GitStatus } from '../../git/models/status';
import type { GitTag } from '../../git/models/tag';
import type { GitWorktree } from '../../git/models/worktree';
import { fromNow } from '../../system/date';
import { pad } from '../../system/string';
import { CommandQuickPickItem, QuickPickItemOfT } from './common';

+ 4
- 2
src/quickpicks/referencePicker.ts View File

@ -3,8 +3,10 @@ import { GitActions } from '../commands/gitCommands.actions';
import { getBranchesAndOrTags, getValidateGitReferenceFn, QuickCommandButtons } from '../commands/quickCommand';
import { GlyphChars } from '../constants';
import { Container } from '../container';
import { BranchSortOptions, GitBranch, GitReference, GitTag, TagSortOptions } from '../git/models';
import { KeyboardScope, Keys } from '../keyboard';
import type { BranchSortOptions, GitBranch } from '../git/models/branch';
import { GitReference } from '../git/models/reference';
import type { GitTag, TagSortOptions } from '../git/models/tag';
import type { KeyboardScope, Keys } from '../keyboard';
import { getQuickPickIgnoreFocusOut } from '../system/utils';
import { BranchQuickPickItem, RefQuickPickItem, TagQuickPickItem } from './items/gitCommands';

+ 3
- 2
src/quickpicks/remoteProviderPicker.ts View File

@ -2,9 +2,10 @@ import { Disposable, env, QuickInputButton, ThemeIcon, Uri, window } from 'vscod
import type { OpenOnRemoteCommandArgs } from '../commands';
import { Commands, GlyphChars } from '../constants';
import { Container } from '../container';
import { GitBranch, GitRemote } from '../git/models';
import { GitBranch } from '../git/models/branch';
import { GitRemote } from '../git/models/remote';
import { getNameFromRemoteResource, RemoteProvider, RemoteResource, RemoteResourceType } from '../git/remotes/provider';
import { Keys } from '../keyboard';
import type { Keys } from '../keyboard';
import { CommandQuickPickItem } from '../quickpicks/items/common';
import { getSettledValue } from '../system/promise';
import { getQuickPickIgnoreFocusOut } from '../system/utils';

+ 1
- 1
src/quickpicks/repositoryPicker.ts View File

@ -1,6 +1,6 @@
import { Disposable, TextEditor, Uri, window } from 'vscode';
import { Container } from '../container';
import { Repository } from '../git/models';
import type { Repository } from '../git/models/repository';
import { map } from '../system/iterable';
import { getQuickPickIgnoreFocusOut } from '../system/utils';
import { CommandQuickPickItem } from './items/common';

+ 4
- 3
src/statusbar/statusBarController.ts View File

@ -13,9 +13,10 @@ import {
import type { ToggleFileChangesAnnotationCommandArgs } from '../commands/toggleFileAnnotations';
import { configuration, FileAnnotationType, StatusBarCommand } from '../configuration';
import { Commands, GlyphChars } from '../constants';
import { Container } from '../container';
import type { Container } from '../container';
import { CommitFormatter } from '../git/formatters';
import { GitCommit, PullRequest } from '../git/models';
import type { GitCommit } from '../git/models/commit';
import type { PullRequest } from '../git/models/pullRequest';
import { Hovers } from '../hovers/hovers';
import { LogCorrelationContext, Logger } from '../logger';
import { asCommand } from '../system/command';
@ -23,7 +24,7 @@ import { debug } from '../system/decorators/log';
import { once } from '../system/event';
import { PromiseCancelledError } from '../system/promise';
import { isTextEditor } from '../system/utils';
import { LinesChangeEvent } from '../trackers/gitLineTracker';
import type { LinesChangeEvent } from '../trackers/gitLineTracker';
export class StatusBarController implements Disposable {
private _pullRequestCancellation: CancellationTokenSource | undefined;

+ 5
- 3
src/terminal/linkProvider.ts View File

@ -5,9 +5,11 @@ import type {
ShowQuickCommitCommandArgs,
} from '../commands';
import { Commands } from '../constants';
import { Container } from '../container';
import { PagedResult } from '../git/gitProvider';
import { GitBranch, GitReference, GitTag } from '../git/models';
import type { Container } from '../container';
import type { PagedResult } from '../git/gitProvider';
import type { GitBranch } from '../git/models/branch';
import { GitReference } from '../git/models/reference';
import type { GitTag } from '../git/models/tag';
const commandsRegexShared =
/\b(g(?:it)?\b\s*)\b(branch|checkout|cherry-pick|fetch|grep|log|merge|pull|push|rebase|reset|revert|show|stash|status|tag)\b/gi;

+ 3
- 3
src/trackers/documentTracker.ts View File

@ -17,11 +17,11 @@ import {
} from 'vscode';
import { configuration } from '../configuration';
import { ContextKeys } from '../constants';
import { Container } from '../container';
import type { Container } from '../container';
import { setContext } from '../context';
import { RepositoriesChangeEvent } from '../git/gitProviderService';
import type { RepositoriesChangeEvent } from '../git/gitProviderService';
import { GitUri } from '../git/gitUri';
import { RepositoryChange, RepositoryChangeComparisonMode, RepositoryChangeEvent } from '../git/models';
import { RepositoryChange, RepositoryChangeComparisonMode, RepositoryChangeEvent } from '../git/models/repository';
import { debug } from '../system/decorators/log';
import { once } from '../system/event';
import { debounce, Deferrable } from '../system/function';

+ 3
- 1
src/trackers/gitDocumentTracker.ts View File

@ -1,5 +1,7 @@
import { TextDocument, Uri } from 'vscode';
import { GitBlame, GitDiff, GitLog } from '../git/models';
import type { GitBlame } from '../git/models/blame';
import type { GitDiff } from '../git/models/diff';
import type { GitLog } from '../git/models/log';
import { DocumentTracker } from './documentTracker';
export * from './documentTracker';

+ 3
- 3
src/trackers/gitLineTracker.ts View File

@ -1,11 +1,11 @@
import { Disposable, TextEditor } from 'vscode';
import { configuration } from '../configuration';
import { GlyphChars } from '../constants';
import { Container } from '../container';
import { GitCommit } from '../git/models';
import type { Container } from '../container';
import type { GitCommit } from '../git/models/commit';
import { Logger } from '../logger';
import { debug } from '../system/decorators/log';
import {
import type {
DocumentBlameStateChangeEvent,
DocumentContentChangeEvent,
DocumentDirtyIdleTriggerEvent,

+ 2
- 2
src/trackers/trackedDocument.ts View File

@ -1,9 +1,9 @@
import { Disposable, Event, EventEmitter, TextDocument, TextEditor } from 'vscode';
import { ContextKeys } from '../constants';
import { Container } from '../container';
import type { Container } from '../container';
import { setContext } from '../context';
import { GitUri } from '../git/gitUri';
import { GitRevision } from '../git/models';
import { GitRevision } from '../git/models/reference';
import { Logger } from '../logger';
import { debounce, Deferrable } from '../system/function';
import { getEditorIfActive, isActiveDocument } from '../system/utils';

+ 4
- 10
src/views/branchesView.ts View File

@ -16,17 +16,11 @@ import {
ViewShowBranchComparison,
} from '../configuration';
import { Commands } from '../constants';
import { Container } from '../container';
import type { Container } from '../container';
import { GitUri } from '../git/gitUri';
import {
GitBranchReference,
GitCommit,
GitReference,
GitRevisionReference,
RepositoryChange,
RepositoryChangeComparisonMode,
RepositoryChangeEvent,
} from '../git/models';
import { GitCommit } from '../git/models/commit';
import { GitBranchReference, GitReference, GitRevisionReference } from '../git/models/reference';
import { RepositoryChange, RepositoryChangeComparisonMode, RepositoryChangeEvent } from '../git/models/repository';
import { executeCommand } from '../system/command';
import { gate } from '../system/decorators/gate';
import {

+ 3
- 4
src/views/commitsView.ts View File

@ -13,15 +13,14 @@ import { Commands, ContextKeys, GlyphChars } from '../constants';
import { Container } from '../container';
import { setContext } from '../context';
import { GitUri } from '../git/gitUri';
import { GitCommit } from '../git/models/commit';
import { GitReference, GitRevisionReference } from '../git/models/reference';
import {
GitCommit,
GitReference,
GitRevisionReference,
Repository,
RepositoryChange,
RepositoryChangeComparisonMode,
RepositoryChangeEvent,
} from '../git/models';
} from '../git/models/repository';
import { executeCommand } from '../system/command';
import { gate } from '../system/decorators/gate';
import { debug } from '../system/decorators/log';

+ 3
- 2
src/views/contributorsView.ts View File

@ -11,9 +11,10 @@ import {
import { Avatars } from '../avatars';
import { configuration, ContributorsViewConfig, ViewFilesLayout } from '../configuration';
import { Commands } from '../constants';
import { Container } from '../container';
import type { Container } from '../container';
import { GitUri } from '../git/gitUri';
import { GitContributor, RepositoryChange, RepositoryChangeComparisonMode, RepositoryChangeEvent } from '../git/models';
import type { GitContributor } from '../git/models/contributor';
import { RepositoryChange, RepositoryChangeComparisonMode, RepositoryChangeEvent } from '../git/models/repository';
import { executeCommand } from '../system/command';
import { gate } from '../system/decorators/gate';
import { debug } from '../system/decorators/log';

+ 3
- 3
src/views/nodes/UncommittedFileNode.ts View File

@ -1,11 +1,11 @@
import { Command, TreeItem, TreeItemCollapsibleState } from 'vscode';
import { DiffWithPreviousCommandArgs } from '../../commands';
import type { DiffWithPreviousCommandArgs } from '../../commands';
import { Commands } from '../../constants';
import { StatusFileFormatter } from '../../git/formatters';
import { GitUri } from '../../git/gitUri';
import { GitFile } from '../../git/models';
import { GitFile } from '../../git/models/file';
import { dirname, joinPaths } from '../../system/path';
import { ViewsWithCommits } from '../viewBase';
import type { ViewsWithCommits } from '../viewBase';
import { FileNode } from './folderNode';
import { ContextValues, ViewNode } from './viewNode';

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save