mirror of
https://github.com/Dasemu/Grove.git
synced 2026-11-26 23:36:11 +00:00
fix(daemon): treat Gitea SSH "Cannot find repository" as a purge hint
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
206130df98
commit
2772635ff9
2 files changed
+6
-1
No files matched your search
@@ -22,6 +22,7 @@ pub fn looks_gone(fetch_error: &str) -> bool {
|
||||
"not found",
|
||||
"does not appear to be a git repository",
|
||||
"does not exist",
|
||||
"cannot find repository", // Gitea/Forgejo over SSH
|
||||
"error: 404",
|
||||
]
|
||||
.iter()
|
||||
@@ -183,6 +184,10 @@ mod tests {
|
||||
assert!(looks_gone(
|
||||
"fatal: 'x.git' does not appear to be a git repository"
|
||||
));
|
||||
assert!(looks_gone(
|
||||
"git fetch -q --prune origin failed (Some(128)): error:\nerror: Cannot find \
|
||||
repository: dasemu/x\nerror:\nfatal: Could not read from remote repository."
|
||||
));
|
||||
assert!(!looks_gone(
|
||||
"ssh: connect to host h port 22: Connection timed out"
|
||||
));
|
||||
|
||||
Reference in new issue
Block a user