---
feature_story: FS_67_16_61_97
feature_title: git_plugin.md
feature_status: TEST
---

There are a pair fo two built-in plugins:
*   `GitRepoLoader`
*   `GitRepoDelegator`

Their primary intended use was testing:<br/>
to load and query easily accessible real data (Git repos, their commits, and other metadata).

While loading commits did not seem useful outside of testing,<br/>
indexing repo locations and metadata become helpful in practice when there are many Git repos to select from.<br/>
In this case, they can be indexed to select repo by various details like:
*   their aliases
*   type of content: code or config, etc.

# `GitRepoLoader`

The plugin can be configured as:

```yaml
plugin_config:
    load_repo_commits: False
    repo_entries:
        /absolute/base/path/one:
            -
                repo_rel_path: argrelay.git
                envelope_properties:
                    GitRepoAlias: ar
                    GitRepoContentType: code
            -
                repo_rel_path: sub-dir-one/marshmallow.git
                is_repo_enabled: False
                envelope_properties:
                    GitRepoAlias: mm
                    GitRepoContentType: code

        /absolute/path/to/another/dir/somewhere/deep/inside/filesystem/tree:
            -
                repo_rel_path: relative/path/to/marshmallow.git
                is_repo_enabled: False
                envelope_properties:
                    GitRepoAlias: mm
                    GitRepoContentType: code
```

The reason to split paths into two parts (absolute and relative) and then concatenate them during data loading<br/>
is to tell which path parts will be exposed to query on the command line:
*   `GitRepoRootAbsPath` envelope property exposes absolute base path
*   `GitRepoRootRelPath` envelope property exposes relative repo path

All other envelope properties come from config directly (see `envelope_properties`).

See `GitRepoArgType` which describes all properties of the loaded envelopes by `GitRepoLoader`.

# `GitRepoDelegator`

This plugin is relatively trivial and supports single function which simply goes to the location of the repo.
