Skip to content
go-libfossil Artifact [1ac821e30c]
Login

Artifact [1ac821e30c]

Artifact 1ac821e30c60b8a45f775bbb22887fb6a8d514939143861ec17cd1b55b16b3ee:

Tag referencing [1ac821e30c] - 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.". by [email protected] on 2026-05-04 19:03:02.


D 2026-05-04T19:03:02
T +sym-v0.5.0 764a82ecdbcfe68409915451d56b25e18968d97d7db53c0c08b9d7cfdca57fa9 -\s**`Repo.UUIDFromRID(rid\sint64)\s(string,\serror)`**\s—\spublic\slookup\sthat\sreturns\sthe\sUUID\sfor\sa\sgiven\sRID,\sreplacing\sthe\sconsumer\spattern\sof\sreaching\sinto\s`r.DB()`\sto\srun\s`SELECT\suuid\sFROM\sblob\sWHERE\srid\s=\s?`.\sReturns\s`ErrArtifactNotFound`\s(matchable\svia\s`errors.Is`)\swhen\sthe\sRID\sdoes\snot\sexist.\s(#23,\s#25)\n-\s**`Repo.Diff`\saccepts\s`filePath\s==\s""`\sfor\swhole-checkin\sdiffs.**\sWhen\scalled\swith\san\sempty\s`filePath`,\s`Diff`\snow\sreturns\sone\s`DiffEntry`\sper\sfile\schanged\sbetween\s`ridA`\sand\s`ridB`,\sdeterministically\sordered\sby\sname.\sThe\ssingle-file\sform\s(non-empty\s`filePath`)\sis\sunchanged.\s(#24,\s#26)\n\nNone.\sBoth\schanges\sare\spurely\sadditive\sat\sthe\spublic\sAPI\ssurface.\sCalls\sto\s`Repo.Diff`\swith\sa\snon-empty\s`filePath`\sbehave\sexactly\sas\sbefore.\n\n-\sConsumers\s(bones,\sEdgeSync)\scan\sdrop\stheir\shand-rolled\s`ridToUUID`\shelpers\sin\sfavor\sof\s`Repo.UUIDFromRID`.\sThe\s`errors.Is(err,\slibfossil.ErrArtifactNotFound)`\scheck\sreplaces\sad-hoc\s`sql.ErrNoRows`\smatching.\n-\sConsumers\sbuilding\swhole-checkin\sdiffs\s(e.g.\sEdgeSync's\s`Agent.Diff`)\scan\sreplace\sthe\smanual\s`ListFiles`\s+\sper-file\s`Diff`\senumeration\swith\sa\ssingle\s`repo.Diff(ridA,\sridB,\s"")`\scall.\n-\s**Known\slimitation\sin\swhole-checkin\sDiff:**\srename\sdetection\sand\spermission-only\schanges\sare\snot\syet\sreflected\s—\spure\srenames\scurrently\ssurface\sas\sadd+delete\spairs.\sThe\sunderlying\s`mlink`\swalk\sneeded\sto\sfix\sthis\sis\stracked\sseparately\sand\swill\sland\sin\sa\sfollow-up\srelease.\sThe\ssingle-file\s`Diff`\scodepath\shas\sthe\ssame\slimitation\stoday,\sso\sbehavior\sis\sconsistent\sacross\sboth\sforms.
U [email protected]
Z cb0790489644450208b39d06baf7a198