git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 2/3] bisect: fix internal diff-tree config loading

From
Christian Couder <christian.couder@gmail.com>
Date
Mar 3, 2019, 17:59 UTC
Message-ID
<CAP8UFD0+MSaU4KmD_pfHnCDFoqr9H99Fp9tBP-Qw+vs+ambgFg@mail.gmail.com>
In-Reply-To
<20190222062133.GB10248@sigill.intra.peff.net>
On Fri, Feb 22, 2019 at 7:21 AM Jeff King <peff@peff.net> wrote:
Show 11 quoted lines
>
> When we run our internal diff-tree to show the bisected commit, we call
> init_revisions(), then load config, then setup_revisions(). But that
> order is wrong: we copy the configured defaults into the rev_info struct
> during the init_revisions step, so our config load wasn't actually doing
> anything.
>
> Signed-off-by: Jeff King <peff@peff.net>
> ---
> It does feel a little weird loading config at all here, since it would
> potentially affect other in-process operations.

I like that this patch fixes a bug, but this still triggers some wondering/comments.

Would it be better or at least less weird to load it at the beginning of `git bisect`?

Or is the real problem a limitation of the config system, that prevent us from temporarily loading, and then maybe unloading, some config?

> This is where an
> external process might be cleaner.

It depends on which definition of clean we use. Yeah, having many global variables and not caring because we launch many external processes that will "clean" things up when they exit can seem "clean" for some time. But I think we are past this point now, and I still wouldn't like us to go back to our previous way of doing things even here. So thanks for not using an external process.

Thanks for working on this, Christian.

Previous: Jeff KingNext: Jeff King
Message 6 of 14 in “git bisect - good vs bad output is different.”
  1. Bartosz BaranowskiFeb 21, 2019
  2. Junio C HamanoFeb 21, 2019
  3. 0/3 prettier bisect outputJeff King, Feb 22, 2019
  4. 1/3 bisect: use string arguments to feed internal diff-treeJeff King, Feb 22, 2019
  5. 2/3 bisect: fix internal diff-tree config loadingJeff King, Feb 22, 2019
  6. Christian CouderMar 3, 2019
  7. Jeff KingMar 5, 2019
  8. 3/3 bisect: make diff-tree output prettierJeff King, Feb 22, 2019
  9. Junio C HamanoFeb 22, 2019
  10. Jeff KingFeb 23, 2019
  11. Christian CouderMar 3, 2019
  12. Junio C HamanoFeb 22, 2019
  13. Christian CouderMar 3, 2019
  14. Jeff KingMar 5, 2019

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.