Re: [PATCHv4 01/27] repository: introduce raw object store field
- From
Duy Nguyen <pclouds@gmail.com>
- Date
- Feb 26, 2018, 23:59 UTC
- Message-ID
- <CACsJy8Csr+u9S5hs=jyEqpb3=4zpR8Ap9ks29jV4YFO1eSR5vQ@mail.gmail.com>
- In-Reply-To
- <CAGZ79kZDhoWWPpoENwvE6esxzdJvTnL4EAxGX5HV=DwDtDOEgw@mail.gmail.com>
On Tue, Feb 27, 2018 at 2:28 AM, Stefan Beller <sbeller@google.com> wrote:
Show 29 quoted lines
> On Mon, Feb 26, 2018 at 1:30 AM, Duy Nguyen <pclouds@gmail.com> wrote:
>> On Fri, Feb 23, 2018 at 04:47:28PM -0800, Stefan Beller wrote:
>>> /* The main repository */
>>> static struct repository the_repo = {
>>> - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, &the_index, &hash_algos[GIT_HASH_SHA1], 0, 0
>>> + NULL, NULL,
>>> + RAW_OBJECT_STORE_INIT,
>>> + NULL, NULL, NULL,
>>> + NULL, NULL, NULL,
>>> + &the_index,
>>> + &hash_algos[GIT_HASH_SHA1],
>>> + 0, 0
>>> };
>>> struct repository *the_repository = &the_repo;
>>
>> I wonder if we should do something like this. It makes the_repo
>> initialization easier to read and it helps unify the init code with
>> submodule.
>>
>> No don't reroll. If you think it's a good idea, you can do something
>> like this in the next series instead.
>>
>> -- 8< --
>> diff --git a/check-racy.c b/check-racy.c
>> index 24b6542352..47cbb4eb6d 100644
>> --- a/check-racy.c
>> +++ b/check-racy.c
>
> totally offtopic: Do we want to move this file into t/helper?No wonder both Jeff and I missed this program (he didn't convert it to use cmd_main, and I didn't move it to t/helper). This git-check-racy is added in 42f774063d (Add check program "git-check-racy" - 2006-08-15) and is not part of the default build. You need to manually update Makefile first to build it.
Right now it's broken (multiple definition of 'main'). If you add init_the_repository() or something similar, just leave this file untouched. Maybe I'll fix it later, separately. Or perhaps I'll move this functionality to git-update-index if this is still worth keeping.
-- Duy