ソースを参照

Adds message when branch has no commits

main
Eric Amodio 7年前
コミット
58b95a9e89
1個のファイルの変更2行の追加2行の削除
  1. +2
    -2
      src/views/branchHistoryNode.ts

+ 2
- 2
src/views/branchHistoryNode.ts ファイルの表示

@ -3,7 +3,7 @@ import { Iterables } from '../system';
import { TreeItem, TreeItemCollapsibleState } from 'vscode';
import { CommitNode } from './commitNode';
import { GlyphChars } from '../constants';
import { ExplorerNode, ResourceType, ShowAllNode } from './explorerNode';
import { ExplorerNode, MessageNode, ResourceType, ShowAllNode } from './explorerNode';
import { GitExplorer } from './gitExplorer';
import { GitBranch, GitUri } from '../gitService';
@ -21,7 +21,7 @@ export class BranchHistoryNode extends ExplorerNode {
async getChildren(): Promise<ExplorerNode[]> {
const log = await this.explorer.git.getLogForRepo(this.uri.repoPath!, this.branch.name, this.maxCount);
if (log === undefined) return [];
if (log === undefined) return [new MessageNode('No commits yet')];
const children: (CommitNode | ShowAllNode)[] = [...Iterables.map(log.commits.values(), c => new CommitNode(c, this.explorer, this.branch))];
if (log.truncated) {

読み込み中…
キャンセル
保存