diff --git a/src/views/commitFileNode.ts b/src/views/commitFileNode.ts index c7dfdd6..550c650 100644 --- a/src/views/commitFileNode.ts +++ b/src/views/commitFileNode.ts @@ -3,7 +3,7 @@ import { Command, TreeItem, TreeItemCollapsibleState } from 'vscode'; import { Commands, DiffWithPreviousCommandArgs } from '../commands'; import { GravatarDefault } from '../configuration'; import { Explorer, ExplorerNode, ResourceType } from './explorerNode'; -import { CommitFormatter, getGitStatusIcon, GitBranch, GitLogCommit, GitUri, ICommitFormatOptions, IGitStatusFile, IStatusFormatOptions, StatusFileFormatter } from '../gitService'; +import { CommitFormatter, getGitStatusIcon, GitLogCommit, GitUri, ICommitFormatOptions, IGitStatusFile, IStatusFormatOptions, StatusFileFormatter } from '../gitService'; import * as path from 'path'; export enum CommitFileNodeDisplayAs { @@ -26,8 +26,7 @@ export class CommitFileNode extends ExplorerNode { public readonly status: IGitStatusFile, public commit: GitLogCommit, protected readonly explorer: Explorer, - private displayAs: CommitFileNodeDisplayAs, - public readonly branch?: GitBranch + private displayAs: CommitFileNodeDisplayAs ) { super(GitUri.fromFileStatus(status, commit.repoPath, commit.sha)); this.repoPath = commit.repoPath; diff --git a/src/views/commitNode.ts b/src/views/commitNode.ts index 103e402..9af6054 100644 --- a/src/views/commitNode.ts +++ b/src/views/commitNode.ts @@ -14,7 +14,7 @@ export class CommitNode extends ExplorerRefNode { constructor( public readonly commit: GitLogCommit, private readonly explorer: Explorer, - public readonly branch?: GitBranch + private readonly branch?: GitBranch ) { super(commit.toGitUri()); } @@ -33,7 +33,7 @@ export class CommitNode extends ExplorerRefNode { if (commit === undefined) return []; let children: IFileExplorerNode[] = [ - ...Iterables.map(commit.fileStatuses, s => new CommitFileNode(s, commit.toFileCommit(s), this.explorer, CommitFileNodeDisplayAs.File, this.branch)) + ...Iterables.map(commit.fileStatuses, s => new CommitFileNode(s, commit.toFileCommit(s), this.explorer, CommitFileNodeDisplayAs.File)) ]; if (this.explorer.config.files.layout !== ExplorerFilesLayout.List) { diff --git a/src/views/statusFileCommitsNode.ts b/src/views/statusFileCommitsNode.ts index 4742ffc..a9cd59a 100644 --- a/src/views/statusFileCommitsNode.ts +++ b/src/views/statusFileCommitsNode.ts @@ -3,7 +3,7 @@ import { Command, TreeItem, TreeItemCollapsibleState } from 'vscode'; import { Commands, DiffWithPreviousCommandArgs } from '../commands'; import { CommitFileNode, CommitFileNodeDisplayAs } from './commitFileNode'; import { Explorer, ExplorerNode, ResourceType } from './explorerNode'; -import { getGitStatusIcon, GitBranch, GitLogCommit, GitUri, IGitStatusFile, IGitStatusFileWithCommit, IStatusFormatOptions, StatusFileFormatter } from '../gitService'; +import { getGitStatusIcon, GitLogCommit, GitUri, IGitStatusFile, IGitStatusFileWithCommit, IStatusFormatOptions, StatusFileFormatter } from '../gitService'; import * as path from 'path'; export class StatusFileCommitsNode extends ExplorerNode { @@ -12,14 +12,13 @@ export class StatusFileCommitsNode extends ExplorerNode { public readonly repoPath: string, public readonly status: IGitStatusFile, public readonly commits: GitLogCommit[], - private readonly explorer: Explorer, - public readonly branch?: GitBranch + private readonly explorer: Explorer ) { super(GitUri.fromFileStatus(status, repoPath, 'HEAD')); } async getChildren(): Promise { - return this.commits.map(c => new CommitFileNode(this.status, c, this.explorer, CommitFileNodeDisplayAs.CommitLabel | (this.explorer.config.gravatars ? CommitFileNodeDisplayAs.Gravatar : CommitFileNodeDisplayAs.CommitIcon), this.branch)); + return this.commits.map(c => new CommitFileNode(this.status, c, this.explorer, CommitFileNodeDisplayAs.CommitLabel | (this.explorer.config.gravatars ? CommitFileNodeDisplayAs.Gravatar : CommitFileNodeDisplayAs.CommitIcon))); } async getTreeItem(): Promise { diff --git a/src/views/statusFilesNode.ts b/src/views/statusFilesNode.ts index 488026d..1c661b2 100644 --- a/src/views/statusFilesNode.ts +++ b/src/views/statusFilesNode.ts @@ -5,7 +5,7 @@ import { ExplorerFilesLayout } from '../configuration'; import { ExplorerNode, ResourceType, ShowAllNode } from './explorerNode'; import { FolderNode, IFileExplorerNode } from './folderNode'; import { GitExplorer } from './gitExplorer'; -import { GitBranch, GitCommitType, GitLog, GitLogCommit, GitService, GitStatus, GitUri, IGitStatusFileWithCommit } from '../gitService'; +import { GitCommitType, GitLog, GitLogCommit, GitService, GitStatus, GitUri, IGitStatusFileWithCommit } from '../gitService'; import { StatusFileCommitsNode } from './statusFileCommitsNode'; import * as path from 'path'; @@ -17,8 +17,7 @@ export class StatusFilesNode extends ExplorerNode { constructor( public readonly status: GitStatus, public readonly range: string | undefined, - private readonly explorer: GitExplorer, - public readonly branch?: GitBranch + private readonly explorer: GitExplorer ) { super(GitUri.fromRepoPath(status.repoPath)); this.repoPath = status.repoPath; @@ -87,7 +86,7 @@ export class StatusFilesNode extends ExplorerNode { const groups = Arrays.groupBy(statuses, s => s.fileName); let children: IFileExplorerNode[] = [ - ...Iterables.map(Objects.values(groups), statuses => new StatusFileCommitsNode(repoPath, statuses[statuses.length - 1], statuses.map(s => s.commit), this.explorer, this.branch)) + ...Iterables.map(Objects.values(groups), statuses => new StatusFileCommitsNode(repoPath, statuses[statuses.length - 1], statuses.map(s => s.commit), this.explorer)) ]; if (this.explorer.config.files.layout !== ExplorerFilesLayout.List) {