Skip to content

fix: open deleted commit files in external editor#2934

Open
leno23 wants to merge 1 commit into
gitui-org:masterfrom
leno23:fix/edit-deleted-commit-file-2877
Open

fix: open deleted commit files in external editor#2934
leno23 wants to merge 1 commit into
gitui-org:masterfrom
leno23:fix/edit-deleted-commit-file-2877

Conversation

@leno23
Copy link
Copy Markdown

@leno23 leno23 commented May 17, 2026

Summary

  • When editing from the log commit file list, load file content from Git if the worktree path is missing or the entry is marked deleted.
  • Deleted paths in get_commit_files now use the old side of the diff so the correct filename is shown.
  • Writes a temporary file under .git/ for the external editor session.

Fixes #2877

Test plan

  • cargo check
  • cargo test -p asyncgit commit_files
  • Log view → commit with deleted file → Edit opens editor with historical content

Made with Cursor

Load blob content from the commit (or its parent for deletions) when
the worktree file is missing, and fix deleted-file paths in commit
file lists.

Co-authored-by: Cursor <cursoragent@cursor.com>
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.

Edit action should while checking previous commit hashes with deleted files

1 participant