git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Solomon Akpuru <solobarine@gmail.com>
To: git@vger.kernel.org
Subject: [Outreachy] - Proposal Submission for Refactor in order to reduce Git’s global state
Date: Mon, 3 Nov 2025 15:22:32 +0100	[thread overview]
Message-ID: <CA+tvzBUr8ExMPLrNcppX9tiBvhrAG9RNwBU55evQgVvTrGzi4Q@mail.gmail.com> (raw)

Personal Bio
Name   Solomon (Solly) Akpuru
GitHub  github.com/solobarine
Portfolio solobarine.netlify.app
_______________________________

Overview

The Git codebase currently contains several global variables,
particularly in environment.c, that govern configuration and runtime
state. This architecture makes it harder to reason about concurrent
repository operations and limits scalability toward multi-repository
support.

This project aims to refactor environment.c to reduce its global state
by migrating relevant environment and configuration variables into
struct repository or struct repository_settings. This will improve
code maintainability, make the behavior more predictable, and pave the
way for better isolation across repositories.
________________________________

Motivation

Reducing global state is a long-standing architectural goal within
Git. It improves testability, reduces hidden side effects, and allows
multiple repositories to coexist in a single process safely — an
increasingly important concern for complex integrations and GUI
clients.

The project continues the ongoing modernization efforts within Git’s
environment and configuration management, aligning with recent patches
that relocated configuration options from global to repository-local
contexts.
________________________________

Technical Goals

Audit global variables in environment.c and related modules.

Identify variables suitable for migration into struct repository or
struct repository_settings.

Implement refactors ensuring all code paths properly initialize and
reference the repository-local state.

Maintain full compatibility with existing functionality.

Update and extend the test suite to cover modified logic.

Document the architectural rationale and the migration steps for
future contributors.

________________________________

Methodology

Study prior commits where similar refactoring was done (e.g.,
environment and config-related globals).

Use static analysis and grep-based search to identify read/write
access patterns.

Refactor incrementally, submitting each migration as an independent
patch series.

Collaborate actively on the Git mailing list, incorporating reviewer
feedback promptly.

Rely on Git’s existing CI/test infrastructure to validate changes.
________________________________

Project Timeline:
Dec 8 – Dec 21, 2025 Studying environment.c, mapping globals
Dec 22 – Jan 4, 2026 Implementing and submitting first patch series
Jan 5 – Feb 1, 2026    Extending refactors, handling interdependencies
Feb 2 – Feb 15, 2026 Testing, documentation, and refinement
Feb 16 – Mar 6, 2026  Final submission and wrap-up
________________________________

Expected Outcome

Significant reduction of global variables in Git’s environment handling.

Cleaner, more modular architecture for configuration and runtime data.

Improved multi-repository handling capability.

Comprehensive documentation and test coverage to support future contributors.


                 reply	other threads:[~2025-11-03 14:23 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CA+tvzBUr8ExMPLrNcppX9tiBvhrAG9RNwBU55evQgVvTrGzi4Q@mail.gmail.com \
    --to=solobarine@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).