Re: [PATCH v2 01/18] setup: replace use of `the_repository` in static functions
- From
Karthik Nayak <karthik.188@gmail.com>
- Date
- May 19, 2026, 08:03 UTC
- Message-ID
- <CAOLa=ZQkj=__pALxUxbqzh9h-RVO8nC=23h0Sb=gnF-ahHHzCQ@mail.gmail.com>
- In-Reply-To
- <20260518-pks-setup-wo-the-repository-v2-1-6933c0f1d568@pks.im>
Patrick Steinhardt <ps@pks.im> writes:
Show 5 quoted lines
> Replace the use of `the_repository` in "setup.c" for all static > functions. For now, we simply add `the_repository` to invocations of > these functions. This will be addressed in subsequent commits, where > we'll move up `the_repository` one more layer to callers of "setup.c". >
This commit is straight forward. We simply pass forward the `the_repository` variable to static functions, so they have an incoming `strict repository *`. I like this approach of:
1. Fixing up all static functions in a file to no longer use `the_repository`. 2. Fixing up the other external functions one-by-one to receive a `struct repository *`. 3. Fixing up any other global variables / config used.
Makes it easy to follow.
[snip]