Skip to content

Show a renamed file as one rename in Review, so its history follows it - #93

Merged
baol merged 3 commits into
mainfrom
repo-and-branch-ux
Nov 8, 2026
Merged

baol merged 3 commits into
mainfrom
repo-and-branch-ux

Conversation

@baol

@baol baol commented Nov 8, 2026

Copy link
Copy Markdown
Owner

Reported on baol/recipes: after renaming docs/Pane e pizza/Focaccia.md, Review of the rename commit listed − Focaccia.md and + Focaccia genovese.md with all 42 lines added. The file's history looked cut off at the rename, because Review (M1) had no rename detection.

Change

  • Rename detection in Review. Renames are paired the way git diff -M does it: exact moves and moves with edits, at 50 % similarity, no copies.
    • Detection runs in process with gix's tree diff and rewrite tracking.
    • It only runs when a comparison adds or deletes a file.
    • It starts no Git command. A first version used git diff-tree -M, but the RULE-16 parity test caught it adding a command beside a cherry-pick.
  • One renamed entry. Each rename is one renamed change at the new path. It carries the old side and old_path / old_path_bytes, and the deleted source is not listed.
  • File list. A rename shows as R, with the tooltip R Renamed from <old path>. Pressing H on it opens File history, which continues past the rename to the commit that added the file.
  • CLI. show lists kind: "renamed" with old_path, and --file accepts either path.
  • Fallback. If the pairing can't be read (for example, a blob missing from a partial clone), the files list as added and deleted, as before.

Tests

  • renames_are_one_change_with_the_old_path_as_git_pairs_them (crates/git): an exact move and a move with an edit; an unrelated delete and add stay separate.
  • a_renamed_file_reviews_as_one_rename_and_its_history_crosses_it (app): reviews a rename in a folder with spaces, finds FILES 1 and R, then presses H and finds FILE HISTORY 3 with ← Pane e pizza/Focaccia.md.
  • REV-12 and REV-58 in docs/acceptance.md are updated. REV-58's GUI path is now automated.

On the recipes clone, git good --cli show HEAD now lists one renamed entry.

Checks

fmt, clippy -D warnings and the full workspace tests (including the RULE-16 parity tests) pass, and the README screenshot --check passes.


Generated by Claude Code

FRM-05 is now a GWT acceptance scenario: given Git Good was just
opened, when the folder is not a Git repository and not inside one,
then it opens on the welcome view. The Reopen the last repository
preference, which opened the most recent repository instead and was on
by default, is removed with its launch fallback; an old "reopen_last"
key in settings.json is ignored. FRM-06 covers a launch in a
repository's subfolder, which opens that repository.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WX3sFiNbkTC6gZUVCPGT3o
Reported on baol/recipes: after renaming Focaccia.md, Review of the
rename commit listed the old path as deleted and the new one as added
with every line new, so the file's history looked cut at the rename.

Review now pairs renames as git diff -M does (exact moves and moves
with edits, 50 % similarity), with gix's tree diff in process, read only
when a comparison adds or deletes a file. A rename is one change at the
new path with the old side and old_path/old_path_bytes, marked R in the
file list; File history on it crosses the rename. The CLI's show lists
kind "renamed" with old_path, and --file accepts either path.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WX3sFiNbkTC6gZUVCPGT3o
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WX3sFiNbkTC6gZUVCPGT3o
@baol
baol merged commit ce6d214 into main Nov 8, 2026
10 checks passed
baol pushed a commit that referenced this pull request Nov 8, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WX3sFiNbkTC6gZUVCPGT3o
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.

2 participants