|
|
@ -7,6 +7,7 @@ import { Commands, ContextKeys } from '../../../constants'; |
|
|
|
import type { Container } from '../../../container'; |
|
|
|
import { PlusFeatures } from '../../../features'; |
|
|
|
import { GitUri } from '../../../git/gitUri'; |
|
|
|
import { getChangedFilesCount } from '../../../git/models/commit'; |
|
|
|
import type { RepositoryChangeEvent } from '../../../git/models/repository'; |
|
|
|
import { RepositoryChange, RepositoryChangeComparisonMode } from '../../../git/models/repository'; |
|
|
|
import { registerCommand } from '../../../system/command'; |
|
|
@ -234,7 +235,10 @@ export class TimelineWebview extends WebviewBase { |
|
|
|
} |
|
|
|
|
|
|
|
let queryRequiredCommits = [ |
|
|
|
...filter(log.commits.values(), c => c.file?.stats == null && c.stats?.changedFiles !== 1), |
|
|
|
...filter( |
|
|
|
log.commits.values(), |
|
|
|
c => c.file?.stats == null && getChangedFilesCount(c.stats?.changedFiles) !== 1, |
|
|
|
), |
|
|
|
]; |
|
|
|
|
|
|
|
if (queryRequiredCommits.length !== 0) { |
|
|
@ -259,7 +263,9 @@ export class TimelineWebview extends WebviewBase { |
|
|
|
|
|
|
|
const dataset: Commit[] = []; |
|
|
|
for (const commit of log.commits.values()) { |
|
|
|
const stats = commit.file?.stats ?? (commit.stats?.changedFiles === 1 ? commit.stats : undefined); |
|
|
|
const stats = |
|
|
|
commit.file?.stats ?? |
|
|
|
(getChangedFilesCount(commit.stats?.changedFiles) === 1 ? commit.stats : undefined); |
|
|
|
dataset.push({ |
|
|
|
author: commit.author.name === 'You' ? name : commit.author.name, |
|
|
|
additions: stats?.additions, |
|
|
|