Module git

Module git 

Source
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:

Functions§

get_git_output
Run a Git command and return the trimmed stdout output as a String.
latest_tag_for_branch
Return the latest tag name, preferring tags reachable from the given branch’s HEAD. Falls back to global (by creator date) when describe fails. Returns “No tags found” if not tag found
verify_branch
Verify that a branch exists locally in the given repository.