(remote: &mut Remote<'_>)
| 53 | } |
| 54 | |
| 55 | fn update_remote(remote: &mut Remote<'_>) -> Result<(), AppError> { |
| 56 | let remote_callbacks = agent_callbacks(); |
| 57 | let mut proxy_options = ProxyOptions::new(); |
| 58 | proxy_options.auto(); |
| 59 | remote |
| 60 | .connect_auth(Direction::Fetch, Some(remote_callbacks), Some(proxy_options)) |
| 61 | .map_err(AppError::GitError)?; |
| 62 | let mut options = agent_fetch_options(); |
| 63 | remote.download::<String>(&[], Some(&mut options)).map_err(AppError::GitError)?; |
| 64 | remote.disconnect()?; |
| 65 | remote.update_tips(None, RemoteUpdateFlags::UPDATE_FETCHHEAD, AutotagOption::Unspecified, None)?; |
| 66 | Ok(()) |
| 67 | } |
| 68 | |
| 69 | pub fn update_project_remotes(project: &Project, path: &Path, ff_merge: bool) -> Result<(), AppError> { |
| 70 | let local: Repository = Repository::open(path).map_err(AppError::GitError)?; |
no test coverage detected