(git_dir: impl AsRef<OsStr>)
| 170 | } |
| 171 | |
| 172 | pub fn git_repack(git_dir: impl AsRef<OsStr>) -> Result<()> { |
| 173 | log::info!("Repacking"); |
| 174 | let cmd = git_cmd( |
| 175 | git_dir, |
| 176 | [ |
| 177 | "-c", |
| 178 | "pack.deltaCacheLimit=65535", |
| 179 | "-c", |
| 180 | "pack.deltaCacheSize=1073741824", // 1GiB |
| 181 | "repack", |
| 182 | "--depth=4095", |
| 183 | "--window=2", |
| 184 | "-a", |
| 185 | "-d", |
| 186 | "-f", |
| 187 | "--path-walk", |
| 188 | ], |
| 189 | ); |
| 190 | let _ = exec(cmd, None)?; |
| 191 | Ok(()) |
| 192 | } |
no test coverage detected