Skip to content

feat: show total added and deleted lines in commit changes view - #2591

Open
weiningwei wants to merge 1 commit into
sourcegit-scm:developfrom
weiningwei:feature/show-total-lines
Open

feat: show total added and deleted lines in commit changes view#2591
weiningwei wants to merge 1 commit into
sourcegit-scm:developfrom
weiningwei:feature/show-total-lines

Conversation

@weiningwei

@weiningwei weiningwei commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

This PR adds a summary of total added and deleted lines in the commit detail Changes tab, shown alongside the existing file count in the bottom bar.

Changes

  • New QueryCommitStatistic command (src/Commands/QueryCommitStatistic.cs): runs git diff --shortstat to get total files changed, added lines, and deleted lines for a commit.
  • ViewModel (src/ViewModels/CommitDetail.cs): added TotalAddedLines / TotalDeletedLines properties, fetched asynchronously in Refresh() alongside the existing change list task.
  • View (src/Views/CommitChanges.axaml): extended the summary bar from a single TextBlock to a two-column Grid — file count on the left, +N added -M deleted on the right (colors match DiffView.axaml conventions).
  • Localization: added Text.CommitDetail.Changes.Added and Text.CommitDetail.Changes.Deleted keys to en_US.axaml, zh_CN.axaml, and zh_TW.axaml.

Signed-off-by: weiningwei <weiningwei09@gmail.com>
@weiningwei weiningwei changed the title test feat: show total added and deleted lines in commit changes view Jul 30, 2026
@weiningwei

Copy link
Copy Markdown
Contributor Author

This is the modified UI effect.
after

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant