Skip to content

Commit 334931d

Browse files
committed
Removes unused branch
1 parent f221590 commit 334931d

File tree

4 files changed

+10
-13
lines changed

4 files changed

+10
-13
lines changed

src/views/commitFileNode.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { Command, TreeItem, TreeItemCollapsibleState } from 'vscode';
33
import { Commands, DiffWithPreviousCommandArgs } from '../commands';
44
import { GravatarDefault } from '../configuration';
55
import { Explorer, ExplorerNode, ResourceType } from './explorerNode';
6-
import { CommitFormatter, getGitStatusIcon, GitBranch, GitLogCommit, GitUri, ICommitFormatOptions, IGitStatusFile, IStatusFormatOptions, StatusFileFormatter } from '../gitService';
6+
import { CommitFormatter, getGitStatusIcon, GitLogCommit, GitUri, ICommitFormatOptions, IGitStatusFile, IStatusFormatOptions, StatusFileFormatter } from '../gitService';
77
import * as path from 'path';
88

99
export enum CommitFileNodeDisplayAs {
@@ -26,8 +26,7 @@ export class CommitFileNode extends ExplorerNode {
2626
public readonly status: IGitStatusFile,
2727
public commit: GitLogCommit,
2828
protected readonly explorer: Explorer,
29-
private displayAs: CommitFileNodeDisplayAs,
30-
public readonly branch?: GitBranch
29+
private displayAs: CommitFileNodeDisplayAs
3130
) {
3231
super(GitUri.fromFileStatus(status, commit.repoPath, commit.sha));
3332
this.repoPath = commit.repoPath;

src/views/commitNode.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export class CommitNode extends ExplorerRefNode {
1414
constructor(
1515
public readonly commit: GitLogCommit,
1616
private readonly explorer: Explorer,
17-
public readonly branch?: GitBranch
17+
private readonly branch?: GitBranch
1818
) {
1919
super(commit.toGitUri());
2020
}
@@ -33,7 +33,7 @@ export class CommitNode extends ExplorerRefNode {
3333
if (commit === undefined) return [];
3434

3535
let children: IFileExplorerNode[] = [
36-
...Iterables.map(commit.fileStatuses, s => new CommitFileNode(s, commit.toFileCommit(s), this.explorer, CommitFileNodeDisplayAs.File, this.branch))
36+
...Iterables.map(commit.fileStatuses, s => new CommitFileNode(s, commit.toFileCommit(s), this.explorer, CommitFileNodeDisplayAs.File))
3737
];
3838

3939
if (this.explorer.config.files.layout !== ExplorerFilesLayout.List) {

src/views/statusFileCommitsNode.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { Command, TreeItem, TreeItemCollapsibleState } from 'vscode';
33
import { Commands, DiffWithPreviousCommandArgs } from '../commands';
44
import { CommitFileNode, CommitFileNodeDisplayAs } from './commitFileNode';
55
import { Explorer, ExplorerNode, ResourceType } from './explorerNode';
6-
import { getGitStatusIcon, GitBranch, GitLogCommit, GitUri, IGitStatusFile, IGitStatusFileWithCommit, IStatusFormatOptions, StatusFileFormatter } from '../gitService';
6+
import { getGitStatusIcon, GitLogCommit, GitUri, IGitStatusFile, IGitStatusFileWithCommit, IStatusFormatOptions, StatusFileFormatter } from '../gitService';
77
import * as path from 'path';
88

99
export class StatusFileCommitsNode extends ExplorerNode {
@@ -12,14 +12,13 @@ export class StatusFileCommitsNode extends ExplorerNode {
1212
public readonly repoPath: string,
1313
public readonly status: IGitStatusFile,
1414
public readonly commits: GitLogCommit[],
15-
private readonly explorer: Explorer,
16-
public readonly branch?: GitBranch
15+
private readonly explorer: Explorer
1716
) {
1817
super(GitUri.fromFileStatus(status, repoPath, 'HEAD'));
1918
}
2019

2120
async getChildren(): Promise<ExplorerNode[]> {
22-
return this.commits.map(c => new CommitFileNode(this.status, c, this.explorer, CommitFileNodeDisplayAs.CommitLabel | (this.explorer.config.gravatars ? CommitFileNodeDisplayAs.Gravatar : CommitFileNodeDisplayAs.CommitIcon), this.branch));
21+
return this.commits.map(c => new CommitFileNode(this.status, c, this.explorer, CommitFileNodeDisplayAs.CommitLabel | (this.explorer.config.gravatars ? CommitFileNodeDisplayAs.Gravatar : CommitFileNodeDisplayAs.CommitIcon)));
2322
}
2423

2524
async getTreeItem(): Promise<TreeItem> {

src/views/statusFilesNode.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { ExplorerFilesLayout } from '../configuration';
55
import { ExplorerNode, ResourceType, ShowAllNode } from './explorerNode';
66
import { FolderNode, IFileExplorerNode } from './folderNode';
77
import { GitExplorer } from './gitExplorer';
8-
import { GitBranch, GitCommitType, GitLog, GitLogCommit, GitService, GitStatus, GitUri, IGitStatusFileWithCommit } from '../gitService';
8+
import { GitCommitType, GitLog, GitLogCommit, GitService, GitStatus, GitUri, IGitStatusFileWithCommit } from '../gitService';
99
import { StatusFileCommitsNode } from './statusFileCommitsNode';
1010
import * as path from 'path';
1111

@@ -17,8 +17,7 @@ export class StatusFilesNode extends ExplorerNode {
1717
constructor(
1818
public readonly status: GitStatus,
1919
public readonly range: string | undefined,
20-
private readonly explorer: GitExplorer,
21-
public readonly branch?: GitBranch
20+
private readonly explorer: GitExplorer
2221
) {
2322
super(GitUri.fromRepoPath(status.repoPath));
2423
this.repoPath = status.repoPath;
@@ -87,7 +86,7 @@ export class StatusFilesNode extends ExplorerNode {
8786
const groups = Arrays.groupBy(statuses, s => s.fileName);
8887

8988
let children: IFileExplorerNode[] = [
90-
...Iterables.map(Objects.values(groups), statuses => new StatusFileCommitsNode(repoPath, statuses[statuses.length - 1], statuses.map(s => s.commit), this.explorer, this.branch))
89+
...Iterables.map(Objects.values(groups), statuses => new StatusFileCommitsNode(repoPath, statuses[statuses.length - 1], statuses.map(s => s.commit), this.explorer))
9190
];
9291

9392
if (this.explorer.config.files.layout !== ExplorerFilesLayout.List) {

0 commit comments

Comments
 (0)