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

[PATCH] refs: dereference the value of the required pointer

From
AGAZero13 via GitGitGadget <gitgitgadget@gmail.com>
Date
Dec 18, 2025, 16:10 UTC
Message-ID
<pull.2130.git.git.1766074249443.gitgitgadget@gmail.com>
From: Greg Funni <gfunni234@gmail.com>
Currently, this always prints yes because required is non-null.

This is the wrong behavior. The boolean must be dereferenced.

Signed-off-by: Greg Funni <gfunni234@gmail.com>
---
    refs: dereference the value of the required pointer
    
    Currently, this always prints yes because required is non-null.
    
    This is the wrong behavior. The boolean must be dereferenced.
    
    Signed-off-by: Greg Funni gfunni234@gmail.com
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-2130%2FAZero13%2Fref-cache-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-2130/AZero13/ref-cache-v1
Pull-Request: https://github.com/git/git/pull/2130
 refs/debug.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/refs/debug.c b/refs/debug.c
index 3e31228c9a..639db0f26e 100644
--- a/refs/debug.c
+++ b/refs/debug.c
@@ -139,7 +139,7 @@ static int debug_optimize_required(struct ref_store *ref_store,
 	struct debug_ref_store *drefs = (struct debug_ref_store *)ref_store;
 	int res = drefs->refs->be->optimize_required(drefs->refs, opts, required);
 	trace_printf_key(&trace_refs, "optimize_required: %s, res: %d\n",
-			 required ? "yes" : "no", res);
+			 *required ? "yes" : "no", res);
 	return res;
 }
 

base-commit: c4a0c8845e2426375ad257b6c221a3a7d92ecfda
-- 
gitgitgadget
Next: Junio C Hamano
Message 1 of 4 in “refs: dereference the value of the required pointer”
  1. refs: dereference the value of the required pointerAZero13 via GitGitGadget, Dec 18, 2025
  2. Junio C HamanoDec 19, 2025
  3. Karthik NayakDec 25, 2025
  4. Patrick SteinhardtDec 19, 2025

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.