Re: [PATCH v2 1/4] setup: expose enumerated repo info
- From
Stefan Beller <sbeller@google.com>
- Date
- Oct 30, 2017, 16:08 UTC
- Message-ID
- <CAGZ79kZdAvP5HWk4XqqUYdkorvEvoWYR32T3frrmnTXetU45Xg@mail.gmail.com>
- In-Reply-To
- <20171028181239.59458-2-sandals@crustytoothpaste.net>
On Sat, Oct 28, 2017 at 11:12 AM, brian m. carlson <sandals@crustytoothpaste.net> wrote:
Show 12 quoted lines
> We enumerate several different items as part of struct > repository_format, but then actually set up those values using the > global variables we've initialized from them. Instead, let's pass a > pointer to the structure down to the code where we enumerate these > values, so we can later on use those values directly to perform setup. > > This technique makes it easier for us to determine additional items > about the repository format (such as the hash algorithm) and then use > them for setup later on, without needing to add additional global > variables. We can't avoid using the existing global variables since > they're intricately intertwined with how things work at the moment, but > this improves things for the future.
yup. looks good to me.
Thanks, Stefan