Re: [PATCH 01/14] progress: stop using `the_repository`
- From
Karthik Nayak <karthik.188@gmail.com>
- Date
- Dec 31, 2024, 06:42 UTC
- Message-ID
- <CAOLa=ZRgzD8SPpfKcF5Ztr1f4oVfjP7HumvSVTTLbdLWW7PmSQ@mail.gmail.com>
- In-Reply-To
- <20241217-pks-use-the-repository-conversion-v1-1-0dba48bcc239@pks.im>
Patrick Steinhardt <ps@pks.im> writes:
Show 5 quoted lines
> Stop using `the_repository` in the "progress" subsystem by passing in a > repository when initializing `struct progress`. Furthermore, store a > pointer to the repository in that struct so that we can pass it to the > trace2 API when logging information. >
So that's the only usage of `the_repository` in the progress subsystem currently. Makes sense.
Show 5 quoted lines
> Adjust callers accordingly by using `the_repository`. While there may be > some callers that have a repository available in their context, this > trivial conversion allows for easier verification and bubbles up the use > of `the_repository` by one level. >
I think this is a good approach. I would be vary if we ended up introducing more instances of the `USE_THE_REPOSITORY_VARIABLE` definition. But that's not the case here, we only do so in `t/helper/test-progress.c`, which is expected. The patch looks good!