Repository navigation
fix(mobile): fully unstage renamed files - #34955
Conversation
Unstaging a staged rename from the Source Control row or diff review reset only the new path, leaving the old path staged as a deletion. Send both paths through git.bulkUnstage, matching desktop.
9bba3fd to
020f5c2
Compare
|
No actionable comments were generated in the recent review.
|
Unstaging a staged rename on mobile (e.g. after
git mv before.txt after.txt), from either the Source Control row or the diff-review Unstage button, rangit reset -- after.txtonly.before.txtstayed staged as a deletion andafter.txtbecame untracked, leaving the rename half-unstaged.Both surfaces now compute paths with the existing
getUnstageablePaths(shared with desktop and mobile Unstage All) and send[path, oldPath]throughgit.bulkUnstage, matching desktop'suse-entry-mutations. Non-rename rows keep the singlegit.unstagerequest.git.bulkUnstagepredates mobile source control, so no legacy-host fallback is needed.Validation:
use-mobile-diff-review-git-actions.test.tsasserts a staged rename sends onegit.bulkUnstagewith both paths; it fails on main.tsconfig.jsonandtsconfig.test.jsontypecheck clean.pnpm check:changed --maxWorkers=2: 15/15 pass.