From 6ac613961b92df55757626035ceed953520eb8fb Mon Sep 17 00:00:00 2001 From: Eric Amodio Date: Tue, 4 Sep 2018 02:49:09 -0400 Subject: [PATCH] Adds the current user e-mail when uncommitted --- src/git/parsers/blameParser.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/git/parsers/blameParser.ts b/src/git/parsers/blameParser.ts index 82f9f27..30822c9 100644 --- a/src/git/parsers/blameParser.ts +++ b/src/git/parsers/blameParser.ts @@ -73,6 +73,11 @@ export class GitBlameParser { break; case 'author-mail': + if (Git.isUncommitted(entry.sha)) { + entry.authorEmail = currentUser !== undefined ? currentUser.email : undefined; + continue; + } + entry.authorEmail = lineParts .slice(1) .join(' ')