restores Helder in all its glory

This commit is contained in:
2026-09-28 11:34:49 +02:00
parent c2b38b853c
commit 1d29d0952d
280 changed files with 29205 additions and 7 deletions
@@ -0,0 +1,20 @@
import Foundation
import HelderCore
public enum GitError: Error, Equatable {
/// A git command exited non-zero; `stderr` is trimmed.
case commandFailed(arguments: [String], exitCode: Int32, stderr: String)
}
public protocol GitServicing: Sendable {
/// The working state, or nil when the project is not a git repository.
func load() async throws -> GitSnapshot?
/// Stages modifications, additions and deletions of the paths.
func stage(_ paths: [String]) async throws
func unstage(_ paths: [String]) async throws
func commit(message: String) async throws
/// Never throws: a failed push is a toast, not an error.
func push() async -> PushResult
/// Reverts each path to HEAD; a file HEAD does not have is unstaged and deleted, and a staged rename gets its source back.
func discard(_ paths: [String]) async throws
}