(directory: &Path, snapshot: &str)
| 67 | } |
| 68 | |
| 69 | pub fn restore(directory: &Path, snapshot: &str) -> Result<()> { |
| 70 | let git_dir = ensure_snapshot_repo(directory)?; |
| 71 | git_output(directory, &git_dir, &["read-tree", snapshot])?; |
| 72 | git_output(directory, &git_dir, &["checkout-index", "-a", "-f"])?; |
| 73 | Ok(()) |
| 74 | } |
| 75 | |
| 76 | pub fn diff(directory: &Path, from_hash: &str) -> Result<Vec<super::FileDiff>> { |
| 77 | let git_dir = ensure_snapshot_repo(directory)?; |
nothing calls this directly
no test coverage detected