Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces a new feature to display the total number of commits in the
CommitLogView
and includes the necessary backend and UI changes to support this functionality. The changes involve adding a new model for counting commits, updating theLogStore
observable to calculate and store the count, and modifying the UI to display the count.Backend Changes:
Addition of
GitRevListCount
Command:GitRevListCount
was added to execute thegit rev-list --count
command and parse its output to retrieve the total number of commits. (GitClient/Models/Commands/GitRevListCount.swift
)GitRevListCount.swift
in the build sources. (GitClient.xcodeproj/project.pbxproj
) [1] [2] [3] [4]Enhancements to
LogStore
Observable:totalCommitsCount
property to store the count of commits. (LogStore.swift
)loadTotalCommitsCount
method to calculate the total commits count based on the current directory and search tokens. (LogStore.swift
)logs()
,update()
, andremoveAll()
to integrate the newloadTotalCommitsCount
functionality. (LogStore.swift
) [1] [2] [3] [4]UI Changes:
CommitLogView
:CommitLogView
to include a bottom inset displaying the total number of commits. This uses thetotalCommitsCount
property fromLogStore
. (CommitLogView.swift
)