| 348 | } |
| 349 | |
| 350 | static void clone_local(const char *src_repo, const char *dest_repo) |
| 351 | { |
| 352 | if (option_shared) { |
| 353 | struct strbuf alt = STRBUF_INIT; |
| 354 | get_common_dir(&alt, src_repo); |
| 355 | strbuf_addstr(&alt, "/objects"); |
| 356 | odb_add_to_alternates_file(the_repository->objects, alt.buf); |
| 357 | strbuf_release(&alt); |
| 358 | } else { |
| 359 | struct strbuf src = STRBUF_INIT; |
| 360 | struct strbuf dest = STRBUF_INIT; |
| 361 | get_common_dir(&src, src_repo); |
| 362 | get_common_dir(&dest, dest_repo); |
| 363 | strbuf_addstr(&src, "/objects"); |
| 364 | strbuf_addstr(&dest, "/objects"); |
| 365 | copy_or_link_directory(&src, &dest, src_repo); |
| 366 | strbuf_release(&src); |
| 367 | strbuf_release(&dest); |
| 368 | } |
| 369 | |
| 370 | if (0 <= option_verbosity) |
| 371 | fprintf(stderr, _("done.\n")); |
| 372 | } |
| 373 | |
| 374 | static const char *junk_work_tree; |
| 375 | static int junk_work_tree_flags; |
no test coverage detected