Skip to main content

retrieve_annotations

Function retrieve_annotations 

Source
pub fn retrieve_annotations(
    git: &dyn GitOps,
    query: &ReadQuery,
) -> Result<Vec<MatchedAnnotation>, GitError>
Expand description

Retrieve matching annotations for a file from git notes.

  1. Find commits that touched the file via git log --follow
  2. For each commit, try to read the chronicle note
  3. Parse the note as a v3 Annotation via parse_annotation
  4. Filter wisdom entries matching the query (file path, line range)
  5. Return results sorted newest-first (preserving git log order)