Behaviour for git operations.
The default implementation (Minga.Git.System) shells out to the git
CLI. In tests, Minga.Git.Stub returns inert responses without
spawning OS processes.
Configure via:
config :minga, git_module: Minga.Git.System # default
config :minga, git_module: Minga.Git.Stub # tests
Summary
Callbacks
@callback ahead_behind(git_root :: String.t()) :: {:ok, non_neg_integer(), non_neg_integer()} | :error
@callback blame_line( git_root :: String.t(), relative_path :: String.t(), line :: non_neg_integer() ) :: {:ok, String.t()} | :error
@callback branch_list(git_root :: String.t()) :: {:ok, [Minga.Git.BranchInfo.t()]} | {:error, String.t()}
@callback diff(git_root :: String.t(), opts :: Minga.Git.diff_opts()) :: {:ok, String.t()} | {:error, String.t()}
@callback log(git_root :: String.t(), opts :: keyword()) :: {:ok, [Minga.Git.log_entry()]} | {:error, String.t()}
@callback stash_drop(git_root :: String.t(), index :: non_neg_integer()) :: :ok | {:error, String.t()}
@callback stash_list(git_root :: String.t()) :: {:ok, [Minga.Git.stash_entry()]} | {:error, String.t()}
@callback status(git_root :: String.t(), opts :: keyword()) :: {:ok, [Minga.Git.status_entry()]} | {:error, String.t()}