Re: [PATCH v4 14/15] files-backend: remove submodule_allowed from files_downcast()
- From
Duy Nguyen <pclouds@gmail.com>
- Date
- Feb 21, 2017, 13:25 UTC
- Message-ID
- <CACsJy8CqHo_sCz0mFasvWJBP_cwWUu-dccowvtWs4pMoc5uLiQ@mail.gmail.com>
- In-Reply-To
- <25fcb527-595a-7865-41e3-ee7c4c1ad668@alum.mit.edu>
On Mon, Feb 20, 2017 at 7:11 PM, Michael Haggerty <mhagger@alum.mit.edu> wrote:
Show 13 quoted lines
> On 02/18/2017 02:33 PM, Nguyễn Thái Ngọc Duy wrote: >> Since submodule or not is irrelevant to files-backend after the last >> patch, remove the parameter from files_downcast() and kill >> files_assert_main_repository(). >> >> PS. This implies that all ref operations are allowed for submodules. But >> we may need to look more closely to see if that's really true... > > I think you are jumping the gun here. > > Even after your changes, there is still a significant difference between > the main repository and submodules: we have access to the object > database for the main repository, but not for submodules.
I did jump the gun for another reason: files-backend makes function calls to the frontend, which unconditionally target the main ref store (e.g. resolve_ref_unsafe, delete_ref...). Of course, because store-aware api does not exist. My decision (off-list) to add test-ref-store was the right call. I would not have seen these because I was not (and still am not) familiar with files-backend.c enough to see its dark corners.
files-backend.c is not all unicorn and rainbow :(
-- Duy