Merge branch 'bw/submodule-sans-cache-compat'
[gitweb.git] / builtin / clone.c
index b22845738afe68e61d45883e89a470213de921ef..6ad0ab3fa40af1761482f5fc78b4b1c401f9717c 100644 (file)
@@ -452,7 +452,8 @@ static void clone_local(const char *src_repo, const char *dest_repo)
 {
        if (option_shared) {
                struct strbuf alt = STRBUF_INIT;
-               strbuf_addf(&alt, "%s/objects", src_repo);
+               get_common_dir(&alt, src_repo);
+               strbuf_addstr(&alt, "/objects");
                add_to_alternates_file(alt.buf);
                strbuf_release(&alt);
        } else {