adds nice git interface
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user