AtlatestRepositorysigil-git
1# sigil-git
2
3Git operations for [Sigil](https://codeberg.org/sigil/sigil) tools — URL
4parsing, bare-repo cloning, worktree management, and remote fetch via
5shell-out to the system `git`.
6
7This package was extracted from the sigil monorepo — the in-tree history
8under `packages/sigil-git/` is preserved here as `master`.
9
10It backs the dependency resolver in `sigil-build` (cloning + fetching
11`from-git` deps) and is also reusable as a small `git` API for any Sigil
12tool that needs to talk to a forge.
14## Usage
16```scheme
17(import (sigil git))
19;; Parse a forge-shorthand URL
20(parse-git-url "codeberg:sigil/sigil-git")
21; => alist with forge='codeberg user="sigil" repo="sigil-git"
23;; Bare-clone for the dep cache
24(git-clone-bare "codeberg:sigil/sigil-git" "/tmp/sigil-git.git")
26;; Add a detached-HEAD worktree at a specific ref
27(git-worktree-add "/tmp/sigil-git.git" "/tmp/wt" "v0.13.1")
28```
30The full export list lives at the top of `src/sigil/git.sgl`.
32## Build & test
34This is a pure-Scheme package. No native build step.
36```bash
37sigil deps install # fetch sigil-stdlib via codeberg:sigil/sigil-lang
38sigil test --report # run test/test-git.sgl
39```
41For local development against an unpublished sigil-lang, use
42`dev-redirects.sgl` (sibling checkout at `../sigil-lang/`):
44```bash
45sigil deps install --redirects ./dev-redirects.sgl
46sigil test --redirects ./dev-redirects.sgl --report
47```
49## License
51BSD-3-Clause. See the monorepo for the canonical license text.