threads / patch / 56127

patchrefs/debug: quote prefix

Subject: [PATCH] refs/debug: quote prefix

## tl;dr

One message between Jul 19, 2021 and Jul 19, 2021. Diffs are folded; open one to read it.

replies: 0people: 1as markdown or json

Han-Wen Nienhuys via GitGitGadget· Jul 19, 2021, 17:53 UTC · lore
From: Han-Wen Nienhuys <hanwen@google.com>
This makes the empty prefix ("") stand out better.
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
---
    refs/debug: quote prefix
    
    This makes the empty prefix ("") stand out better.
    
    Signed-off-by: Han-Wen Nienhuys hanwen@google.com
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-1053%2Fhanwen%2Fquote-prefix-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-1053/hanwen/quote-prefix-v1
Pull-Request: https://github.com/git/git/pull/1053
 refs/debug.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Show changes to refs/debug.c +2 −1
diff --git a/refs/debug.c b/refs/debug.c
index 7db4abccc34..1a7a9e11cfa 100644
--- a/refs/debug.c
+++ b/refs/debug.c
@@ -232,7 +232,8 @@ debug_ref_iterator_begin(struct ref_store *ref_store, const char *prefix,
 	struct debug_ref_iterator *diter = xcalloc(1, sizeof(*diter));
 	base_ref_iterator_init(&diter->base, &debug_ref_iterator_vtable, 1);
 	diter->iter = res;
-	trace_printf_key(&trace_refs, "ref_iterator_begin: %s (0x%x)\n", prefix, flags);
+	trace_printf_key(&trace_refs, "ref_iterator_begin: \"%s\" (0x%x)\n",
+			 prefix, flags);
 	return &diter->base;
 }
 

base-commit: 75ae10bc75336db031ee58d13c5037b929235912
-- 
gitgitgadget

← back to recent threads