module Git
Overview
Git provides a wrapper around git, backed by libgit2 (via Agate) rather
than shelling out to the git binary. This avoids a subshell per call
and lets the app be built as a static binary without requiring git
to be on PATH at runtime.
Extended Modules
Defined in:
git.crInstance Method Summary
-
#changelog(tag : String, ref = "HEAD") : String | Nil
Generates a Markdown changelog between a previous tag and a ref.
-
#config(name : String, key : String) : String | Nil
Reads a git config value under a "
. " key, using the normal local/global/system config search order (like git config <name>.<key>). -
#log(range : String, format = "%s") : Array(String)
Returns a changelog of commit subjects between two refs.
-
#previous_tag(ref = "HEAD") : String | Nil
Returns the tag before the given ref, or nil.
-
#remotes : Enumerable(Remote)
Returns the remotes of the repository containing the current directory (searching upward, like git itself does).
-
#toplevel(path = ".") : Path | Nil
Returns the top-level working directory of the git repository containing path, or nil if path isn't inside a git repository (searches upward, like git itself does).
Instance Method Detail
Generates a Markdown changelog between a previous tag and a ref.
Reads a git config value under a "git config <name>.<key>).
Returns a changelog of commit subjects between two refs.
Returns the remotes of the repository containing the current directory (searching upward, like git itself does).
Returns the top-level working directory of the git repository containing path, or nil if path isn't inside a git repository (searches upward, like git itself does). Returns nil for bare repositories too.