MCPcopy Create free account
hub / github.com/brocode/fw / update_remote

Function update_remote

src/git/mod.rs:55–67  ·  view source on GitHub ↗
(remote: &mut Remote<'_>)

Source from the content-addressed store, hash-verified

53}
54
55fn 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
69pub fn update_project_remotes(project: &Project, path: &Path, ff_merge: bool) -> Result<(), AppError> {
70 let local: Repository = Repository::open(path).map_err(AppError::GitError)?;

Callers 2

update_project_remotesFunction · 0.85
init_additional_remotesFunction · 0.85

Calls 2

agent_callbacksFunction · 0.85
agent_fetch_optionsFunction · 0.85

Tested by

no test coverage detected