Release v0.13.8
Contribution Statistics - Per-author line-level code contribution analysis
Adds a new --contrib flag to the stats command for line-level contribution statistics, extends GitOperations with get_workdir() and get_commit_line_stats(), and updates documentation to clarify endpoint semantics and model compatibility.
Added
gcop-rs stats --contrib
- New
--contribflag computes per-author line-level contribution statistics (insertions, deletions, total, percentage) - Uses
git log --numstatfor fast batch processing instead of querying each commit individually via git2 - Merge commits are automatically excluded (
--no-merges) - Supports author filtering (
--author) - Output available in all formats: text (with colored bar chart), JSON, and Markdown
GitOperations Trait Extensions
get_workdir(): returns the repository working directory path; replaces ad-hocrepo.workdir()calls inunstage_all(),stage_files(), andcompute_contrib_stats()get_commit_line_stats(hash): returns per-commit insertion/deletion counts via git2's nativeDiff::stats()CommitInfoextended withhashandparent_countfields for merge commit identification
Changed
Documentation - Endpoint Semantics
- Clarified that
endpointsupports both base URLs (https://api.anthropic.com) and full paths (https://api.anthropic.com/v1/messages) - Removed hardcoded model whitelists from all providers; added "Model Compatibility" sections explaining that any API-compatible model works
- Updated example configurations to use base URLs
Dependencies
- Lowered MSRV from 1.93.0 to 1.88.0
- Updated
tokio1.49 → 1.50,which8.0.0 → 8.0.2 and other dependencies
Tests
tests/stats_contrib_test.rs: 6 tests coveringcompute_contrib_stats()(basic stats, multi-commit, author filter, merge skip, percentages, empty repo)tests/stats_test.rs: 6 tests coveringRepoStats::from_commits()(basic stats, time span, author sort, weekly stats, author filter, edge cases)tests/git_repository_test.rs: 3 tests forget_commit_line_stats()(initial commit, normal commit, invalid hash)
Upgrade
bash
# Homebrew
brew upgrade gcop-rs
# Cargo
cargo install gcop-rs
# pip
pip install --upgrade gcop-rs