From 2f0a25720ae27e1a9993cdf11b544c61bd72cc33 Mon Sep 17 00:00:00 2001 From: Eric Amodio Date: Wed, 22 Mar 2017 00:51:29 -0400 Subject: [PATCH] Removes unused data from git log --- src/git/git.ts | 3 ++- src/git/parsers/logParser.ts | 12 ++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/git/git.ts b/src/git/git.ts index ae5a325..acc41b8 100644 --- a/src/git/git.ts +++ b/src/git/git.ts @@ -13,7 +13,8 @@ export * from './parsers/statusParser'; let git: IGit; -const defaultLogParams = [`log`, `--name-status`, `--full-history`, `-M`, `--date=iso8601-strict`, `--format=%H -%nauthor %an%nauthor-date %ai%ncommitter %cn%ncommitter-date %ci%nparent %P%nsummary %B%nfilename ?`]; +//`--format=%H -%nauthor %an%nauthor-date %ai%ncommitter %cn%ncommitter-date %ci%nparent %P%nsummary %B%nfilename ?` +const defaultLogParams = [`log`, `--name-status`, `--full-history`, `-M`, `--date=iso8601-strict`, `--format=%H -%nauthor %an%nauthor-date %ai%nsummary %B%nfilename ?`]; async function gitCommand(cwd: string, ...args: any[]) { try { diff --git a/src/git/parsers/logParser.ts b/src/git/parsers/logParser.ts index b994be9..567c246 100644 --- a/src/git/parsers/logParser.ts +++ b/src/git/parsers/logParser.ts @@ -11,10 +11,10 @@ interface ILogEntry { author?: string; authorDate?: string; - committer?: string; - committerDate?: string; + // committer?: string; + // committerDate?: string; - parentSha?: string; + // parentSha?: string; fileName?: string; originalFileName?: string; @@ -72,9 +72,9 @@ export class GitLogParser { // entry.committerDate = lineParts.slice(1).join(' ').trim(); // break; - case 'parent': - entry.parentSha = lineParts.slice(1).join(' ').trim(); - break; + // case 'parent': + // entry.parentSha = lineParts.slice(1).join(' ').trim(); + // break; case 'summary': entry.summary = lineParts.slice(1).join(' ').trim();