From 640a11b3cb14cbd505f3aa2c844a13a391c159be Mon Sep 17 00:00:00 2001 From: Eric Amodio Date: Wed, 29 Mar 2017 00:43:22 -0400 Subject: [PATCH] Changes commit type repo to branch --- src/commands/showQuickCommitDetails.ts | 2 +- src/git/models/commit.ts | 2 +- src/git/parsers/logParser.ts | 2 +- src/gitService.ts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/commands/showQuickCommitDetails.ts b/src/commands/showQuickCommitDetails.ts index 9697d3d..cdad190 100644 --- a/src/commands/showQuickCommitDetails.ts +++ b/src/commands/showQuickCommitDetails.ts @@ -46,7 +46,7 @@ export class ShowQuickCommitDetailsCommand extends ActiveEditorCachedCommand { } try { - if (!commit || (commit.type !== 'repo' && commit.type !== 'stash')) { + if (!commit || (commit.type !== 'branch' && commit.type !== 'stash')) { if (repoLog) { commit = repoLog.commits.get(sha); // If we can't find the commit, kill the repoLog diff --git a/src/git/models/commit.ts b/src/git/models/commit.ts index 8cf9562..8af3f29 100644 --- a/src/git/models/commit.ts +++ b/src/git/models/commit.ts @@ -34,7 +34,7 @@ export interface IGitCommitLine { code?: string; } -export type GitCommitType = 'blame' | 'file' | 'repo' | 'stash'; +export type GitCommitType = 'blame' | 'branch' | 'file' | 'stash'; export class GitCommit implements IGitCommit { diff --git a/src/git/parsers/logParser.ts b/src/git/parsers/logParser.ts index c2bacb9..3a830f8 100644 --- a/src/git/parsers/logParser.ts +++ b/src/git/parsers/logParser.ts @@ -96,7 +96,7 @@ export class GitLogParser { break; case 'filename': - if (type === 'repo') { + if (type === 'branch') { const nextLine = lines[position + 1]; // If the next line isn't blank, make sure it isn't starting a new commit if (nextLine && Git.shaRegex.test(nextLine)) continue; diff --git a/src/gitService.ts b/src/gitService.ts index 25b1836..cb71fd9 100644 --- a/src/gitService.ts +++ b/src/gitService.ts @@ -541,7 +541,7 @@ export class GitService extends Disposable { try { const data = await Git.log(repoPath, sha, maxCount, reverse); - return GitLogParser.parse(data, 'repo', repoPath, undefined, sha, maxCount, reverse, undefined); + return GitLogParser.parse(data, 'branch', repoPath, undefined, sha, maxCount, reverse, undefined); } catch (ex) { return undefined;