Fixes issues with next commit navigation (renames)

Adds sha to log model to know if it is a full log or not
This commit is contained in:
Eric Amodio
2017-03-25 00:44:10 -04:00
parent c10a79a7ee
commit 8b5eed4714
10 changed files with 92 additions and 60 deletions

View File

@@ -8,6 +8,7 @@ export interface IGitLog {
authors: Map<string, IGitAuthor>;
commits: Map<string, GitLogCommit>;
sha: string | undefined;
maxCount: number | undefined;
range: Range;
truncated: boolean;

View File

@@ -183,7 +183,7 @@ export class GitLogParser {
return entries;
}
static parse(data: string, type: GitLogType, fileNameOrRepoPath: string, maxCount: number | undefined, isRepoPath: boolean, reverse: boolean, range: Range): IGitLog {
static parse(data: string, type: GitLogType, fileNameOrRepoPath: string, sha: string | undefined, maxCount: number | undefined, isRepoPath: boolean, reverse: boolean, range: Range): IGitLog {
const entries = this._parseEntries(data, isRepoPath, maxCount, reverse);
if (!entries) return undefined;
@@ -271,6 +271,7 @@ export class GitLogParser {
authors: sortedAuthors,
// commits: sortedCommits,
commits: commits,
sha: sha,
maxCount: maxCount,
range: range,
truncated: !!(maxCount && entries.length >= maxCount)