Skip to main content

commit_paths

Function commit_paths 

Source
pub fn commit_paths(dir: &Path, paths: &[&str], message: &str) -> PathCommit
Expand description

Stage paths and commit them alone (--only) in the checkout at dir, so another seat’s staged work is left out. The caller holds tracker_commit_lock. A git process outside ljos that holds the index is waited out with backoff.

The add runs first and its failure stands on its own: a commit named for a file git never took in reports a pathspec error that hides why the add failed. An untracked file is added here, that file only.