summaryrefslogtreecommitdiff
path: root/refs/debug.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2022-01-10 11:52:51 -0800
committerJunio C Hamano <gitster@pobox.com>2022-01-10 11:52:51 -0800
commit01ea04f76e096c0c371e475c3a277e67b8f4b082 (patch)
tree0e4028c2e2964f92657221a981fbebc41fe49c67 /refs/debug.c
parent3c0e4178277dee1cdc4607d7277a368379b12b3f (diff)
parentf9f7fd3b238cc56224c30235a0d248d027b7ecfa (diff)
Merge branch 'hn/refs-debug-update'
Debugging support for refs API. * hn/refs-debug-update: refs: centralize initialization of the base ref_store. refs: print error message in debug output refs: pass gitdir to packed_ref_store_create
Diffstat (limited to 'refs/debug.c')
-rw-r--r--refs/debug.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/refs/debug.c b/refs/debug.c
index 791423c6a7..2b0771ca53 100644
--- a/refs/debug.c
+++ b/refs/debug.c
@@ -26,7 +26,8 @@ struct ref_store *maybe_debug_wrap_ref_store(const char *gitdir, struct ref_stor
be_copy->name = store->be->name;
trace_printf_key(&trace_refs, "ref_store for %s\n", gitdir);
res->refs = store;
- base_ref_store_init((struct ref_store *)res, be_copy);
+ base_ref_store_init((struct ref_store *)res, store->repo, gitdir,
+ be_copy);
return (struct ref_store *)res;
}
@@ -47,7 +48,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;
}