After a SUCCESSFUL reindex, commit the baselines OBSERVED AT CHECK TIME — * the state whose reindex just succeeded. A commit/edit landing during the * reindex is deliberately not absorbed: the next poll sees it as a new delta * (at-least-once, never lost). */
| 1574 | * reindex is deliberately not absorbed: the next poll sees it as a new delta |
| 1575 | * (at-least-once, never lost). */ |
| 1576 | static void commit_baselines(cbm_watcher_t *w, project_state_t *s) { |
| 1577 | if (!s->is_git) { |
| 1578 | /* Tree strategy (#1948): the walk already refreshed the file count. */ |
| 1579 | s->last_tree_sig = s->pending_tree_sig; |
| 1580 | return; |
| 1581 | } |
| 1582 | if (s->pending_head[0] != '\0') { |
| 1583 | snprintf(s->last_head, sizeof(s->last_head), "%s", s->pending_head); |
| 1584 | } |
| 1585 | s->last_dirty_sig = s->pending_dirty_sig; |
| 1586 | /* Refresh file count for interval */ |
| 1587 | int file_count = 0; |
| 1588 | if (git_file_count(w, s, &file_count) == WATCHER_GIT_OK) { |
| 1589 | s->file_count = file_count; |
| 1590 | s->interval_ms = cbm_watcher_poll_interval_ms(s->file_count); |
| 1591 | publish_status(s, false); |
| 1592 | } |
| 1593 | } |
| 1594 | |
| 1595 | static void poll_project(const char *key, void *val, void *ud) { |
| 1596 | (void)key; |
no test coverage detected