[PR #617] Add single-pass blame analysis API for prefetch #612

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

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

State: closed
Merged: Yes


Summary

  • add BlameAnalysisResult with line_authors, prompt_records, and blame_hunks
  • add Repository::blame_analysis(file_path, options) to return overlay data + blame hunks from one blame pipeline
  • refactor blame internals to share request normalization and analysis pipeline between blame and blame_analysis
  • keep existing Repository::blame(...) behavior/output unchanged

Tests

  • add test_blame_analysis_matches_blame_no_output_multi_ranges
  • add test_blame_analysis_returns_requested_ranges_only
  • existing blame_flags multi-range coverage remains green

Why

This enables worker-side single-pass blame prefetch (avoiding the current double call pattern for authors + metadata hunks).

**Original Pull Request:** https://github.com/git-ai-project/git-ai/pull/617 **State:** closed **Merged:** Yes --- ## Summary - add `BlameAnalysisResult` with `line_authors`, `prompt_records`, and `blame_hunks` - add `Repository::blame_analysis(file_path, options)` to return overlay data + blame hunks from one blame pipeline - refactor blame internals to share request normalization and analysis pipeline between `blame` and `blame_analysis` - keep existing `Repository::blame(...)` behavior/output unchanged ## Tests - add `test_blame_analysis_matches_blame_no_output_multi_ranges` - add `test_blame_analysis_returns_requested_ranges_only` - existing `blame_flags` multi-range coverage remains green ## Why This enables worker-side single-pass blame prefetch (avoiding the current double call pattern for authors + metadata hunks).
kerem 2026-03-02 04:14:07 +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#612
No description provided.