Skip to content

Commit 582e13f

Browse files
authored
Merge pull request #827 from git/gsoc-2026-suggestions
Some tweaks to ideas and microprojects
2 parents fe56a9b + 72ca695 commit 582e13f

File tree

2 files changed

+29
-42
lines changed

2 files changed

+29
-42
lines changed

SoC-2026-Ideas.md

Lines changed: 29 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -33,28 +33,35 @@ the same.
3333

3434
This project focuses on modernizing Git's environment handling by refactoring
3535
the `environment.c` code to reduce global state. The goal is to move environment
36-
variables and configuration from global scope into more appropriate local
37-
contexts, primarily into the `struct repository` / `struct repository_settings`
38-
structure. This architectural improvement will make the codebase more
39-
maintainable and potentially enable better multi-repository handling in the
40-
future.
41-
42-
The project involves careful refactoring of Git's core environment
43-
handling code, requiring strong C programming skills and attention to
44-
detail. Design discussions on the mailing list to find the best way to
45-
refactor some variables will likely happen.
46-
47-
The contributor will identify global variables that can be moved to
48-
local scope, implement the necessary structural changes, and ensure
49-
all affected code paths continue to work correctly. This includes
50-
updating tests, fixing any regressions, and documenting the
51-
architectural changes.
52-
53-
**Getting started:** Build Git from source, study the `environment.c` file
54-
and its global variables, understand how `struct repository` and
55-
`struct repository_settings` work, and submit a micro-patch to demonstrate
56-
familiarity with the codebase. Review recent mailing list discussions about
57-
reducing global state.
36+
variables and configuration from global scope into more appropriate local contexts.
37+
This architectural improvement will make the codebase more maintainable and
38+
potentially enable better multi-repository handling in the future.
39+
40+
> Note: While `struct repository` / `struct repository_settings` may seem like a
41+
> natural target for this refactoring, contributors should be cautious about moving
42+
> settings there. `struct repository_setting`s` was originally designed to hold
43+
> config settings that are lazily parsed. Moving eagerly parsed config settings
44+
> into that struct can cause Git to die in unexpected places when lazy parsing
45+
> fails on an invalid config setting. Any such move requires careful analysis
46+
> and should not be done as a blanket approach.
47+
48+
The project involves careful refactoring of Git's core environment handling code,
49+
requiring strong C programming skills and attention to detail. Design discussions
50+
on the mailing list to find the best way to refactor individual variables will
51+
likely happen.
52+
53+
The contributor will identify global variables that can be moved to local scope,
54+
implement the necessary structural changes, and ensure all affected code paths
55+
continue to work correctly. This includes updating tests, fixing any regressions,
56+
and documenting the architectural changes.
57+
58+
**Getting started**: Build Git from source, study the `environment.c` file and its
59+
global variables, and understand how `struct repository` and `struct repository_settings`
60+
work. For a concrete example of the kind of work this project involves, review
61+
[Bello Caleb Olamide's Outreachy project](https://lore.kernel.org/all/48821a3848bef25c13038be8377ad73e7c17a924.1771258573.git.belkid98@gmail.com/)
62+
to get a sense of the approach and subtleties involved. Submit a micro-patch
63+
to demonstrate familiarity with the codebase, and review recent mailing
64+
list discussions about reducing global state.
5865

5966
_Expected Project Size_: 90 or 175 hours or 350 hours
6067

SoC-2026-Microprojects.md

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -73,15 +73,6 @@ It is easy though to find examples of how this can be done by
7373
searching the code base and the mailing list archive, as this has
7474
already been done for a number of languages.
7575

76-
### Replace a run_command*() call by direct calls to C functions
77-
78-
See for example what Junio did in
79-
[ffcb4e94d3](https://github.com/git/git/commit/ffcb4e94d3) (bisect: do
80-
not run show-branch just to show the current commit, 2021-07-27).
81-
82-
If you can't find one please tell us, along with the command you used
83-
to search, so that we can remove this microproject idea.
84-
8576
### Avoid suppressing `git`'s exit code in test scripts
8677

8778
The Git project uses a large collection of integration tests written in
@@ -141,17 +132,6 @@ to search, so that we can remove this microproject idea.
141132
[git-t]: https://github.com/git/git/tree/master/t
142133
[wikipedia-pipes]: https://en.wikipedia.org/wiki/Pipeline_(Unix)
143134

144-
### Use unsigned integral type for collection of bits.
145-
146-
Pick one field of a structure that (1) is of signed integral type and (2) is
147-
used as a collection of multiple bits. Discuss if there is a good reason
148-
why it has to be a signed integral field and change it to an unsigned
149-
type otherwise. [[thread](https://public-inbox.org/git/xmqqsiebrlez.fsf@gitster.dls.corp.google.com)]
150-
151-
Even though the amount of code to write is small, these projects
152-
involve a lot of prior work to understand the specification and deal
153-
with all potential corner-cases.
154-
155135
### Modernize a test script
156136

157137
A number of our test scripts have been written a long time ago in a

0 commit comments

Comments
 (0)