You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .skills/swift-git/SKILL.md
+11Lines changed: 11 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -69,6 +69,17 @@ Examples (do not auto-run)
69
69
- "Run a single test": use `swift test --filter <TestName>` as shown above.
70
70
- "Check package manifest": open Package.swift at repository root.
71
71
72
+
Installation (SwiftPM)
73
+
- Base library:
74
+
- Product: `SwiftGit`
75
+
- Optional embedded git bundles (manual opt-in):
76
+
- Arm64 bundle product: `SwiftGitArm64`
77
+
- X86_64 bundle product: `SwiftGitX86_64`
78
+
- Universal bundle product: `SwiftGitUniversal`
79
+
- Usage pattern (prefer embedded, fallback to system):
80
+
-`Git(environments: [.embed(.arm64), .system])`
81
+
- Replace `.arm64` with `.x86_64` or `.universal` when using the corresponding product.
82
+
72
83
Packaging the skill
73
84
- To package this skill (manual step), follow your environment's packaging script. Example: `scripts/package_skill.py swift-git.skill` (if package exists in your environment).
Copy file name to clipboardExpand all lines: README.md
+3-4Lines changed: 3 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -100,14 +100,13 @@ Embedded git bundle
100
100
-`SwiftGit` (base product) no longer embeds a bundle; `.embed(.arm64/.x86_64/.universal)` works only when the corresponding resource product is linked.
101
101
-`GitEnvironment.Style.auto` now maps to system git only; use `.embed(...)` explicitly when you add a resource product.
102
102
103
-
Example usage (arm64):
103
+
Example usage (arm64, prefer embedded then system fallback):
104
104
105
105
```swift
106
106
importSwiftGit
107
-
importSwiftGitResourcesArm64
107
+
importSwiftGitArm64
108
108
109
-
let env =tryGitEnvironment(type: .embed(.arm64))
110
-
let git =Git(environment: env)
109
+
let git =Git(environments: [.embed(.arm64), .system])
111
110
```
112
111
- Agents and tests should not modify files under the bundles. Use `GitEnvironment.Style.custom(URL)` to point to an alternate git distribution.
113
112
- To generate updated bundles, run `tools/update-git-bundle.sh` with the desired `--archs` and copy the result into the corresponding `Sources/SwiftGitResources*/Resource/` directory.
0 commit comments