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

[PATCH v2 2/3] refs: print error message in debug output

From
Han-Wen Nienhuys via GitGitGadget <gitgitgadget@gmail.com>
Date
Dec 22, 2021, 18:11 UTC
Message-ID
<b189f8661e22a7e8d3f4a0dfd3ed32ae14b49e0b.1640196714.git.gitgitgadget@gmail.com>
In-Reply-To
<pull.1163.v2.git.git.1640196714.gitgitgadget@gmail.com>
From: Han-Wen Nienhuys <hanwen@google.com>
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
---
 refs/debug.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/refs/debug.c b/refs/debug.c
index 791423c6a7d..8a6bb157ee6 100644
--- a/refs/debug.c
+++ b/refs/debug.c
@@ -47,7 +47,8 @@ static int debug_transaction_prepare(struct ref_store *refs,
 	transaction->ref_store = drefs->refs;
 	res = drefs->refs->be->transaction_prepare(drefs->refs, transaction,
 						   err);
-	trace_printf_key(&trace_refs, "transaction_prepare: %d\n", res);
+	trace_printf_key(&trace_refs, "transaction_prepare: %d \"%s\"\n", res,
+			 err->buf);
 	return res;
 }
 
-- 
gitgitgadget
Previous: Han-Wen Nienhuys via GitGitGadgetNext: Han-Wen Nienhuys via GitGitGadget
Message 8 of 10 in “tweaks to refs/debug.c”
  1. 0/2 tweaks to refs/debug.cHan-Wen Nienhuys via GitGitGadget, Dec 21, 2021
  2. 1/2 refs: print error message in debug outputHan-Wen Nienhuys via GitGitGadget, Dec 21, 2021
  3. 2/2 refs: set the repo in debug_ref_store.baseHan-Wen Nienhuys via GitGitGadget, Dec 21, 2021
  4. Junio C HamanoDec 22, 2021
  5. Han-Wen NienhuysDec 22, 2021
  6. 0/3 tweaks to refs/debug.cHan-Wen Nienhuys via GitGitGadget, Dec 22, 2021
  7. 1/3 refs: pass gitdir to packed_ref_store_createHan-Wen Nienhuys via GitGitGadget, Dec 22, 2021
  8. 2/3 refs: print error message in debug outputHan-Wen Nienhuys via GitGitGadget, Dec 22, 2021
  9. 3/3 refs: centralize initialization of the base ref_store.Han-Wen Nienhuys via GitGitGadget, Dec 22, 2021
  10. Junio C HamanoDec 22, 2021

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.