Expand description
Utility module for running Git commands.
This module provides helpers for interacting with a Git repository, primarily to extract metadata (commit hash, tag, timestamp, branch).
All functions return mdbook::errors::Error on failure so they can be
integrated directly into the mdbook preprocessor error flow.
See also:
get_git_output— Run arbitrary Git commands and capture output.verify_branch— Convenience wrapper to check branch existence.
Functions§
- get_
git_ output - Run a Git command and return the trimmed
stdoutoutput as aString. - verify_
branch - Verify that a branch exists locally in the given repository.