Add desktop HTTPS Git synchronization

This commit is contained in:
hugo committed 2026-08-10 19:53:00 +02:00
1 parent 8879df142d
commit 95bb10b4a1
6 files changed
+897 -3

No files matched your search

+30
View File
@@ -1486,6 +1486,36 @@ impl GitRepository {
Ok((pull, push))
}
pub fn sync_controlled(
&self,
configured: &GitRemote,
credentials: &impl GitCredentialProvider,
control: &GitOperationControl,
) -> Result<(PullOutcome, PushOutcome), GitError> {
self.sync_with_transports_controlled(
configured,
credentials,
&EmbeddedFetchTransport,
&ReqwestGitTransport,
control,
)
}
pub fn sync_with_transports_controlled(
&self,
configured: &GitRemote,
credentials: &impl GitCredentialProvider,
fetch: &impl GitFetchTransport,
push: &impl GitSmartHttpTransport,
control: &GitOperationControl,
) -> Result<(PullOutcome, PushOutcome), GitError> {
let pull =
self.pull_with_transport_controlled(configured, None, credentials, fetch, control)?;
let push =
self.push_with_transport_controlled(configured, None, credentials, push, control)?;
Ok((pull, push))
}
/// Return one internally consistent, secret-free view of repository state
/// for frontends. The remote relation uses only the last fetched tracking
/// ref and therefore never performs network access.