MCPcopy Index your code
hub / github.com/git/git / safe_create_dir

Function safe_create_dir

path.c:791–801  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

789}
790
791void safe_create_dir(struct repository *repo, const char *dir, int share)
792{
793 if (mkdir(dir, 0777) < 0) {
794 if (errno != EEXIST) {
795 perror(dir);
796 exit(1);
797 }
798 }
799 else if (share && adjust_shared_perm(repo, dir))
800 die(_("Could not make %s writable by group"), dir);
801}
802
803int safe_create_dir_in_gitdir(struct repository *repo, const char *path)
804{

Callers 7

copy_templates_1Function · 0.85
create_object_directoryFunction · 0.85
init_dbFunction · 0.85
refs_create_refdir_stubsFunction · 0.85
setup_alternate_ref_dirFunction · 0.85

Calls 2

adjust_shared_permFunction · 0.85
dieFunction · 0.70

Tested by

no test coverage detected