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

Re: [Outreachy][Proposal]: Refactor in order to reduce Git’s global state

From
Bello Olamide <belkid98@gmail.com>
Date
Oct 31, 2025, 11:43 UTC
Message-ID
<CAD=f0L8aMT+Qjgk4Gij1fVCVjKSyGfWS_tb6O54PT1=4KpbRJA@mail.gmail.com>
In-Reply-To
<CAP8UFD1v7yec7JwBGekJPvcq7kNJPuPTgWOVn+gBaw1+Sh2mdA@mail.gmail.com>

On Thu, 30 Oct 2025 at 13:55, Christian Couder <christian.couder@gmail.com> wrote:

Show 22 quoted lines
>
> > Yes there were cases where the functions were adapted to use
> > exactly what it needs down the call chain rather than writing new
> > accessor functions.
> > An example is
> > https://public-inbox.org/git/20250306-b4-pks-objects-without-the-repository-v2-1-f3465327be69@pks.im/#Z31csum-file.h
> > where the global variable `the_hash_algo` is replaced with an explicit parameter
> > `const struct git_hash_algo *algo` in low-level functions such as
> > `static struct hashfile *hashfd_internal()` and the call sites adapted
> > to use r->hash_algo
> > or the_repository->hash_algo in places where the subsystem has not gotten rid of
> > `the-repository`.
> >
> > This is also a strategy that can be used to replace global variables.
>
> Your answers are appreciated, but, just to be clear, I think it would
> be nice if the answers to my questions like this one were part of a v2
> of your proposal. If I don't see a v2, I am less tempted to discuss
> this further (which could hopefully help move the analysis forward and
> make your proposal better).
>
> Thanks.

Hello Christian Thank you very much. I have added the answers to your question and submitted a v2 of the proposal.

Bello
Previous: Christian CouderNext: Olamide Caleb Bello
Message 5 of 7 in “[Outreachy][Proposal]: Refactor in order to reduce Git’s global state”
  1. Bello OlamideOct 29, 2025
  2. Christian CouderOct 29, 2025
  3. Bello OlamideOct 30, 2025
  4. Christian CouderOct 30, 2025
  5. Bello OlamideOct 31, 2025
  6. =?y?q?=5BOutreachy=5D=5BProposal=20v2=5D=3A=20Refactor=20in=20order=20to=20reduce=20Git=E2=80=99s=20global=20state?=Olamide Caleb Bello, Oct 30, 2025
  7. Bello OlamideNov 1, 2025

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.