AtlatestRepositorysigil-git
1
# sigil-git3
Git operations for [Sigil](https://codeberg.org/sigil/sigil) tools — URL4
parsing, bare-repo cloning, worktree management, and remote fetch via5
shell-out to the system `git`.7
This package was extracted from the sigil monorepo — the in-tree history8
under `packages/sigil-git/` is preserved here as `master`.10
It backs the dependency resolver in `sigil-build` (cloning + fetching11
`from-git` deps) and is also reusable as a small `git` API for any Sigil12
tool that needs to talk to a forge.14
## Usage16
```scheme17
(import (sigil git))19
;; Parse a forge-shorthand URL20
(parse-git-url "codeberg:sigil/sigil-git")21
; => alist with forge='codeberg user="sigil" repo="sigil-git"23
;; Bare-clone for the dep cache24
(git-clone-bare "codeberg:sigil/sigil-git" "/tmp/sigil-git.git")26
;; Add a detached-HEAD worktree at a specific ref27
(git-worktree-add "/tmp/sigil-git.git" "/tmp/wt" "v0.13.1")28
```30
The full export list lives at the top of `src/sigil/git.sgl`.32
## Build & test34
This is a pure-Scheme package. No native build step.36
```bash37
sigil deps install # fetch sigil-stdlib via codeberg:sigil/sigil-lang38
sigil test --report # run test/test-git.sgl39
```41
For local development against an unpublished sigil-lang, use42
`dev-redirects.sgl` (sibling checkout at `../sigil-lang/`):44
```bash45
sigil deps install --redirects ./dev-redirects.sgl46
sigil test --redirects ./dev-redirects.sgl --report47
```49
## License51
BSD-3-Clause. See the monorepo for the canonical license text.