Refresh the content index for an import, skipping the full rebuild when the existing index is already current (RFC §21 measured budgets, CB-13C AC-3). `rebuild_if_stale` is HEAD-based: a full rebuild stamps the current Git HEAD as the index's `base_commit`, so an import that does not move Git leaves the index current and the next import's refresh is a no-op. Only a missing or unusable index falls
(repo_root: &Path)
| 62 | /// a missing or unusable index falls back to the full walk-and-rebuild — |
| 63 | /// which is the cold-import behavior this preserves. |
| 64 | pub fn refresh_content_index(repo_root: &Path) -> Result<(), ContentSearchError> { |
| 65 | match update_content_index(repo_root) { |
| 66 | Ok(()) => Ok(()), |
| 67 | // Missing or unusable index: fall back to the full walk-and-rebuild |
| 68 | // (the cold-import behavior this preserves). |
| 69 | Err(_) => build_content_index(repo_root), |
| 70 | } |
| 71 | } |
| 72 | |
| 73 | /// Incrementally update the content index after file changes. |
| 74 | /// |
no test coverage detected