From d6984dd19eb27c515c1a5c562a7eaa66a7944127 Mon Sep 17 00:00:00 2001 From: Eric Amodio Date: Thu, 15 Jun 2023 12:40:27 -0400 Subject: [PATCH] Fixes dupes when searching for commits & stashes --- CHANGELOG.md | 1 + src/git/parsers/logParser.ts | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 709714e..4a70cc0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p ### Fixed - Fixes an issue where the links in the _Search & Compare_ view failed to open the specific search type +- Fixes an issue when searching for commits and the results contain stashes ## [14.0.0] - 2023-06-14 diff --git a/src/git/parsers/logParser.ts b/src/git/parsers/logParser.ts index 7bba207..8deaca6 100644 --- a/src/git/parsers/logParser.ts +++ b/src/git/parsers/logParser.ts @@ -809,6 +809,7 @@ export class GitLogParser { stash.stashName, stash.stashOnRef, ); + commits.set(stash.sha, commit); } else { commit = new GitCommit( container, @@ -834,9 +835,8 @@ export class GitLogParser { entry.line != null ? [entry.line] : [], entry.tips, ); + commits.set(entry.sha!, commit); } - - commits.set(entry.sha!, commit); } }