scan_git

Function scan_git 

Source
pub fn scan_git(
    name: &str,
    git_config: &GitConnectorConfig,
    db_path: &Path,
) -> Result<Vec<SourceItem>>
Expand description

Scan a Git repository and produce SourceItems.

§Workflow

  1. Determine a local cache directory for the clone.
  2. Clone (shallow if configured) or pull to update.
  3. Walk files under the configured root subdirectory.
  4. Apply include/exclude globs.
  5. Extract per-file metadata from git log.
  6. Generate web-browsable URLs.

§Arguments

  • name — the instance name (e.g. "platform"). Used as part of the source identifier: "git:<name>".
  • git_config — the Git connector configuration for this instance.
  • db_path — path to the SQLite database, used to derive the default cache directory.

§Errors

Returns an error if:

  • git binary is not available
  • Clone or pull fails
  • The configured root subdirectory does not exist in the repo