Skip to main content

Module git

Module git 

Source
Expand description

Git integration for design documents

Provides functions for extracting metadata from git history and performing git operations while preserving history.

Functions§

get_author
Extract the original author from git history Falls back to git config user.name, then “Unknown Author” if git fails
get_created_date
Extract creation date from git history (first commit) Falls back to today’s date if git fails
get_repo_root
Get the git repository root directory
get_updated_date
Extract last modified date from git history Falls back to today’s date if git fails
git_add
Stage a file with git add
git_mv
Move a file using git mv to preserve history Creates destination directory if needed Retries on index.lock errors with exponential backoff
is_git_repo
Check if a path is in a git repository
is_tracked
Check if a file is tracked by git