| 363 | } |
| 364 | |
| 365 | void report_linked_checkout_garbage(struct repository *r) |
| 366 | { |
| 367 | struct strbuf sb = STRBUF_INIT; |
| 368 | const struct common_dir *p; |
| 369 | int len; |
| 370 | |
| 371 | if (!r->different_commondir) |
| 372 | return; |
| 373 | strbuf_addf(&sb, "%s/", r->gitdir); |
| 374 | len = sb.len; |
| 375 | for (p = common_list; p->path; p++) { |
| 376 | const char *path = p->path; |
| 377 | if (p->ignore_garbage) |
| 378 | continue; |
| 379 | strbuf_setlen(&sb, len); |
| 380 | strbuf_addstr(&sb, path); |
| 381 | if (file_exists(sb.buf)) |
| 382 | report_garbage(PACKDIR_FILE_GARBAGE, sb.buf); |
| 383 | } |
| 384 | strbuf_release(&sb); |
| 385 | } |
| 386 | |
| 387 | static void adjust_git_path(struct repository *repo, |
| 388 | struct strbuf *buf, int git_dir_len) |
no test coverage detected