]> git.ipfire.org Git - thirdparty/git.git/blobdiff - connected.c
The sixth batch
[thirdparty/git.git] / connected.c
index 3135b71e1961ae421855ad4b05887c795c437490..937b4bae387a5757123ebb374fe98102be80921a 100644 (file)
@@ -43,10 +43,12 @@ int check_connected(oid_iterate_fn fn, void *cb_data,
 
        if (transport && transport->smart_options &&
            transport->smart_options->self_contained_and_connected &&
-           transport->pack_lockfile &&
-           strip_suffix(transport->pack_lockfile, ".keep", &base_len)) {
+           transport->pack_lockfiles.nr == 1 &&
+           strip_suffix(transport->pack_lockfiles.items[0].string,
+                        ".keep", &base_len)) {
                struct strbuf idx_file = STRBUF_INIT;
-               strbuf_add(&idx_file, transport->pack_lockfile, base_len);
+               strbuf_add(&idx_file, transport->pack_lockfiles.items[0].string,
+                          base_len);
                strbuf_addstr(&idx_file, ".idx");
                new_pack = add_packed_git(idx_file.buf, idx_file.len, 1);
                strbuf_release(&idx_file);