Han-Wen Nienhuys <hanwen@xxxxxxxxxx> writes: >> > + files_ref_path(refs, &sb, "refs"); >> > + safe_create_dir(sb.buf, 1); >> > + // XXX adjust_shared_perm ? > > I forgot why I put the XXX, but note that safe_create_dirs runs > adjust_shared_perms implicitly. That piece of information would make an excellent part of the log message, which is to describe why "questionable" changes are made. "git init" is designed to be runnable in an existing repository, but safe_create_dir() would not run adjust_shared_perm() when mkdir() says EEXIST, and I think that is why the original makes a call to adjust_shared_perm() after safe_create_dir() returns. Thanks.