Ragex. Git. Repo
(Ragex v0.17.3)
View Source
Repository detection and metadata.
Discovers the git repository root for a given working directory and
caches the result. All git operations in Ragex start by calling
Repo.root/1 to establish the repo context.
Examples
iex> Ragex.Git.Repo.root("/opt/my_project/lib")
{:ok, "/opt/my_project"}
iex> Ragex.Git.Repo.git_available?()
true
Summary
Functions
Returns the current branch name for the repo containing path.
Returns true if the git binary is available on the system.
Returns true if the given path is inside a git repository.
Returns a project hash suitable for cache file paths.
Returns the repository root for a working directory.
Functions
Returns the current branch name for the repo containing path.
@spec git_available?() :: boolean()
Returns true if the git binary is available on the system.
Returns true if the given path is inside a git repository.
Returns a project hash suitable for cache file paths.
Uses the repo root path to generate a deterministic short hash.
Returns the repository root for a working directory.
Caches the result in the process dictionary to avoid repeated git calls within the same process (e.g. during a single MCP tool invocation).