pub fn checkout(
repo: &Repository,
rev: &str,
paths: &[PathBuf],
force: bool,
) -> Result<CheckoutOutcome>Expand description
Restore the working tree to a revision without moving the current branch (a “restore-like” checkout). HEAD stays attached to its branch.
If paths is non-empty, only those files are restored from the revision
(and nothing is deleted); each must exist in that revision.