fix: don't modify config of external repos
Some checks failed
ci/woodpecker/push/cron-docker-builder Pipeline was successful
ci/woodpecker/push/push-next Pipeline was successful
ci/woodpecker/push/tag-created Pipeline was successful
Rust / build (push) Failing after 1m35s

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
This commit is contained in:
Paul Campbell 2024-07-12 08:12:45 +01:00
parent 5f36282667
commit 024775faa5

View file

@ -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