feat!: start blame from Start instead of ObjectId#2719
feat!: start blame from Start instead of ObjectId#2719Christoph Rüßler (cruessler) wants to merge 11 commits into
Start instead of ObjectId#2719Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9127f126d7
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "Codex (@codex) review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "Codex (@codex) address that feedback".
|
Would it make sense to add a test for high-level |
Yes, that's correct. If there should be tests, they have to be in plumbing or |
This PR changes
gix_blame::file()’s API to useStartas the starting point instead of a simpleObjectId.Startcan be either aCommitorContents { first_suspect: ObjectId, contents: Cow<'_, u8> }. This is useful when callers have a version of the file that is not committed yet.This PR potentially addresses #2666 if changes to
gix_blame::file()are sufficient. This PR neither changesRepository::blame_filenorgix blame …; both useStart::Committo keep their existing behaviour. I plan on adding support forStart::Contentsto both in follow-up PRs. Do you potentially have any suggestions on how to get the worktree version of a file as idiomatically as possible? Is this somethingPlatform::set_resourceshould be used for?Update 2026-07-19: I’ve adapted
gix blame …, in order to provide an example for how to load a file from the worktree and convert it to a diffableVec<u8>.This PR also affects #2457 as it changes some of the same locations, but I think the resulting conflicts should be manageable.
This PR was made with the help of an LLM, mostly for inspiration and getting an overview of the problem space, but also for some initial blocks of code (that I then reworked).