mirror of
https://github.com/Dasemu/Grove.git
synced 2026-11-27 07:46:13 +00:00
fix: never use a read-only pull mirror as origin
`grove add` repoints an origin that is a Gitea/GitHub pull mirror to the mirror's writable source (on a configured provider) and fetches it; `grove import` clones the source instead of the mirror, keeping the mirror's name and refusing a visibility mismatch. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
f150f778c3
commit
6720390e3f
7 files changed
+123
-3
No files matched your search
@@ -32,6 +32,11 @@ fn repo(v: &Value) -> RemoteRepo {
|
||||
clone_url: s("clone_url"),
|
||||
ssh_url: s("ssh_url"),
|
||||
default_branch: v["default_branch"].as_str().unwrap_or("main").to_string(),
|
||||
mirror_of: v["mirror"]
|
||||
.as_bool()
|
||||
.unwrap_or(false)
|
||||
.then(|| s("original_url"))
|
||||
.filter(|u| !u.is_empty()),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user