MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / stamp_row_mtime

Function stamp_row_mtime

tests/test_artifact.c:767–776  ·  view source on GitHub ↗

Overwrite one file_hashes row's mtime with a caller-chosen sentinel. * Tests assert against this sentinel rather than against "a different * wall-clock time": on Windows mtime_ns has ONE-SECOND resolution, so two * writes in the same second are indistinguishable and an inequality * assertion would be a coin flip (O9 — a verdict must not depend on * filesystem timestamp granularity). */

Source from the content-addressed store, hash-verified

765 * assertion would be a coin flip (O9 — a verdict must not depend on
766 * filesystem timestamp granularity). */
767static bool stamp_row_mtime(const char *db, const char *proj, const char *rel, int64_t sentinel,
768 const char *sha) {
769 cbm_store_t *s = cbm_store_open_path(db);
770 if (!s) {
771 return false;
772 }
773 int rc = cbm_store_upsert_file_hash(s, proj, rel, sha ? sha : "", sentinel, 1);
774 cbm_store_close(s);
775 return rc == CBM_STORE_OK;
776}
777
778/* Why the last build_trusted_artifact_repo() call returned NULL. Read by the
779 * BUILD_TRUSTED_REPO_OR_FAIL() call sites.

Callers 1

test_artifact.cFile · 0.85

Calls 3

cbm_store_open_pathFunction · 0.85
cbm_store_closeFunction · 0.85

Tested by

no test coverage detected