Re: [PATCH v6 17/27] refs: move submodule code out of files-backend.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 03/20/2017 01:09 PM, Duy Nguyen wrote:
> On Mon, Mar 20, 2017 at 4:05 AM, Michael Haggerty <mhagger@xxxxxxxxxxxx> wrote:
>>> [...]
>>> diff --git a/refs/refs-internal.h b/refs/refs-internal.h
>>> index f732473e1d..dfa1817929 100644
>>> --- a/refs/refs-internal.h
>>> +++ b/refs/refs-internal.h
>>> @@ -482,12 +482,11 @@ struct ref_store;
>>>  /* refs backends */
>>>
>>>  /*
>>> - * Initialize the ref_store for the specified submodule, or for the
>>> - * main repository if submodule == NULL. These functions should call
>>> - * base_ref_store_init() to initialize the shared part of the
>>> - * ref_store and to record the ref_store for later lookup.
>>> + * Initialize the ref_store for the specified gitdir. These functions
>>> + * should call base_ref_store_init() to initialize the shared part of
>>> + * the ref_store and to record the ref_store for later lookup.
>>
>> Maybe mention that the function will make its own copy of `gitdir`?
> 
> I would think that's the default/sane behavior and not need to be
> mentioned? A function that keeps a pointer even after it exits, now
> that's something that must be documented.

I guess you're right, and I hope that everybody really documents such cases.

Michael




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]