Code

Merge branch 'maint-1.6.3' into maint
[git.git] / builtin-clone.c
index d2b0757e538b9fbbcc20e48174886bf4f8b036d9..e51978a157d1ed3873ff04ac0b64dcf90a2a8dd7 100644 (file)
@@ -141,7 +141,7 @@ static char *guess_dir_name(const char *repo, int is_bundle, int is_bare)
        if (is_bare) {
                struct strbuf result = STRBUF_INIT;
                strbuf_addf(&result, "%.*s.git", (int)(end - start), start);
-               dir = strbuf_detach(&result, 0);
+               dir = strbuf_detach(&result, NULL);
        } else
                dir = xstrndup(start, end - start);
        /*
@@ -574,8 +574,10 @@ int cmd_clone(int argc, const char **argv, const char *prefix)
                option_no_checkout = 1;
        }
 
-       if (transport)
+       if (transport) {
                transport_unlock_pack(transport);
+               transport_disconnect(transport);
+       }
 
        if (!option_no_checkout) {
                struct lock_file *lock_file = xcalloc(1, sizeof(struct lock_file));