Skip to content

fix: diff a renamed pr file against its previous path - #55

Merged
undont merged 1 commit into
mainfrom
fix/pr-file-renames
Sep 6, 2026
Merged

undont merged 1 commit into
mainfrom
fix/pr-file-renames

Conversation

@undont

@undont undont commented Sep 6, 2026

Copy link
Copy Markdown
Owner

Summary

  • a renamed file in a PR review rendered as a whole-file add: GetFileVersions fetched one path at both refs, so the new path 404'd at the base sha and came back Missing: true, which reached the model as an empty old side; GetFileVersions now takes a base path beside the head path
  • get_file_versions gains an optional previous_path, which the sidecar has read off the REST file list into PRFile.PreviousPath all along but wasn't used
  • client.get_file_versions takes the file entry rather than a bare path, matching git.model's { path, previous_path } on the local side
  • the blob cache keys on (owner, repo, ref, path), so the two sides cache separately with no change
  • the demo fixture gains a renamed file (lua/monokai.lua -> lua/dracula.lua), the easiest way to eyeball this offline

Test plan

  • make check clean

@undont
undont merged commit 20dc7bb into main Sep 6, 2026
11 checks passed
@undont
undont deleted the fix/pr-file-renames branch September 6, 2026 21:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant