Re: [RFC PATCH v2 09/12] submodule: support reading .gitmodules even when it's not checked out
- From
Stefan Beller <sbeller@google.com>
- Date
- Aug 2, 2018, 20:27 UTC
- Message-ID
- <CAGZ79kZABbh6bP1TD8gkx_051yo-=bLJq1XvJz9xUKdBKAPssg@mail.gmail.com>
- In-Reply-To
- <20180802134634.10300-10-ao2@ao2.it>
On Thu, Aug 2, 2018 at 6:47 AM Antonio Ospite <ao2@ao2.it> wrote:
Show 9 quoted lines
> > When the .gitmodules file is not available in the working tree, try > using HEAD:.gitmodules from the current branch. This covers the case > when the file is part of the repository but for some reason it is not > checked out, for example because of a sparse checkout. > > This makes it possible to use at least the 'git submodule' commands > which *read* the gitmodules configuration file without fully populating > the working tree.
The reading part shows how nice our internal config system is, once everything is put in place.
> Writing to .gitmodules will still require that the file is checked out, > so check for that before calling config_set_in_gitmodules_file_gently.