An unopenable repository fails loudly — the standing row, the paused surface, the honest heal
Claude-Session: https://claude.ai/code/session_014PtZdPwqZuqEDLc6wZMtEy
This commit is contained in:
@@ -99,11 +99,21 @@ public enum GitOperationRecovery: Sendable, Equatable {
|
||||
/// The conjunction is the point: a pause **without** a stamp is somebody else's operation and the
|
||||
/// app must not touch it, and a stamp **without** a pause is the app's own finished work. Only
|
||||
/// both together are "the app's own leftovers".
|
||||
///
|
||||
/// **The unreadable repository is the one pause that decides nothing** (06 ▸ Rules, the
|
||||
/// corrupt-`.git` loud failure, ruled 2026-07-31): an abort is a *write*, and there is no
|
||||
/// repository to write to — running one could only produce a second failure row beside the
|
||||
/// standing banner that already explains the board. The stamp is deliberately kept rather than
|
||||
/// cleared, on the same reasoning that keeps it after a failed abort: it is the sole evidence the
|
||||
/// leftover is this app's, and clearing it would demote the leftover to somebody else's forever.
|
||||
/// Whenever the repository becomes readable again, the next open — or the standing pause's own
|
||||
/// re-read followed by a later open — finds the stamp and the real state, and decides properly.
|
||||
public static func decide(
|
||||
stamp: GitOperationStamp?,
|
||||
pause: GitRepositoryPause?
|
||||
) -> GitOperationRecovery {
|
||||
guard let stamp else { return .nothingToDo }
|
||||
guard pause != .unreadable else { return .nothingToDo }
|
||||
guard pause != nil else { return .clearStamp }
|
||||
return .abort(stamp)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user