MCPcopy Create free account
hub / github.com/git/git / report_linked_checkout_garbage

Function report_linked_checkout_garbage

path.c:365–385  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

363}
364
365void 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
387static void adjust_git_path(struct repository *repo,
388 struct strbuf *buf, int git_dir_len)

Callers 1

cmd_count_objectsFunction · 0.85

Calls 5

strbuf_addfFunction · 0.85
strbuf_setlenFunction · 0.85
strbuf_addstrFunction · 0.85
file_existsFunction · 0.85
strbuf_releaseFunction · 0.85

Tested by

no test coverage detected