Re: [PATCH v3 2/7] invalidate_ref_cache(): take the submodule as parameter
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Nov 3, 2011, 18:57 UTC
- Message-ID
- <7vr51pf30i.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <4EB26BA0.9030609@alum.mit.edu>
Michael Haggerty <mhagger@alum.mit.edu> writes:
Show 9 quoted lines
> Sorry I didn't respond to this earlier. > > The public API convention (which predates my changes) is that "char > *submodule" arguments either point at the relative path to the submodule > or are NULL to denote the main module. But since these are stored > internally in a name[FLEX_ARRAY] field, I have been using "" internally > to denote the main module. I believe that everything is done correctly, > but I admit that the use of different conventions internally and > externally is a potential source of programming errors.
Yes, it would have been better if the original also used "". After all, that would make it more consistent---"sub/" means the repository goverend by "sub/.git", and "" would mean the repository governed by ".git".
Is it hard to change to do so now, given that we won't be rushing this for the upcoming release and we have plenty of time?