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
- Determine a local cache directory for the clone.
- Clone (shallow if configured) or pull to update.
- Walk files under the configured
rootsubdirectory. - Apply include/exclude globs.
- Extract per-file metadata from
git log. - 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:
gitbinary is not available- Clone or pull fails
- The configured
rootsubdirectory does not exist in the repo