Expand description
Git commit, history, and change-detection helpers.
Structs§
- Changed
File - A file that changed between git tree states.
- History
Entry - A single entry from
git logfor a wiki page.
Functions§
- changed_
since_ commit - Detect changed
.mdfiles underwiki/between a past commit and HEAD. - changed_
wiki_ files - Detect changed
.mdfiles underwiki/in the working tree vs HEAD. - collect_
changed_ files - Collect all changed
.mdfiles by merging two git diffs: - commit
- Stage all files and commit. Returns empty string if nothing to commit.
- commit_
paths - Stage specific paths and commit. Returns empty string if nothing to commit.
- current_
head - Get current HEAD commit hash. Returns None if repo has no commits.
- init_
repo - Initialise a new git repository at
path. - page_
history - Return git commit history for a file path relative to repo root.
Uses
git log(shell) for simplicity and built-in--followsupport.