Re: [PATCH v3 00/20] Introduce `USE_THE_REPOSITORY_VARIABLE` macro
- From
Karthik Nayak <karthik.188@gmail.com>
- Date
- Jun 18, 2024, 20:22 UTC
- Message-ID
- <CAOLa=ZSVJsPvQOnC7byRdpo7eJZRFOiSq=Rzio8QRvW_A3StOg@mail.gmail.com>
- In-Reply-To
- <cover.1718347699.git.ps@pks.im>
Patrick Steinhardt <ps@pks.im> writes:
Show 26 quoted lines
> Hi, > > this is the third version of my patch series that introduces the > `USE_THE_REPOSITORY_VARIABLE` macro. When unset, this will cause us to > hide `the_repository`, `the_hash_algo` and several other functions that > implicitly rely on those global variables from our headers. This is a > first step towards fully getting rid of this global state in favor of > passing it down explicitly via function parameters. > > Changes compared to v2: > > - Note in a commit message that we aim to have a faithful conversion > when introducing a `struct git_hash_algo` parameter to functions. So > even in case the calling context has a `struct git_hash_algo` > available via a local repository, we still use `the_repository` such > that there cannot be a change in behaviour here. Fixing those sites > will be left for a future patch series such that we can avoid any > kind of regressions caused by this comparatively large refactoring. > I also adapted some conversions to fully follow through with this > intent. > > - Fix an issue with sparse by adding another `extern` declaration of > `the_repository` to "repository.c". > > Thanks! >
I forgot to reply here earlier.
I went through the patches and only found 2 small typos, overall this was an elaborate set of patches. I don't expect a reroll for that however. Thanks!