Finishing an interrupted switch is refused when the checkout was killed part way #168
Labels
No labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
ethan-hann/SavePoint#168
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found in a review with the bundled git: when SavePoint is killed during a switch checkout (index still at the old snapshot, files half rewritten), the noted switch cannot be finished by Switch again: a non-forced git checkout refuses with "Your local changes would be overwritten", RunCheckoutAsync maps it through RefusalFor to DirtyWorkingTreeException and keeps the note. RequireNothingInTheWayAsync returns early for a noted switch, but git itself refuses. Discard still works, so no data is lost, but the finish-the-switch path promised by D45/D49 does not finish. Fix idea: when finishing a noted switch, force only the paths in plan.Touched (the files the interrupted switch was writing), leaving every other file under the normal refusal.
Shipped in 0.9.16 (pull request 192).