From: Junio C Hamano Date: Thu, 18 Feb 2016 21:15:18 GMT Subject: Re: [PATCH v5 25/27] refs: add LMDB refs storage backend Message-ID: In-Reply-To: <1455827001.7528.87.camel@twopensource.com> David Turner writes: > On Thu, 2016-02-18 at 15:50 +0700, Duy Nguyen wrote: > > [snip] > > Thanks; applied the above Please. Your other messages did excessively quote parts of the message you are not responding to, but this will not tell anybody but you what "the above" refers to, not even to Duy if the message suggested more than one thing and you took only some but not all of them. >> This permission makes me wonder if we need adjust_shared_perm() here >> and some other places. > > So just add this after every mkdir? > > if (shared_repository) > adjust_shared_perm(db_path); That reads as if the caller is saying "if we are in a shared repository, tweak the permission bits to make it sharable." Rather, think of "adjust_shared_perm(path)" as a declaration that you know "path" is something that needs to be accessible by those who needs write access to the repository. The caller does not need "if (shared_repository)"; the callee knows to become no-op.