Skip to content

Commit 8620e6f

Browse files
authored
Avoid reprocessing duplicate git log commits (#4356)
1 parent a1f65ac commit 8620e6f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

extension/src/experiments/model/collect.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,13 +108,18 @@ const transformExpState = (
108108
return experiment
109109
}
110110

111+
const skipCommit = (
112+
acc: { [sha: string]: CommitData },
113+
sha: string | undefined
114+
): boolean => !sha || !!acc[sha]
115+
111116
const collectCommitData = (
112117
acc: { [sha: string]: CommitData },
113118
commit: string
114119
) => {
115120
const [sha, author, date, refNamesWithKey] = trimAndSplit(commit)
116121

117-
if (!sha) {
122+
if (skipCommit(acc, sha)) {
118123
return
119124
}
120125

0 commit comments

Comments
 (0)