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:
dasemuandClaude Opus 5.5 committed 2026-11-17 15:15:15 +01:00
1 parent 206130df98
commit 2772635ff9
2 files changed
+6 -1

No files matched your search

+5
View File
@@ -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"
));