From a3e650c666435542b8e4bcb6d472f8e1e914e53c Mon Sep 17 00:00:00 2001 From: Mike Hommey Date: Thu, 27 Jun 2024 08:58:03 +0900 Subject: [PATCH] Fix `git cinnabar unbundle --clonebundle` after b01ca2ec --- src/main.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main.rs b/src/main.rs index eb55be2f9..fb4cffe23 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1891,6 +1891,9 @@ fn do_unbundle(store: &mut Store, clonebundle: bool, mut url: OsString) -> Resul Err("Repository does not support clonebundles")?; } url = get_clonebundle_url(&mut *conn).ok_or("Repository didn't provide a clonebundle")?; + // Release the connection now, so that its cleanup doesn't conflict + // with get_bundle_connection. Yes, this API sucks. + std::mem::drop(conn); eprintln!("Getting clone bundle from {}", url); get_bundle_connection(&url).unwrap() } else {