adds nice git interface

This commit is contained in:
2026-10-30 13:21:45 +01:00
parent b9c03a7637
commit caec81e762
107 changed files with 6466 additions and 3992 deletions
@@ -9,10 +9,10 @@ enum TestDerivation {
guard let snapshot else { return GitWorkingState() }
let changes = snapshot.changes.map {
Change(path: $0.path, status: $0.status, added: $0.updated.isEmpty ? 0 : 1,
removed: $0.original.isEmpty ? 0 : 1, staged: $0.staged)
removed: $0.original.isEmpty ? 0 : 1, staged: $0.staged, originalPath: $0.originalPath)
}
return GitWorkingState(branch: snapshot.branch, ahead: snapshot.ahead, canPush: snapshot.canPush,
changes: changes, stagedPaths: Set(changes.filter(\.staged).map(\.path)),
behind: snapshot.behind, upstream: snapshot.upstream, changes: changes, stagedPaths: Set(changes.filter(\.staged).map(\.path)),
isRepository: true)
}
}