From 024775faa5dd1098c03633e2fda7e5f072635a46 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Fri, 12 Jul 2024 08:12:45 +0100 Subject: [PATCH] fix: don't modify config of external repos The git config files of external repos are read-only. This is the only place where we make reference to a remote named 'origin', so this also closes kemitix/git-next#85. Closes kemitix/git-next#85 --- crates/git/src/repo_details.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/git/src/repo_details.rs b/crates/git/src/repo_details.rs index b8f1ea3..a24f1db 100644 --- a/crates/git/src/repo_details.rs +++ b/crates/git/src/repo_details.rs @@ -138,7 +138,7 @@ impl RepoDetails { #[tracing::instrument] pub fn write_remote_url(&self, url: &RemoteUrl) -> Result<(), kxio::fs::Error> { if self.gitdir.storage_path_type() != StoragePathType::Internal { - // return Err(Not an internal repo) + return Ok(()); } let fs = self.gitdir.as_fs(); // load config file