{"thread":{"id":"64424","subject":"[Outreachy] - Proposal Submission for Refactor in order to reduce Git’s global state","startedAt":"2025-11-03T14:22:46Z","lastAt":"2025-11-03T14:22:46Z","messageCount":1,"participants":["Solomon Akpuru"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"530121","messageId":"CA+tvzBUr8ExMPLrNcppX9tiBvhrAG9RNwBU55evQgVvTrGzi4Q@mail.gmail.com","threadId":"64424","inReplyTo":null,"subject":"[Outreachy] - Proposal Submission for Refactor in order to reduce Git’s global state","fromName":"Solomon Akpuru","fromEmail":"solobarine@gmail.com","sentAt":"2025-11-03T14:22:32Z","receivedAt":"2025-11-03T14:22:46Z","isPatch":false,"sender":{"key":"solobarine@gmail.com","avatar":"https://avatars.githubusercontent.com/u/105935114?v=4"},"body":"Personal Bio\nName   Solomon (Solly) Akpuru\nGitHub  github.com/solobarine\nPortfolio solobarine.netlify.app\n_______________________________\n\nOverview\n\nThe Git codebase currently contains several global variables,\nparticularly in environment.c, that govern configuration and runtime\nstate. This architecture makes it harder to reason about concurrent\nrepository operations and limits scalability toward multi-repository\nsupport.\n\nThis project aims to refactor environment.c to reduce its global state\nby migrating relevant environment and configuration variables into\nstruct repository or struct repository_settings. This will improve\ncode maintainability, make the behavior more predictable, and pave the\nway for better isolation across repositories.\n________________________________\n\nMotivation\n\nReducing global state is a long-standing architectural goal within\nGit. It improves testability, reduces hidden side effects, and allows\nmultiple repositories to coexist in a single process safely — an\nincreasingly important concern for complex integrations and GUI\nclients.\n\nThe project continues the ongoing modernization efforts within Git’s\nenvironment and configuration management, aligning with recent patches\nthat relocated configuration options from global to repository-local\ncontexts.\n________________________________\n\nTechnical Goals\n\nAudit global variables in environment.c and related modules.\n\nIdentify variables suitable for migration into struct repository or\nstruct repository_settings.\n\nImplement refactors ensuring all code paths properly initialize and\nreference the repository-local state.\n\nMaintain full compatibility with existing functionality.\n\nUpdate and extend the test suite to cover modified logic.\n\nDocument the architectural rationale and the migration steps for\nfuture contributors.\n\n________________________________\n\nMethodology\n\nStudy prior commits where similar refactoring was done (e.g.,\nenvironment and config-related globals).\n\nUse static analysis and grep-based search to identify read/write\naccess patterns.\n\nRefactor incrementally, submitting each migration as an independent\npatch series.\n\nCollaborate actively on the Git mailing list, incorporating reviewer\nfeedback promptly.\n\nRely on Git’s existing CI/test infrastructure to validate changes.\n________________________________\n\nProject Timeline:\nDec 8 – Dec 21, 2025 Studying environment.c, mapping globals\nDec 22 – Jan 4, 2026 Implementing and submitting first patch series\nJan 5 – Feb 1, 2026    Extending refactors, handling interdependencies\nFeb 2 – Feb 15, 2026 Testing, documentation, and refinement\nFeb 16 – Mar 6, 2026  Final submission and wrap-up\n________________________________\n\nExpected Outcome\n\nSignificant reduction of global variables in Git’s environment handling.\n\nCleaner, more modular architecture for configuration and runtime data.\n\nImproved multi-repository handling capability.\n\nComprehensive documentation and test coverage to support future contributors.\n"}]}