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

Function create_object_directory

setup.c:2637–2656  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2635}
2636
2637static void create_object_directory(struct repository *repo)
2638{
2639 struct strbuf path = STRBUF_INIT;
2640 size_t baselen;
2641
2642 strbuf_addstr(&path, repo_get_object_directory(repo));
2643 baselen = path.len;
2644
2645 safe_create_dir(repo, path.buf, 1);
2646
2647 strbuf_setlen(&path, baselen);
2648 strbuf_addstr(&path, "/pack");
2649 safe_create_dir(repo, path.buf, 1);
2650
2651 strbuf_setlen(&path, baselen);
2652 strbuf_addstr(&path, "/info");
2653 safe_create_dir(repo, path.buf, 1);
2654
2655 strbuf_release(&path);
2656}
2657
2658static void separate_git_dir(const char *git_dir, const char *git_link)
2659{

Callers 1

init_dbFunction · 0.85

Calls 5

strbuf_addstrFunction · 0.85
safe_create_dirFunction · 0.85
strbuf_setlenFunction · 0.85
strbuf_releaseFunction · 0.85

Tested by

no test coverage detected