| 349 | } |
| 350 | |
| 351 | static void update_common_dir(struct strbuf *buf, int git_dir_len, |
| 352 | const char *common_dir) |
| 353 | { |
| 354 | char *base = buf->buf + git_dir_len; |
| 355 | int has_lock_suffix = strbuf_strip_suffix(buf, LOCK_SUFFIX); |
| 356 | |
| 357 | init_common_trie(); |
| 358 | if (trie_find(&common_trie, base, check_common, NULL) > 0) |
| 359 | replace_dir(buf, git_dir_len, common_dir); |
| 360 | |
| 361 | if (has_lock_suffix) |
| 362 | strbuf_addstr(buf, LOCK_SUFFIX); |
| 363 | } |
| 364 | |
| 365 | void report_linked_checkout_garbage(struct repository *r) |
| 366 | { |
no test coverage detected