Re: cgit and global configuration
- From
Christian Hesse <mail@eworm.de>
- Date
- Oct 25, 2019, 16:10 UTC
- Message-ID
- <20191025181015.50bf2b92@leda>
- In-Reply-To
- <20190612190845.GA14949@sigill.intra.peff.net>
Jeff King <peff@peff.net> on Wed, 2019/06/12 15:08:
Show 22 quoted lines
> On Tue, Jun 11, 2019 at 04:22:32PM -0400, Jeff Hostetler wrote: > > > As for going forward, I see 3 options: > > > > [1] update your tests to allow this. (I didn't dig thru your > > tests to see how extensive this might be.) > > > > [2] define your own version of common-main.c and link with it > > instead of git/common-main.c and delete the calls to trace2_*() > > in it. > > > > [3] define your own version of common-main.c and then call your > > prepare_repo_env() prior to trace2_initialize(). > > > > Granted, I've only spent 15 minutes looking at your code, so > > I may be mistaken about several things, but I think those are > > your options. > > After reading the original report, my instinct was that (2) or (3) is > probably the right way forward. We could make it a little easier for > them by splitting up common-main a bit into two parts: > [...]
We decided to go another way and introduced a constructor function which does initial environment setup:
https://git.zx2c4.com/cgit/commit/?id=034e3c7d56ba71ce281886fe8525b16d4559fac1
Everything (including tests) is happy with that.
-- Best regards, Chris