Merge branch 'jk/war-on-sprintf'
[gitweb.git] / builtin / clone.c
index 3e14491a340cdce70308b31cdf96612344644c15..9eaecd9a7cdb9ad6726626c96edd05d2d9305453 100644 (file)
@@ -1071,8 +1071,10 @@ int cmd_clone(int argc, const char **argv, const char *prefix)
        transport_unlock_pack(transport);
        transport_disconnect(transport);
 
-       if (option_dissociate)
+       if (option_dissociate) {
+               close_all_packs();
                dissociate_from_references();
+       }
 
        junk_mode = JUNK_LEAVE_REPO;
        err = checkout();