aboutsummaryrefslogtreecommitdiff
path: root/refs/debug.c
diff options
context:
space:
mode:
authorGreg Funni <gfunni234@gmail.com>2025-12-18 16:10:49 +0000
committerJunio C Hamano <gitster@pobox.com>2025-12-19 12:55:38 +0900
commit46d0ee2d6996779bf33acb83e36240443e27c79e (patch)
treebde70e6e582945ae287a4ade0696355b56123cae /refs/debug.c
parent28b83e6f08ae022d54d79e518e72933ae0930091 (diff)
downloadgit-46d0ee2d6996779bf33acb83e36240443e27c79e.tar.xz
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> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'refs/debug.c')
-rw-r--r--refs/debug.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/refs/debug.c b/refs/debug.c
index 36f8c58b6c..f3d1079a2c 100644
--- a/refs/debug.c
+++ b/refs/debug.c
@@ -131,7 +131,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;
}