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). */
| 765 | * assertion would be a coin flip (O9 — a verdict must not depend on |
| 766 | * filesystem timestamp granularity). */ |
| 767 | static 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. |
no test coverage detected