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

Function unwatch_snapshot_callback

tests/test_watcher.c:3848–3860  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3846} unwatch_snapshot_ctx_t;
3847
3848static int unwatch_snapshot_callback(const char *name, const char *path, void *ud) {
3849 (void)name;
3850 (void)path;
3851 unwatch_snapshot_ctx_t *ctx = ud;
3852 ctx->calls++;
3853 if (ctx->calls == 1) {
3854 /* Both states are already present in poll_once's pointer snapshot.
3855 * Removing them must invalidate the not-yet-admitted callback. */
3856 cbm_watcher_unwatch(ctx->watcher, ctx->first_project);
3857 cbm_watcher_unwatch(ctx->watcher, ctx->second_project);
3858 }
3859 return 0;
3860}
3861
3862TEST(watcher_unwatch_invalidates_remaining_poll_snapshot) {
3863 char first[256];

Callers

nothing calls this directly

Calls 1

cbm_watcher_unwatchFunction · 0.85

Tested by

no test coverage detected