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

[PATCH v2 1/2] repo: zero-initialize configuration values

From
JGJoy Gundu via GitGitGadget <gitgitgadget@gmail.com>
Date
Oct 22, 2026, 09:47 UTC
Message-ID
<df93a2a86cae7d342270c0ee67a1c0d41ada202e.1792662432.git.gitgitgadget@gmail.com>
In-Reply-To
<pull.2271.v2.git.1792662432.gitgitgadget@gmail.com>
From: Joy Gundu <soniqjjj@gmail.com>
Signed-off-by: Joy Gundu <soniqjjj@gmail.com>
---
 environment.c | 14 ++------------
 1 file changed, 2 insertions(+), 12 deletions(-)
diff --git a/environment.c b/environment.c
index c83cf44839..89af09aa40 100644
--- a/environment.c
+++ b/environment.c
@@ -752,34 +752,24 @@ int git_default_config(const char *var, const char *value,
 
 void repo_config_values_init(struct repo_config_values *cfg)
 {
+	memset(cfg, 0, sizeof(*cfg));
+
 	/* section "core" config values */
-	cfg->attributes_file = NULL;
-	cfg->excludes_file = NULL;
-	cfg->editor_program = NULL;
-	cfg->pager_program = NULL;
-	cfg->askpass_program = NULL;
-	cfg->apply_default_whitespace = NULL;
-	cfg->apply_default_ignorewhitespace = NULL;
 	cfg->push_default = PUSH_DEFAULT_UNSPECIFIED;
 	cfg->autorebase = AUTOREBASE_NEVER;
 	cfg->object_creation_mode = OBJECT_CREATION_MODE;
-	cfg->apply_sparse_checkout = 0;
 	cfg->trust_ctime = 1;
 	cfg->check_stat = 1;
 	cfg->zlib_compression_level = Z_BEST_SPEED;
 	cfg->pack_compression_level = Z_DEFAULT_COMPRESSION;
 	cfg->precomposed_unicode = -1; /* see probe_utf8_pathname_composition() */
-	cfg->core_sparse_checkout_cone = 0;
 	cfg->warn_on_object_refname_ambiguity = 1;
 	cfg->protect_hfs = PROTECT_HFS_DEFAULT;
 	cfg->protect_ntfs = PROTECT_NTFS_DEFAULT;
-	cfg->ignore_case = 0;
 	cfg->trust_executable_bit = 1;
 	cfg->has_symlinks = platform_has_symlinks();
-	cfg->use_nanosec = 0;
 
 	/* section "sparse" config values */
-	cfg->sparse_expect_files_outside_of_patterns = 0;
 
 	/* section "branch" config values */
 	cfg->branch_track = BRANCH_TRACK_REMOTE;
-- 
gitgitgadget
Previous: Joy via GitGitGadgetNext: Patrick Steinhardt
Message 6 of 16 in “config: move pack size limit into repo config”
  1. config: move pack size limit into repo configJoy via GitGitGadget, Oct 20, 2026
  2. Kristoffer HaugsbakkOct 20, 2026
  3. Patrick SteinhardtOct 21, 2026
  4. Joie JoieOct 21, 2026
  5. 0/2 config: move pack size limit into repo configJoy via GitGitGadget, Oct 22, 2026
  6. 1/2 repo: zero-initialize configuration valuesJoy Gundu via GitGitGadget, Oct 22, 2026
  7. Patrick SteinhardtOct 22, 2026
  8. Joie JoieOct 23, 2026
  9. Patrick SteinhardtOct 26, 2026
  10. 2/2 config: move pack size limit into repo configJoy Gundu via GitGitGadget, Oct 22, 2026
  11. Patrick SteinhardtOct 22, 2026
  12. Patrick SteinhardtOct 22, 2026
  13. 0/2 [Outreachy] config: move pack size limit into repo configJoy via GitGitGadget, Nov 3, 2026
  14. 1/2 repo: zero-initialize configuration valuesJoy Gundu via GitGitGadget, Nov 3, 2026
  15. 2/2 config: move pack size limit into repo configJoy Gundu via GitGitGadget, Nov 3, 2026
  16. Tanga JorisNov 5, 2026

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.