Re: [PATCH 00/31] repository object
- From
Stefan Beller <sbeller@google.com>
- Date
- May 31, 2017, 22:56 UTC
- Message-ID
- <CAGZ79kYMs6XS8kcoWVZDes7W_J1B86dYm-8rhkJPzUmoqjyTng@mail.gmail.com>
- In-Reply-To
- <20170531214417.38857-1-bmwill@google.com>
On Wed, May 31, 2017 at 2:43 PM, Brandon Williams <bmwill@google.com> wrote:
Show 15 quoted lines
> Given the vast interest expressed when I sent out my RFC series I decided it > would be worth it to invest more time to making a repository object a reality. > > This series is an extension of the last series I sent out (in that ls-files is > converted to working on submodules in-process using repository objects instead > of spawning a child process to do the work). The big difference from the RFC > series is that I went through and did the work to migrate key repository state > from global variables in 'environment.c' to being stored in a repository object > itself. I migrated the bits of state that seemed reasonable for this series, > there is still a lot of global state which could be migrated in the future. > > I do think that we need to be slightly cautious about moving global state into > the repository object though, I don't want 'struct repo' to simply become a > kitchen sink where everything gets dumped. But this is just a warning for the > future.
Or in other words: You want to have another struct e.g. 'the_command_line_arguments', which would carry the verbosity/color options for example as they are not related to a repo object, but to the current command being run?
Show 5 quoted lines
> Since this is a v1 I'm fairly certain that it still has a lot of rough edges > (like I think I need to write better commit messages, and we should probably > have more comments documenting object fields/contract) but I want to get the > review process started sooner rather than later since I'm sure people will have > opinions (e.g. should it be called 'struct repo' or 'struct repository'?!).
IMHO this is the most obvious, but bikesheddable part of the series. ;) Keep it short as everyone knows what a 'repo' is.