Parcourir la source

Removes unused data from git log

main
Eric Amodio il y a 7 ans
Parent
révision
2f0a25720a
2 fichiers modifiés avec 8 ajouts et 7 suppressions
  1. +2
    -1
      src/git/git.ts
  2. +6
    -6
      src/git/parsers/logParser.ts

+ 2
- 1
src/git/git.ts Voir le fichier

@ -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 {

+ 6
- 6
src/git/parsers/logParser.ts Voir le fichier

@ -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();

Chargement…
Annuler
Enregistrer