Previously it would panic as the case was unexpected, now it prints a message informing about the empty repository similar to how git does.
Unified · Split
| @@ -86,7 +86,7 @@ pub(crate) mod function { · 85 unmodified lines | |||
| 86 | 86 | ||
| 87 | match fetch_outcome.status { | 87 | match fetch_outcome.status { |
| 88 | Status::NoPackReceived { .. } => { | 88 | Status::NoPackReceived { .. } => { |
| 89 | unreachable!("clone always has changes") | 89 | writeln!(err, "The cloned repository appears to be empty")?; |
| 90 | } | 90 | } |
| 91 | Status::DryRun { .. } => unreachable!("dry-run unsupported"), | 91 | Status::DryRun { .. } => unreachable!("dry-run unsupported"), |
| 92 | Status::Change { update_refs, .. } => { | 92 | Status::Change { update_refs, .. } => { |