[PR #609] Optimize multi-range blame calls and strengthen parity tests #604

Closed
opened 2026-03-02 04:14:05 +03:00 by kerem · 0 comments
Owner

Original Pull Request: https://github.com/git-ai-project/git-ai/pull/609

State: closed
Merged: Yes


Summary

  • batch multi-range blame requests into a single git blame invocation via repeated -L flags
  • remove repeated per-range blame subprocess calls in blame output formatters
  • fix porcelain/incremental metadata emission to match git behavior across multiple hunks for the same commit
  • fix overlapping range output duplication by iterating deduped, parsed blame line sets
  • fix a deny-level clippy issue in tests/git_repository_comprehensive.rs (tautological boolean assert)

Tests

  • cargo fmt -- --check
  • cargo clippy --all-targets --all-features
  • cargo test --test blame_flags test_blame_multiple_line_ranges_
  • cargo test --test blame_flags test_blame_multiple_line_ranges_default_reversed_order -- --exact
  • cargo test --test blame_flags test_blame_line_range -- --exact
  • cargo test --test blame_flags test_blame_porcelain_format -- --exact
  • cargo test --test blame_flags test_blame_incremental_format -- --exact
  • cargo test --test blame_flags test_blame_line_porcelain -- --exact
  • cargo test --test blame_comprehensive test_blame_format_
  • cargo test --test blame_comprehensive test_blame_multiple_line_ranges -- --exact
**Original Pull Request:** https://github.com/git-ai-project/git-ai/pull/609 **State:** closed **Merged:** Yes --- ## Summary - batch multi-range blame requests into a single git blame invocation via repeated `-L` flags - remove repeated per-range blame subprocess calls in blame output formatters - fix porcelain/incremental metadata emission to match git behavior across multiple hunks for the same commit - fix overlapping range output duplication by iterating deduped, parsed blame line sets - fix a deny-level clippy issue in `tests/git_repository_comprehensive.rs` (tautological boolean assert) ## Tests - `cargo fmt -- --check` - `cargo clippy --all-targets --all-features` - `cargo test --test blame_flags test_blame_multiple_line_ranges_` - `cargo test --test blame_flags test_blame_multiple_line_ranges_default_reversed_order -- --exact` - `cargo test --test blame_flags test_blame_line_range -- --exact` - `cargo test --test blame_flags test_blame_porcelain_format -- --exact` - `cargo test --test blame_flags test_blame_incremental_format -- --exact` - `cargo test --test blame_flags test_blame_line_porcelain -- --exact` - `cargo test --test blame_comprehensive test_blame_format_` - `cargo test --test blame_comprehensive test_blame_multiple_line_ranges -- --exact`
kerem 2026-03-02 04:14:05 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/git-ai#604
No description provided.