Skip to main content

commit_all

Function commit_all 

Source
pub fn commit_all(root: &Path, message: &str) -> Result<String>
Expand description

Snapshot the entire working tree (every file except those under .git/) into a new commit on HEAD, returning the commit SHA.

Works for the initial commit (unborn HEAD, no parent) and for subsequent commits (parent = current HEAD). Because the tree is rebuilt from the filesystem each call, additions, modifications and deletions are all captured — a faithful git add -A && git commit for synthetic repos that have no .gitattributes content filters.