Skip to main content

populate_commit_messages

Function populate_commit_messages 

Source
pub async fn populate_commit_messages(
    conn: &Connection,
    config: &EmbeddingsConfig,
    repo_root: &Path,
    head_commit: Option<&str>,
    db_path: Option<&Path>,
    max_commits: usize,
) -> Result<PopulateStats>
Expand description

Embed recent git commit messages.

Walks up to max_commits commits from HEAD (using gix) and embeds each commit’s subject + body as a commit source chunk, keyed by the short hash.

Commits already present in the embeddings table (same hash) are skipped so repeated runs only embed new commits.