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

Function publish_status

src/watcher/watcher.c:1325–1337  ·  view source on GitHub ↗

Publish what index_status reports: the strategy, the current cadence and, * when a check just completed, the wall-clock time of that scan. A non-git * root is "tree" when watch_non_git polls it (#1948), else "none". */

Source from the content-addressed store, hash-verified

1323 * when a check just completed, the wall-clock time of that scan. A non-git
1324 * root is "tree" when watch_non_git polls it (#1948), else "none". */
1325static void publish_status(project_state_t *s, bool scanned) {
1326 cbm_watcher_strategy_t strategy = CBM_WATCHER_STRATEGY_NONE;
1327 if (s->is_git) {
1328 strategy = CBM_WATCHER_STRATEGY_GIT;
1329 } else if (s->tree_poll) {
1330 strategy = CBM_WATCHER_STRATEGY_TREE;
1331 }
1332 atomic_store(&s->status_strategy, strategy);
1333 atomic_store(&s->status_interval_ms, s->interval_ms);
1334 if (scanned) {
1335 atomic_store(&s->status_last_scan_s, (int64_t)time(NULL));
1336 }
1337}
1338
1339/* Init baseline for a project: check if git, get HEAD, count files */
1340static bool init_baseline(cbm_watcher_t *w, project_state_t *s) {

Callers 3

init_baselineFunction · 0.85
commit_baselinesFunction · 0.85
poll_projectFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected