@@ -281,3 +281,93 @@ very welcome.
281281 - Language: sh
282282 - Difficulty: medium
283283 - Possible mentors: Michael Haggerty
284+
285+ ### ` git config ` improvements
286+
287+ This project proposes the following two improvements to ` git config ` .
288+ Please note that this project has a significant "political" component
289+ to it, because some of the details of the features will be
290+ controversial.
291+
292+ #### Unsetting configuration options
293+
294+ Some Git configuration options have an effect by their mere existence.
295+ (I.e., setting the option to "false" or the empty string is different
296+ than leaving it unset altogether.) Also, some configuration options
297+ can take multiple values.
298+
299+ However, there is no way for an option file to "unset" an option--that
300+ is, to change the option back to "unset". This is awkward, because
301+ configuration values are read from various places (` /etc/gitconfig ` ,
302+ ` ~/.config/git/config ` or ` ~/.gitconfig ` , and ` $GIT_DIR/config ` , plus
303+ perhaps files that are included by other configuration files).
304+ Therefore, if an option is set in one of the earlier files, there is
305+ no way for it to be unset in a later one. The unwanted option might
306+ have even been set in a file like ` /etc/gitconfig ` that the user
307+ doesn't have permission to modify.
308+
309+ It would be nice to have a syntax that can be used to unset any
310+ previously-defined values for an option. Perhaps
311+
312+ [section "subsection"]
313+ !option
314+
315+ The above is currently currently a syntax error that causes Git to
316+ terminate, so some thought has to go into a transition plan for
317+ enabling this feature. Maybe a syntax has to be invented that
318+ conforms to the current format, like
319+
320+ [unset]
321+ name = section.subsection.option
322+
323+ Because options are currently processed as they are read, this change
324+ will require the code that reads options files to be changed
325+ significantly.
326+
327+ Leave yourself a lot of time to attain a consensus on the mailing list
328+ about how this can be done while retaining reasonable backwards
329+ compatibility.
330+
331+ #### Tidy configuration files
332+
333+ When a configuration file is repeatedly modified, often garbage is
334+ left behind. For example, after
335+
336+ git config my.option true
337+ git config --unset my.option
338+ git config my.option true
339+ git config --unset my.option
340+
341+ the bottom of the configuration file is left with the useless lines
342+
343+ [my]
344+ [my]
345+
346+ It would be nice to clean up such garbage when rewriting the
347+ configuration file. This project is a bit tricky because of the
348+ possible presence of comments. For example, what if an empty section
349+ looks like this:
350+
351+ [my]
352+ # This section is for my own private settings
353+
354+ or this:
355+
356+ [my]
357+ # This section is for my own private settings
358+
359+ or this:
360+
361+ # This section is for my own private settings:
362+ [my]
363+
364+ ? In some such cases it might be desireable either to retain the
365+ section even though it is empty, or to delete the comment along with
366+ the section. Very likely there will be some obvious patterns when
367+ everybody agrees that an empty section can be deleted, and other, more
368+ controversial cases where you will have to reach a consensus on the
369+ mailing list about what should be done.
370+
371+ - Language: C
372+ - Difficulty: medium
373+ - Possible mentors: Michael Haggerty
0 commit comments