Skip to content
go-libfossil Artifact [5023d136fb]
Login

Artifact [5023d136fb]

Artifact 5023d136fb5f0c1fd1136ffb502e1913827661fe519e9c4386344e55c95ec8f4:


Contributing to libfossil

Thanks for your interest in libfossil, a pure-Go implementation of Fossil SCM. This document covers everything you need to get a working checkout, run the tests, and submit changes.

Development setup

Requires Go 1.26 or newer.

git clone https://github.com/danmestas/go-libfossil
cd libfossil
make setup-hooks

The repository ships with a go.work file at the root, so the main module and the submodules (db/driver/modernc, db/driver/ncruces, observer/otel) resolve each other locally without any extra configuration. make setup-hooks points core.hooksPath at .githooks/ so the pre-commit hook runs on every commit. The hook runs both SQLite drivers, go vet, the OTel submodule, and the CLI build in roughly 45 seconds; skip it with --no-verify only in emergencies.

Running tests

The main targets are:

Deterministic simulation tests live under ./dst/.... They are not excluded from the default run but are slow - roughly a minute per driver - so expect make test-drivers to take a few minutes end to end.

Code layout

Submitting changes

Keep pull requests small and focused on a single change. Before opening one:

Commit messages should explain the "why" as well as the "what". Reference issue numbers where relevant.

Reporting issues

Please open issues on GitHub. Include your Go version (go version), operating system, and minimal reproduction steps. If a specific .fossil repository triggers the bug and it is not sensitive, attach a sample - it speeds up triage considerably.