浏览代码

Adds fileNames property

Changes fileName to be the first file if multiples
main
Eric Amodio 7 年前
父节点
当前提交
3435ada188
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. +4
    -0
      src/git/gitEnrichment.ts

+ 4
- 0
src/git/gitEnrichment.ts 查看文件

@ -115,6 +115,7 @@ export type GitLogType = 'file' | 'repo';
export class GitLogCommit extends GitCommit {
fileNames: string;
fileStatuses: { status: GitFileStatus, fileName: string }[];
nextSha?: string;
nextFileName?: string;
@ -138,8 +139,11 @@ export class GitLogCommit extends GitCommit {
super(repoPath, sha, fileName, author, date, message, lines, originalFileName, previousSha, previousFileName);
this.status = status;
this.fileNames = this.fileName;
if (fileStatuses) {
this.fileStatuses = fileStatuses.filter(_ => !!_.fileName);
this.fileName = this.fileStatuses[0].fileName;
}
else {
this.fileStatuses = [{ status: status, fileName: fileName }];

正在加载...
取消
保存