Remove remote editing from the Git sidebar

This commit is contained in:
2026-07-23 09:38:40 +02:00
parent 08a5bd192c
commit 632822fe1b
13 changed files with 46 additions and 83 deletions

View File

@@ -502,22 +502,6 @@ impl GitEngine {
})
}
pub fn set_remote(&self, remote_url: &str) -> Result<(), GitError> {
let remote_url = remote_url.trim();
if remote_url.is_empty() {
return Err(GitError::Validation("remote URL is required".into()));
}
let args = if self
.optional_output(&["remote", "get-url", "origin"], GitOperation::Remote)?
.is_some()
{
["remote", "set-url", "origin", remote_url]
} else {
["remote", "add", "origin", remote_url]
};
self.run_local(&args, GitOperation::Remote).map(|_| ())
}
pub fn commit_all(&self, message: &str) -> Result<NetworkResult, GitError> {
let message = message.trim();
if message.is_empty() {

View File

@@ -134,7 +134,10 @@ fn remote_state_history_fetch_and_fast_forward_pull_use_real_refs() {
git(&local, &["add", "-A"]);
git(&local, &["commit", "-m", "local one"]);
let engine = GitEngine::new(&local);
engine.set_remote(remote.to_str().unwrap()).unwrap();
git(
&local,
&["remote", "add", "origin", remote.to_str().unwrap()],
);
git(&local, &["push", "-u", "origin", "master"]);
git(