Skip to content
go-libfossil Tags and Properties
Login

Tags and Properties

Tags and Properties for Check-in 764a82ecdb

Context
2026-05-04
19:03 • Edit [764a82ecdb]: Add tag "v0.5.0" with note "- **`Repo.UUIDFromRID(rid int64) (string, error)`** — public lookup that returns the UUID for a given RID, replacing the consumer pattern of reaching into `r.DB()` to run `SELECT uuid FROM blob WHERE rid = ?`. Returns `ErrArtifactNotFound` (matchable via `errors.Is`) when the RID does not exist. (#23, #25) - **`Repo.Diff` accepts `filePath == ""` for whole-checkin diffs.** When called with an empty `filePath`, `Diff` now returns one `DiffEntry` per file changed between `ridA` and `ridB`, deterministically ordered by name. The single-file form (non-empty `filePath`) is unchanged. (#24, #26)

None. Both changes are purely additive at the public API surface. Calls to `Repo.Diff` with a non-empty `filePath` behave exactly as before.

- Consumers (bones, EdgeSync) can drop their hand-rolled `ridToUUID` helpers in favor of `Repo.UUIDFromRID`. The `errors.Is(err, libfossil.ErrArtifactNotFound)` check replaces ad-hoc `sql.ErrNoRows` matching. - Consumers building whole-checkin diffs (e.g. EdgeSync's `Agent.Diff`) can replace the manual `ListFiles` + per-file `Diff` enumeration with a single `repo.Diff(ridA, ridB, "")` call. - **Known limitation in whole-checkin Diff:** rename detection and permission-only changes are not yet reflected — pure renames currently surface as add+delete pairs. The underlying `mlink` walk needed to fix this is tracked separately and will land in a follow-up release. The single-file `Diff` codepath has the same limitation today, so behavior is consistent across both forms.". artifact: 1ac821e30c user: [email protected]

18:59
feat: support whole-checkin diff via empty filePath (#26)

Repo.Diff has a multi-file return shape ([]DiffEntry) but previously rejected filePath == "" with "filePath is required". Consumers that wanted a whole- checkin diff (the equivalent of `git diff revA..revB` or `fossil diff --from revA --to revB`) had to enumerate changed files themselves and call Diff per file; EdgeSync's Agent.Diff is the in-tree example of that workaround.

This relaxes the guard: when filePath == "", Diff now returns one DiffEntry per file that changed between ridA and ridB, sorted by Name for deterministic ordering. The non-empty filePath path is unchanged. Identical checkins return ([]DiffEntry{}, nil).

Whole-checkin enumeration is name-keyed (union of files across both manifests where the content UUID differs or the file exists on only one side). Proper rename detection via mlink (so a pure rename produces a single entry rather than an add+delete pair) and permission-only change reporting are deferred to a follow-up; the limitation is documented on Diff's godoc and called out in the PR description. The single-file path is unaffected.

The previous TestDiff_EmptyFilePath (which asserted the rejection error) is replaced with positive coverage for identical checkins, single-file change, multi-file change, addition-only, and deletion-only.

closes #24 check-in: 764a82ecdb user: [email protected] tags: trunk, v0.5.0

2026-04-19
16:30
Initial open source release

libfossil is a pure-Go implementation of the Fossil SCM, reading and writing the same .fossil SQLite repository format as upstream Fossil.

This is the first public release of code that previously lived in a private repository. The module path is github.com/danmestas/libfossil and the binary is named libfossil to avoid $PATH collisions with upstream fossil.

Included: - Repo lifecycle (create, clone), checkout/checkin, timeline, merge, diff, annotate, shun, tag, branch, bisect, stash, undo/redo - Sync-over-HTTP protocol (client and handler) - Two SQLite drivers: modernc (pure Go, default) and ncruces (wasm-capable) - Observer interfaces (SyncObserver, CheckoutObserver) with an optional OpenTelemetry implementation in observer/otel (separate submodule) - Deterministic simulation testing harness with BUGGIFY fault injection - Kong-based embeddable CLI under cli/ and a standalone binary under cmd/libfossil/ check-in: f5744359d3 user: [email protected] tags: trunk