From 1b21893d72a7ca1e290e6a9adf2e3646536ab56f Mon Sep 17 00:00:00 2001 From: Eric Amodio Date: Sat, 11 Mar 2017 00:41:36 -0500 Subject: [PATCH] Deals with merge commits in next sha tracking --- src/git/enrichers/logParserEnricher.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/git/enrichers/logParserEnricher.ts b/src/git/enrichers/logParserEnricher.ts index 15021b4..3556334 100644 --- a/src/git/enrichers/logParserEnricher.ts +++ b/src/git/enrichers/logParserEnricher.ts @@ -202,7 +202,8 @@ export class GitLogParserEnricher implements IGitEnricher { if (recentCommit) { recentCommit.previousSha = commit.sha; - commit.nextSha = recentCommit.sha; + // If the commit sha's match (merge commit), just forward it along + commit.nextSha = commit.sha !== recentCommit.sha ? recentCommit.sha : recentCommit.nextSha; // Only add a filename if this is a file log if (type === 'file') { recentCommit.previousFileName = commit.originalFileName || commit.fileName;