| 107 | } |
| 108 | |
| 109 | pub fn checkout_files_for_commit<P>( |
| 110 | &self, |
| 111 | repo_path: P, |
| 112 | commit: &str, |
| 113 | cmd_killer: &CommandKiller, |
| 114 | ) -> Result<(), GitLfsError> |
| 115 | where |
| 116 | P: AsRef<Path>, |
| 117 | { |
| 118 | git_lfs_exec( |
| 119 | &[ |
| 120 | "-C", |
| 121 | repo_path.as_ref().to_string_lossy().as_ref(), |
| 122 | "lfs", |
| 123 | "fetch", |
| 124 | "origin", |
| 125 | commit, |
| 126 | ], |
| 127 | &self.get_all_envs(&[]), |
| 128 | &mut |line| info!("{line}"), |
| 129 | &mut |line| warn!("{line}"), |
| 130 | cmd_killer, |
| 131 | )?; |
| 132 | |
| 133 | git_lfs_exec( |
| 134 | &["-C", repo_path.as_ref().to_string_lossy().as_ref(), "lfs", "checkout"], |
| 135 | &self.get_all_envs(&[]), |
| 136 | &mut |line| info!("{line}"), |
| 137 | &mut |line| warn!("{line}"), |
| 138 | cmd_killer, |
| 139 | )?; |
| 140 | |
| 141 | Ok(()) |
| 142 | } |
| 143 | } |
| 144 | |
| 145 | fn git_lfs_exec<F, X>( |