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
@@ -14,19 +14,4 @@ import Testing
repo = nil
#expect(!FileManager.default.fileExists(atPath: root.path))
}
@Test func gitServiceStagesAndCommits() async throws {
let repo = try TempGitRepo()
try repo.commit(["a.txt": "one\n"])
try repo.write("a.txt", "two\n")
let service = GitService(root: repo.root)
#expect(await service.isRepository())
try await service.stage(["a.txt"])
#expect(try repo.run("status", "--porcelain") == "M a.txt\n")
try await service.unstage(["a.txt"])
#expect(try repo.run("status", "--porcelain") == " M a.txt\n")
try await service.stage(["a.txt"])
try await service.commit(message: "second")
#expect(try repo.run("log", "--format=%s") == "second\ncommit\n")
}
}