# `VulnCheck.Git`
[🔗](https://github.com/Voskan/vulncheck/blob/v1.0.1/lib/vulncheck/git.ex#L1)

Minimal read-only access to the project's Git repository through the
`git` executable.

# `changed_files`

```elixir
@spec changed_files(String.t(), String.t()) :: {:ok, [String.t()]} | {:error, term()}
```

Files changed between `ref` and the working tree (including untracked
files), relative to `root`.

# `default_base`

```elixir
@spec default_base(String.t(), String.t() | nil) ::
  {:ok, String.t()} | {:error, term()}
```

Picks the comparison base: the given ref, otherwise `origin/main` or
`HEAD~1`, whichever exists first.

# `ref?`

```elixir
@spec ref?(String.t(), String.t()) :: boolean()
```

Returns `true` when `ref` resolves to a commit.

# `show`

```elixir
@spec show(String.t(), String.t(), String.t()) :: {:ok, binary()} | {:error, term()}
```

Reads `path` (relative to `root`) as it was at `ref`. Returns
`{:error, :not_found}` when the file did not exist there.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
