From: Michael Haggerty Date: Tue, 10 Apr 2018 13:36:54 GMT Subject: Re: [PATCH 07/16] refs: add repository argument to get_main_ref_store Message-ID: In-Reply-To: <20180409224533.17764-8-sbeller@google.com> On 04/10/2018 12:45 AM, Stefan Beller wrote: > Add a repository argument to allow the get_main_ref_store caller > to be more specific about which repository to handle. This is a small > mechanical change; it doesn't change the implementation to handle > repositories other than the_repository yet. > > As with the previous commits, use a macro to catch callers passing a > repository other than the_repository at compile time. This seems OK to me from a refs perspective. The macro trick is surprising. I guess it gets you a compile-time check, under the assumption that nothing else is called `the_repository`. But why actually commit the macro, as opposed to compiling once locally to check for correctness, then maybe add something like `assert(r == the_repository)` for the actual commit? But I don't care either way, since the macro disappears again soon. Michael